-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: Filter not accepting mesh input for Python wrapping #10
Comments
In 2018, mesh support in Python was deficient (InsightSoftwareConsortium/ITKSphinxExamples#66). Maybe not everything has been updated properly in ITK? If you try updating the example in InsightSoftwareConsortium/ITKSphinxExamples#66 maybe you could get a better grip of mesh support. Trying it out on a simple, stand-alone example should be helpful for this custom filter. |
I'll check it out, thanks! |
@tbirdso The This needs to be a raw pointer instead of a SmartPointer. Passing a smart pointer causes unnecessary smart pointer construction / destruction, and wrapping and wrapping ownership rules are set up for raw pointers. |
Thanks @thewtex. I wasn't understanding that I found Cpp guidelines to help myself better understand the issue with this design pattern: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-smart |
Overview
MeshProcrustesAlignFilter builds and is wrapped successfully for template arguments of type itk::Mesh<double, 3>. However, attempting to set input meshes in Python following setting number of inputs returns an error:
At face value it seems that there is a type mismatch between the expected argument of type
itkMeshD3_Pointer
and the given value of typeitkMeshD3
. However, per Discourse discussion Python is not expected to handle pointers directly.Steps to Reproduce
Expected behavior
Setting inputs up to the allocated number in Step 3 succeeds without error.
Observed behavior
The text was updated successfully, but these errors were encountered: