Upsample from fsaverage6 to fsaverage7

I’m using pysurfer to visualize fmriprep’s fsaverage6 (40k vertices per hemisphere) surface data output (.gii, numpy array). Although pysurfer’s brain.add_overlay method appears to accept the fsaverage6 data, it seems that pysurfer’s brain.add_data method only accepts the higher-resolution fsaverage7 (163k vertices per hemisphere). The add_data method has more visualization options, so I’d like to use this.

Any pysurfer experts out there experiencing this issue? Does anyone know a straightforward way to resample the fsaverage6 (ico64) data to fsaverage7 (ico128) resolution?

-Rolando

1 Like

Since PySurfer supports any subject, I would expect fsaverage6 would work just fine, but I haven’t used it in some time. As a stop-gap, you can use mri_surf2surf to let FreeSurfer do the upsampling for you:

mri_surf2surf --srcsubject fsaverage6 --trgsubject fsaverage --hemi <hemi> \
    --sval <input> --tval <output>

(I believe PySurfer has wrappers that allow the same things to be done from a Python interface, which might make throwing away the outputs as temporary values easier.)