ANTsX / ANTs

Advanced Normalization Tools (ANTs)
Apache License 2.0
1.18k stars 381 forks source link

convert CorticalThicknessNormalizedToTemplate.nii.gz to the MNI template #1626

Closed zhaolei215 closed 10 months ago

zhaolei215 commented 10 months ago

Hello, I obtained CorticalTicknessNormalizedToTemplate.nii.gz using the antsCorticalTickness.sh script. However, I am using the Oasis template and cannot partition brain regions well. Now I want to convert CorticalThicknessNormalizedToTemplate.nii.gz to the MNI template. I have registered the Oasis template with the MNI template using antsRegistrationSyN.sh and obtained a series of files, but I do not know how to apply this series of files to CorticalThicknessNormalizedToTemplate.nii.gz. Can you give me some feedback, or have you done similar work before.

This series of files is: test0GenericAffine.mat, test1InverseWarp.nii.gz, test1Warp.nii.gz, testInverseWarped.nii.gz, testWarped.nii.gz.

Thank you for reading and reply.

ntustison commented 10 months ago

If you want to ultimately warp your cortical thickness images to the MNI template, you should start with the thickness image in the subject space and use the multiple sets of transforms to warp to the MNI template. It should be something like

$ antsApplyTransforms -d 3 -i corticalThickness.nii.gz -r MNItemplate.nii.gz -o corticalThicknessToMni.nii.gz -n Linear -t ${mni_to_oasis}1Warp.nii.gz -t ${mni_to_oasis}0GenericAffine.mat -t ${subject_to_oasis}1Warp.nii.gz -t ${subject_to_oasis}0GenericAffine.mat
dorianps commented 10 months ago

Instead of bringing all thicknesses to MNI, isn't it better for you to bring the MNI parcellation in OASIS space and work there?

Dorian

On Thu, Nov 16, 2023, 12:02 PM Nick Tustison @.***> wrote:

If you want to ultimately warp your cortical thickness images to the MNI template, you should start with the thickness image in the subject space and use the multiple sets of transforms to warp to the MNI template. It should be something like

$ antsApplyTransforms -d 3 -i corticalThickness.nii.gz -r MNItemplate.nii.gz -o corticalThicknessToMni.nii.gz -n Linear -t ${mni_to_oasis}1Warp.nii.gz -t ${mni_to_oasis}0GenericAffine.mat -t ${subject_to_oasis}1Warp.nii.gz -t ${subject_to_oasis}0GenericAffine.mat

— Reply to this email directly, view it on GitHub https://github.com/ANTsX/ANTs/issues/1626#issuecomment-1814860065, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACFJU7IOO5AL4LB5QHRJMXLYEZBLFAVCNFSM6AAAAAA7OCA7A6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJUHA3DAMBWGU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

zhaolei215 commented 10 months ago

Thank you for your reply. Can I understand ${mni_to oasis} as registering the MNI template with the Oasis template, which is - f Oasis - m MNI when using antsRegistrationSyN. sh? When extracting cortical thickness using the Oasis template, some files are generated, such as SubjectToTemplate0GenericEffine.mat and SubjectToTemplate1Warp.nii.gz. Are these the ${subject_to_oasis} you mentioned? I hope you can answer my doubts. Thank you again.

zhaolei215 commented 10 months ago

After multiple attempts, I found that {mni_to oasis} is registering oasis to MNI, that is, when using antsRegistrationSyN. sh, - f MNI - m Oasis. If - f Oasis, - m MNI are used, will result in a .nii.gz of 0 pixels.