External Email - Use Caution        

Hello,


I am trying to solve an issue with reregistering functional images onto a new anatomical. Let’s say I have two anatomical images from sub01-ses01/orig.mgz and sub01-ses02/orig.mgz, as well as functional files each registered to their corresponding anatomical sub01-ses01/fmcpr.nii.gz and sub01-ses02/fmcpr.nii.gz. My goal is to reregister Dsub01-ses01/fmcpr.nii.gz onto the sub01-ses02 anatomical. Screenshots of my issue are available at: https://imgur.com/a/9GDm9yp


To create a mapping between the two anatomical images, I first run:

$ mri_cvs_register --mov sub01-ses01 --template sub-01-ses-02


When I view the output of the mri_cvs_register command, everything is lined up and looks good:

https://i.imgur.com/SvjPVHX.png


Next, I reregister sub01-ses01/fmcpr.nii.gz using the mapping created with mri_cvs_register:

$ mri_vol2vol --noDefM3zPath --mov sub01-ses01/fmcpr.nii.gz --m3z $SUBECTS/sub01-ses01/cvs/final_CVSmorph_to-sub01-ses02.m3z --o sub01-ses01/fmcpr.ses02space.nii.gz --nearest --targ sub01-ses02/orig.mgz


When I view sub01-ses01/fmcpr.ses02space.nii.gz over sub01-ses02/orig.mgz, the functional image is off by 90 degrees. This is unexpected:

https://i.imgur.com/CpGtKyM.png


If I manually rotate the functional image in Freeview by 90 degrees, it looks good:

https://i.imgur.com/SkDNzuK.png


mri_vol2vol has a --rot argument, so I tried to use this to perform the rotation automatically. Rather than 90 degrees, I now have to specify -90 degrees. Unfortunately, the output when I specify the rotation in mri_vol2vol does not line up well with the anatomical.

https://i.imgur.com/vjxV6rv.png



Does anyone know why this is happening? Please let me know if you have any suggestions.


Thank you!

Paul