Transform from fsaverage to fsnative


Hopefully a relatively straightforward question.

How do I transform an atlas in fsaverage space into a subjects fsnative space?

I am using fmriprep and imagine the necessary transforms are somewhere in the freesurfer/subject/mri/transforms folder but it isn’t clear to me.



You’ll want the SUBJECTS_DIR environment variable to point to the directory with your reconstructed subjects in it. Then you can just use mri_surf2surf.

mri_surf2surf --srcsubject fsaverage --trgsubject $SUBJECT --hemi $HEMI \
    --sval $INPUT --tval $OUTPUT

what are the values for $INPUT and $OUTPUT. I have a similar problem, I have the surface values for subject in fsaverage surface and would like to transform it back to native surface for the subject.

$INPUT is the file you want to transform, $OUTPUT is what you want the transformed file to be called.

Thanks, so the $INPUT can be for example surface activation for a subject in fsaverage surface, and output the activation on subject native surface?

Yes, that’s exactly right.

oh awesome! just following up on, next I want to move the activation from subject surface onto subject volume, and using a mri_surf2vol :
mri_surf2vol --o $OUTPUT_FILE --subject $SUB_ID --so $SUBJECTS_DIR/$SUB_ID/surf/lh.inflated $SUBJECTS_DIR/$SUB/sub_activation_on_native_surface.nii

however I am getting an error saying there is no match. what could be going on?

Hard to tell without the error text. And could you explain the goal of moving activation into the volume space? I ask for two reasons:

  1. If you project the data onto the voxels intersecting the pial surface, you’ll get different data than projecting onto the gray/white boundary, or the mid-thickness surface. Your choice of parameters is going to depend on what you’re trying to do, so I can’t make a suggestion for a better command.
  2. I can’t think of a good reason to project activation maps from the surface to the volume. The main reason I would use mri_surf2vol is to project morphometric data, parcellations, or surface indices into the volume space, so that I can use them to create ROIs in the original voxel space.