More Pythonic VTK wrapping

  • For the CamelCase/snake_case property renaming, I think e.g. vtkConnectivityFilter.n_connected_regions is slightly more pythonic than .number_of_connected_regions, although keeping the parallel to C++ might outweigh that

We can probably make a limited number of such changes. If the community can make suggestions, we can look into it. Also, if these changes are only a few and on “leaf node” classes, it is possible to use the @override mechanism to add a replacement for the class. I’ll describe this in the future.

For enum valued properties like vtkConnectivityFilter.extraction_mode , it’d be nice to be able to use an actual python enum rather than a bare int, especially if the enum were available without an additional import.

This is something that should be done at the C++ level and automatically handled by the wrappers. If those constants were done as enums inside the class, the wrappers would handle adding them to the class. In terms of returning them from a function, we need to have the right signature and not return ints. Otherwise, there is no way to automatically find it.