Skip to content
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

ENH: modify wrapping to produce float mesh coordinate type #79

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dzenanz
Copy link
Member

@dzenanz dzenanz commented Nov 27, 2024

When used with unsigned char input images, which is the common case, the produced mesh would use UC as coordinate type. This would not only cause a massive loss in precision and range, but is not wrapped with itk::Mesh class thus causing runtime error:

itk.meshwrite(mesh, file_path)
...
itk.support.extras.TemplateTypeError: itk.MeshFileWriter is not wrapped for input type itk.Mesh[itk.UC,3]. To limit the size of the package, only a limited number of types are available in ITK Python.
...
Supported input types:
itk.Mesh[itk.F,2]
itk.Mesh[itk.D,2]
itk.Mesh[itk.F,3]
itk.Mesh[itk.D,3]

When used with unsigned char input images, which is the common case,
the produced mesh would use UC as coordinate type.
This would not only cause a massive loss in precision and range,
but is not wrapped with itk::Mesh class thus causing runtime error:

   itk.meshwrite(mesh, file_path)
     ...
itk.support.extras.TemplateTypeError: itk.MeshFileWriter is not wrapped for input type `itk.Mesh[itk.UC,3]`.
To limit the size of the package, only a limited number of
types are available in ITK Python.
...
Supported input types:
itk.Mesh[itk.F,2]
itk.Mesh[itk.D,2]
itk.Mesh[itk.F,3]
itk.Mesh[itk.D,3]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant