External Email - Use Caution        

Do the two align in freeview if you just load both of them? If so, then you can use something like
mri_vol2vol --mov vol1.mgz --targ vol2.mgz --regheader --no-resample --o new.vol1.mgz
If they do not but you have a registration, then you can use a similar command, eg,
mri_vol2vol --mov vol1.mgz --targ vol2.mgz --reg yourreg.lta --no-resample --o new.vol1.mgz

On 8/18/2023 11:34 AM, Proulx, Jean Sebastien wrote:

        External Email - Use Caution        

Dear Freesurfers!

I have two single-slice images that were acquired with different head positions.

Thanks to a fancy AutoAlign-like routine at the scanner (areg by Paul Wighton), the fov of the second image tracked the movement of the headthe brain nicely aligns when overlaying the two untouched image grids with e.g. fslview.

To leverage this online registration and properly visualize images in freeview, I need the fov position in header of the second image to be the same as in the header of the first imagebasically pretending the head did not move and the two images were acquired with the exact same scanner-space fov position. So far I achieved that in a somewhat inelegant way by loading the first header in matlab with MRIread.m and manually adding the volume data from the second image before saving with MRIwrite.m.

That however does not work when the second image have different voxel and matrix sizese.g. my second image has twice the resolution of the first and gets blown up to twice the size in freeview after my makeshift header change :-(

I suspect a better solution could use mri_vol2vol with an appropriate registration matrix, but I don't know how to get the appropriate matrix.

Any suggestions?

thanks a lot for the help and
Have a very good day!
Sébastien

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer