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

Build ITK with unsigned char support for ImageRegistrationMethodv4 #3788

Open
winnubstj opened this issue Dec 6, 2022 · 3 comments
Open

Comments

@winnubstj
Copy link

winnubstj commented Dec 6, 2022

I'm trying to run ImageRegistrationMethodv4 in python with a 3d uint8 fixed and moving image but that causes the following error:

TemplateTypeError: itk.ImageRegistrationMethodv4 is not wrapped for input type "itk.Image[itk.UC,3], itk.Image[itk.UC,3]"

The message suggested building ITK with support for the requested pixel type so I did this using the options: -DITK_WRAP_PYTHON=ON -DITK_WRAP_unsigned_char=ON
The build is successful, and I can install it, everything seems to work but I still get the same error.

Is it even possible to built ITK with UC3 support for the ImageRegistrationMethodv4 method? Its not clear to me whether the error message is misleading or not.

@github-actions
Copy link

github-actions bot commented Dec 6, 2022

Thank you for contributing an issue!

Welcome to the ITK community!

We are glad you are here and appreciate your contribution. Please keep in mind our community participation guidelines.
Also, please check existing open issues and consider discussion on the ITK Discourse.

@dzenanz
Copy link
Member

dzenanz commented Dec 6, 2022

Quick suggestion: try casting your images to US (unsigned short). Scratch that. ImageRegistrationMethodv4 is mostly wrapped for float types, so try casting to float (itk.F) or read the images as float.

@blowekamp
Copy link
Member

As I recall the v4 Framework does not readily support non-real pixels types for images. This is partly due to the built in smoothing and multi-scale operations in the framework.

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

No branches or pull requests

3 participants