Spatial smoothing on surface

Dear NeuroStars community,

I have functional data preprocessed by fmriprep in output space fsaverage5. Now I would like to spatially smooth the functional data that is already on the surface.

Unfortunately, I can’t seem to find functionality, where the smoothing is done in surface space. So far I only came across smoothing in volume space (e.g. nilearn’s smooth_img) or during volume-to-surface projection (e.g. Freesurfer’s mri_vol2surf).

Can anyone point me to a way of smoothing data that has already been projected to surface space?

Many thanks in advance!
Sabine

Hi @SabineOlig and welcome to neurostars!

mris_fwhm --i ${gii_in} --o ${gii_out} --so \
            --fwhm ${fwhm} --subject ${subject} --hemi ${hemi_fs}

Replace the variables with appropriate values. subject should correspond to the name in the FS subjects directory, and hemi_fs is either lh or rh.

Best,
Steven

2 Likes

Wow, that was super fast! Thank you so much, @Steven

Hi @SabineOlig ,

You can also smooth cifti files with wb_command:

https://www.humanconnectome.org/software/workbench-command/-cifti-smoothing

Thanks both for your helpful suggestions!

I ended up going with the mris_fwhm command with the only difference that subject in my case had to be fsaverage5 rather than the subject’s ID because the subject’s data is in fsaverage5 space.

For completeness, I can mention that wb_command -metric-smoothing can be used to smooth gifti files directly.

For example:

wb_command -metric-smoothing ../anat/sub-011_ses-02_hemi-R_inflated.surf.gii  \ 
          sub-011_ses-02_task-03ArchiLocalizer_hemi-R_space-fsnative_bold.func.gii \
          2 my_gii_smoothed2.func.gii

https://www.humanconnectome.org/software/workbench-command/-metric-smoothing

3 Likes