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

PET-linear: apply transform fix #1409

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

Conversation

HuguesRoy
Copy link
Contributor

When applying the nonlinear registration T1 to MNI, the reverse_forward_transforms should be used instead of the forward_transforms.

As the registration is non-linear, the transformation should be applied in the correct order.

The forward_transforms output is a list containing the transformation in natural order: the first element should be applied first, and the last element should be applied last. However, the ApplyTransform applies lists of transformations in reverse order (the last transformation in the list is applied first). Thus, the "reverse_forward_transforms" output from ANTS registration should be used.

source: https://nipype.readthedocs.io/en/latest/api/generated/nipype.interfaces.ants.html#registration

When applying the nonlinear registration T1 to MNI, the reverse_forward_transforms should be used instead of the forward_transforms. 

As the registration is non-linear, the transformation should be applied in the correct order. 

The forward_transforms output is a list containing the transformation in natural order: the first element should be applied first, and the last element should be applied last. However, the ApplyTransform applies lists of transformations in reverse order (the last transformation in the list is applied first). This it is the "reverse_forward_transforms" output from ANTS registration that should be used.

source: https://nipype.readthedocs.io/en/latest/api/generated/nipype.interfaces.ants.html#registration
Copy link
Contributor

@AliceJoubert AliceJoubert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @HuguesRoy for spotting that !

@ravih18
Copy link
Contributor

ravih18 commented Jan 9, 2025

Maybe it should be tested on a few real images to check if the normalization is still good after that fix !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants