-
Notifications
You must be signed in to change notification settings - Fork 123
BUG: No longer read rotation center as index (elastix transform < 3.402) #190
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: No longer read rotation center as index (elastix transform < 3.402) #190
Conversation
24d3041
to
6ba04e4
Compare
@stefanklein Shall I also remove the |
I think that is a good idea, since we are moving to a major new version (5.0.0) |
The fix looks good, and I agree that we can remove this from other transforms as well. In elxEulerStackTransform the same function was implemented correctly by the way. But anyway, it's better to remove that functionality everywhere. |
No longer read "CenterOfRotation" from an old transform parameter file, which is the rotation center of the transformation, specified by its index coordinates. elastix version >= 3.402 no longer specifies the rotation center by its index coordinates. As explained by Stefan @stefanklein "Having a center of rotation in index coordinates in the TransformParameter file is bad practice, since its conversion to a world coordinate depends on the knowledge of the size/spacing/origin/directioncosines of the fixed image that was used for registration. That information is stored in the TransformParameter file as well, but it is easy to forget changing the CenterOfRotationIndex when adjusting the (fixed image) resample domain." Also discussed with Marius @mstaring Fixes issue #162 ("AffineLogStackTransform: uninitialized local variable 'rdorigin' used")
6ba04e4
to
47c470f
Compare
@stefanklein If you think it's OK, feel free to press the "merge" button 😄 |
elastix version 3.402 deprecated the index-based "CenterOfRotation" in favor of "CenterOfRotationPoint" (which assumes world coordinates). Following: - commit 70dd3b8, "ENH: added the possibility to set the CenterOfRotationPoint", Marius Staring, Aug 2, 2006. - pull request #190 commit 47c470f, "BUG: No longer read rotation center as index (elastix transform < 3.402)", 24 Sep 2019
elastix version 3.402 deprecated the index-based "CenterOfRotation" in favor of "CenterOfRotationPoint" (which assumes world coordinates). Following: - commit 70dd3b8, "ENH: added the possibility to set the CenterOfRotationPoint", Marius Staring, Aug 2, 2006. - pull request #190 commit 47c470f, "BUG: No longer read rotation center as index (elastix transform < 3.402)", 24 Sep 2019
elastix version 3.402 deprecated the index-based "CenterOfRotation" in favor of "CenterOfRotationPoint" (which assumes world coordinates). Following: - commit 70dd3b8, "ENH: added the possibility to set the CenterOfRotationPoint", Marius Staring, Aug 2, 2006. - pull request #190 commit 47c470f, "BUG: No longer read rotation center as index (elastix transform < 3.402)", 24 Sep 2019
elastix version 3.402 deprecated the index-based "CenterOfRotation" in favor of "CenterOfRotationPoint" (which assumes world coordinates). Following: - commit 70dd3b8, "ENH: added the possibility to set the CenterOfRotationPoint", Marius Staring, Aug 2, 2006. - pull request #190 commit 47c470f, "BUG: No longer read rotation center as index (elastix transform < 3.402)", 24 Sep 2019
elastix version 3.402 deprecated the index-based "CenterOfRotation" in favor of "CenterOfRotationPoint" (which assumes world coordinates). Following: - commit 70dd3b8, "ENH: added the possibility to set the CenterOfRotationPoint", Marius Staring, Aug 2, 2006. - pull request #190 commit 47c470f, "BUG: No longer read rotation center as index (elastix transform < 3.402)", 24 Sep 2019
No longer read "CenterOfRotation" from an old transform parameter file, which is the rotation center of the transformation, specified by its index coordinates.
elastix version >= 3.402 no longer specifies the rotation center by its index coordinates.
As explained by Stefan @stefanklein
"Having a center of rotation in index coordinates in the TransformParameter file is bad practice, since its conversion to a world coordinate depends on the knowledge of the size/spacing/origin/directioncosines of the fixed image that was used for registration. That information is stored in the TransformParameter file as well, but it is easy to forget changing the CenterOfRotationIndex when adjusting the (fixed image) resample domain."
Also discussed with Marius @mstaring
Fixes issue #162 ("AffineLogStackTransform: uninitialized local variable 'rdorigin' used")