My ultimate goal is apply the CVS transforms to ROIs (similar to aseg.mgz) that are defined in MNI space to anatomical space. Unfortunately, I am having trouble doing this. As a start I am trying to transform my T1w image to MNI space. My understanding so far is that I need to do the following
1) Perform mri_cvs_register to generate the transforms. 2) Then apply the transform using mri_vol2vol
I have been able to perform the mri_cvs_register step with the following commond
nohup mri_cvs_register --mov s001 --mni --nocleanup > nohup.mri_cvs_register &
This worked fine and generated the expected output. The el_reg_tocvs_avg35_inMNI152.mgz overlay with the MNI152 space nicely. As a test of my understand I apply the tm3d transform to the to the original brain.mgz image to see if I can transform the original volume to MNI space. I did this with the applyMorph command
applyMorph --template MNI152_T1_1mm_brain.nii.gz --transform el_reg_tocvs_avg35_inMNI152.tm3d vol ../mri/brain.mgz mni.brain.mgz linear
This worked well and the results are what I expected. Now what I would like to do is do the inverse transform the MNI template into the conformed native space. The applyMorph doesn’t appear to have an inverse capability but mri_vol2vol does. I tried to apply does. In order to understand how the mri_vol2vol command works I transformed the brain.mgz into MNI space with mri_vol2vol with the following command
mri_vol2vol --mov ../mri/brain.mgz --targ MNI152_T1_1mm_brain.nii.gz --m3z combined_tocvs_avg35_inMNI152_elreg_aseg.m3z --o vol2vol_mni_brain.mgz --noDefM3zPath --interp trillion
This didn’t work. It is clear that I am not applying the correct affine transformation matrix first. The mri_cvs_register produces a transform.txt file containing
1.02826 -0.0139273 0.091057 0.0115285 0.990443 -0.222876 -0.0255966 0.234528 0.949605 -3.40075 3.35495 30.3486
However, I am not sure how to incorporate this into the mri_vol2vol function. There are lots of options for the specifying the affine transformation file but the transform.txt doesn’t seem to be in the right format. Frankly, I am just guessing to do from here. I would appreciate any advice or links to documentation. I would also like to know what is the relationship and/or difference between mri_vol2vol and the applyMorph function. Why is there a need for both? When is it appropriate to these functions that seem to do very similar things.
Thanks for your help,
Bob