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

Warping MNI Atlas to Native Space Through Single Subject Template #1691

Closed
hgstephe opened this issue Mar 4, 2024 · 4 comments
Closed

Warping MNI Atlas to Native Space Through Single Subject Template #1691

hgstephe opened this issue Mar 4, 2024 · 4 comments

Comments

@hgstephe
Copy link

hgstephe commented Mar 4, 2024

Hello!

I'm trying to use ANTs for a longitudinal pipeline with the following intended steps:

  1. Make single subject templates with multivariate template construction
  2. Use Syn Registration to register the template with FSL's MNI152 template (prefix MNI_)
  3. Pull MNI co-registered atlas labels back to native space (image_a.nii) through the template using the following command: antsApplyTransforms -d 3 -i HarvardOxford-sub-maxprob-thr0-1mm.nii.gz -r image_a.nii -t [ MNI_0GenericAffine.mat , 1] -t MNI_1InverseWarp.nii.gz -t [ image_a_00GenericAffine.mat , 1 ] -t image_a_01InverseWarp.nii.gz -n GenericLabel -o atlas_to_native.nii.gz

However, the resulting image looks a little wonky (see attached image showing poor alignment of hippocampus with atlas labels).

Just applying the first set of transforms to get atlas labels for the template gives the expected results (see other attached image), so I'm wondering if I'm messing up the order of the template to native transforms.

atlas_to_native atlas_to_template

Much appreciated!

@cookpa
Copy link
Member

cookpa commented Mar 4, 2024

Good hypothesis, but we need the registration commands to evaluate the correct order of transforms

@hgstephe
Copy link
Author

hgstephe commented Mar 5, 2024

Hello, here are the commands and the resultant atlas image warped from MNI to native space:

temp_call reg_call atlas_to_native atlas

@cookpa
Copy link
Member

cookpa commented Mar 5, 2024

OK thanks. Yes, I think you have the transforms backwards, the MNI_ pair should be on the right side.

https://github.com/ANTsX/ANTs/wiki/Forward-and-inverse-warps-for-warping-images,-pointsets-and-Jacobians#standard-space-through-an-intermediate-template

Also, you should know that the template is updated after every pairwise registration in antsMultivariateTemplateConstruction*.sh. So if you are using the warps left in the working directory, they are one template iteration behind. This might be a very small difference (see the intermediateTemplates directory to check) but ideally you would run antsRegistrationSyN.sh for each input to the final template.

Running antsRegistrationSyNQuick.sh might not be optimal for the template to MNI registration. I would try antsRegistrationSyN.sh as well.

The quality of the final registration will depend on all the steps in the pipeline, so to judge results you have to look at

  1. The overlap of labels with anatomy in the MNI space (this can vary quite a bit)
  2. The quality of registration from the MNI template to the local template.
  3. The quality of registration from the local template to the individual subject image.

@hgstephe
Copy link
Author

hgstephe commented Mar 5, 2024

Thank you, Philip! That clears things right up. Thanks for your help!

@hgstephe hgstephe closed this as completed Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants