You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just a matter of preference: try to hide the ugly _vtk and _vtkPD postfixes by either one of the suggestions:
Create a new namespace/submodule vtk where it is clear that only vtkPolyData stuff is used. One would use that module as something like import statismo.vtk as statismo
Similar as for vtkStandardMeshRepresenter, just prefix all statismo objects created for vtk with vtk*, a prefix a vtk users are pretty familiar with
Just entirely skip it, unless there is the plan to further expand to other container types
Hide the specializations by using some data managing layer when creating the object, for instance
if isinstance(representer, vtkStandardMeshRepresenter):
return statismo.DataManager_vtkPD.Create(representer)
Not sure if I have time to fix this myself, just making suggestions which I would pick up in case I continue to work with statismo for bit... :)
The text was updated successfully, but these errors were encountered:
normanius
changed the title
How to use the statismo python wrapper module?
Improvements for statismo python wrapper module
Jan 5, 2018
On MacOS, when building the wrapper, I end up with two files _statismo_VTK.so and statismo_VTK.py under build/modules/VTK/wrapping.
What I currently do to use the python wrapper is the following:
_statismo_VTK.so
andstatismo_VTK.py
to that location__init__.py
file with the following line (from statismo_VTK.py import *
)This way I can import the statismo library and all is good.
For better usage, I'd suggest however the following improvements:
statismo
_vtk
and_vtkPD
postfixes by either one of the suggestions:vtk
where it is clear that onlyvtkPolyData
stuff is used. One would use that module as something likeimport statismo.vtk as statismo
vtkStandardMeshRepresenter
, just prefix all statismo objects created for vtk withvtk*
, a prefix a vtk users are pretty familiar withNot sure if I have time to fix this myself, just making suggestions which I would pick up in case I continue to work with statismo for bit... :)
The text was updated successfully, but these errors were encountered: