-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUG: Fix ElastixRegistrationMethod GetNumberOfTransforms GetNthTransform
ElastixRegistrationMethod member functions `GetNumberOfTransforms`, `GetNthTransform`, and `GetCombinationTransform` did always just return zero or null, erroneously, when the pixel type of the input images (specified by `TFixedImage` and `TMovingImage`) would be different from the internal pixel type (specified by "FixedInternalImagePixelType" and "MovingInternalImagePixelType", `float` by default). The code incorrectly assumed that the objects stored in the ElastixBase `TransformContainer` are always of type `elx::TransformBase<ElastixTemplate<TFixedImage, TMovingImage>>`. This commit just assumes that the objects stored in `TransformContainer` are of type `AdvancedCombinationTransform<double, FixedImageDimension>`. The commit aims to fix issue #965 "ElastixRegistrationMethod GetNumberOfTransforms, GetCombinationTransform, etc. does not work with non-float ImageType", reported by Matt McCormick. Extended the GoogleTest `itkElastixRegistrationMethod.CheckMinimumMovingImageUsingAnyInternalPixelType` unit test to check this issue.
- Loading branch information
Showing
3 changed files
with
32 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters