-
Notifications
You must be signed in to change notification settings - Fork 17
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
Ordering of tranforms in TransformChain #81
Labels
TBD
To be discussed
Milestone
Comments
oesteban
added a commit
to oesteban/nitransforms
that referenced
this issue
Jul 18, 2022
This PR makes the ``TransformChain`` class more consistent with the overall coordinate system, assuming that transforms are chained with the *points* criteria. In other words, in the typical setup where we have estimated one initializing affine and then perhaps two levels of nonlinear deformations, when calculating the coordinates of a given index in the reference image, the last nonlinear should be applied first, then the second, and finally the affine to pull information from the moving image. In other words, the chaining (composition) operation works exactly as a single transformation procedure. Resolves nipy#81.
oesteban
added a commit
to oesteban/nitransforms
that referenced
this issue
Jul 18, 2022
unit tests are your friend Resolves: nipy#81.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the context of #79, one issue has surfaced. We need to set some convention for the ordering of transforms when concatenating transforms.
At the moment, for individual transforms, we are trying to hold on to the "points" criteria. If we want to keep that for transform chains, then the order of the composed transforms should be reversed to the "image" criteria. In other words, say we have a mapping calculated with ANTs where we have 3 affine registration levels and one final nonlinear layer. Nipype and antsApplyTransforms will expect the ordering to be images (as in, we first apply the 3 affines to the data and finally the nonlinear). But coordinates are mapped the other way around (i.e., the first transform applied would be the nonlinear, and then the three linear).
I would prefer the "points" criteria, although that could fill counter-intuitive w.r.t. the existing software.
EDIT: Actually, I've just found that this problem is present in our preprint (https://osf.io/8aq7b). The last line of column 1 in page 2 says
.
Here, the order of transforms is wrong, it should actually say
.
The text was updated successfully, but these errors were encountered: