Transforming ROIs from freesurfer space into fmriprep T1w space

I’ve completed some analyses in native space where the anatomical nifti that my functional maps are registered to is sub-{}_desc-preproc_T1w.nii.gz. However, I also made ROIs from retinotopic mapping that are in the “orig.mgz” anatomical space from freesurfer (using mri_label2vol). How can I get these retinotopic ROIs into the same space as desc-preproc_T1w.nii.gz? I imagine it might have something to do with the sub-{}_from-T1w_to-fsnative_mode-image_xfm.txt file, but I have been not been able to figure out a solution thus far. Could anyone lend some advice? Also am I using the term “native space” correctly – why are there two native spaces, one in freesurfer and one in fmriprep?

You are right, you’ll need to apply the inverse transform of that stored in sub-{}_from-T1w_to-fsnative_mode-image_xfm.txt.

If you can upgrade to the latest version of fMRIPrep (probably thinking of future subjects to preprocess in your project), as of 1.5.1 it also generates sub-{}_from-fsnative_to-T1w_mode-image_xfm.txt (i.e., the inversion of the transform is not necessary).

These are itk transform files, so antsApplyTransforms is your friend. To resample a labels file, you’ll probably want to use the MultiLabel interpolation.

Let us know if you need further assistance.

2 Likes

Thanks so much. Needing to use ANTs was my missing step!

1 Like

Hi !
I have something similar to do, I would like to transform a ROI (extracted from aseg.mgz) from freesurfer space (native space ?) to mni space. Before trying to do that on my ROI, I wanted to test it on the T1.mgz (that is in the same space than aseg.mgz). However the output is wrong (prefrontal area are cut and the rest of the brain is not in the mni space).
Here is the command that I used:

antsApplyTransforms -d 3 \
-r /path/sub-232_ses-001_rec-normalised_space-MNI152NLin2009cAsym_desc-preproc_T1w.nii.gz \
-i /path/T1.mgz \
-e 0 \
-o /path/TEST.nii.gz \
-t /path/sub-232_ses-001_rec-normalised_from-fsnative_to-T1w_mode-image_xfm.txt \
-v 1

Do you have any idea about what I have misunderstood or what I am not doing correctly ?