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

Ordering of tranforms in TransformChain #81

Closed
oesteban opened this issue Mar 26, 2020 · 0 comments · Fixed by #165
Closed

Ordering of tranforms in TransformChain #81

oesteban opened this issue Mar 26, 2020 · 0 comments · Fixed by #165
Labels
TBD To be discussed
Milestone

Comments

@oesteban
Copy link
Collaborator

oesteban commented Mar 26, 2020

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
.

@oesteban oesteban added the TBD To be discussed label Mar 26, 2020
@oesteban oesteban added this to the 20.0.0rc2 milestone Mar 26, 2020
@oesteban oesteban modified the milestones: 20.0.0rc4, CZI month 7 Jun 18, 2021
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TBD To be discussed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant