-
Notifications
You must be signed in to change notification settings - Fork 115
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
TransformixFilter does not process non-float pixel type images #322
Comments
A simple check for this is changing the PixelType from float to double in the test added in: #323 |
@N-Dekker @mstaring @stefanklein is it possible to take a look at this? I think a cast of the type is intended and required somewhere, which I do not know where that should be. |
I was unaware of this as I was trying to use transformix to deform an atlas (uchar image). |
Current status:
That's it for now! Even though it may be somewhat inconvenient, I think it works well. |
Both ElastixRegistrationMethod and TransformixFilter now convert their input images to the internal pixel type, specified by elastix/transformix parameters, "FixedInternalImagePixelType" and "MovingInternalImagePixelType" (which are "float" by default). The conversion is performed internally by `itk::CastImageFilter`. It is only performed when the pixel type of an input image is actually different from the specified internal pixel type. The converted images are cached in memory, to avoid repeating the very same (potentially expensive) image conversion multiple times. GoogleTest unit tests are included. Related to issue #322 "TransformixFilter does not process non-float pixel type images"
Both ElastixRegistrationMethod and TransformixFilter now convert their input images to the internal pixel type, specified by elastix/transformix parameters, "FixedInternalImagePixelType" and "MovingInternalImagePixelType" (which are "float" by default). The conversion is performed internally by `itk::CastImageFilter`. It is only performed when the pixel type of an input image is actually different from the specified internal pixel type. The converted images are cached in memory, to avoid repeating the very same (potentially expensive) image conversion multiple times. GoogleTest unit tests are included. Related to issue #322 "TransformixFilter does not process non-float pixel type images"
When
itk::TransformixFilter
is templated with aTMovingImage
that does not match the internalElastixTemplate
TMovingImage
, thisdynamic_cast
will fail:elastix/Core/Kernel/elxElastixTemplate.hxx
Lines 100 to 101 in a187f9a
and no moving image will be detected here:
elastix/Core/Kernel/elxElastixTemplate.hxx
Lines 387 to 388 in a187f9a
and no transformation is applied here:
elastix/Core/Kernel/elxTransformixMain.cxx
Line 145 in a187f9a
The text was updated successfully, but these errors were encountered: