From this, I know that surf_data is a 2D array containing the mesh nodes of surface data, but I am unsure how to 1) smooth this data and 2) transform this back into volume data (i.e. an nii image) after smoothing.
(1) I would probably go to volume space and then smooth. Yes, smoothing on the surface has benefits compared to volumetric smoothing, but those benefits really only hold when doing an analysis on the surface. When you smooth after the volumetric transformation, then you can explicitly control the FWHM smoothness of the data you are about to analyze, which can be important to know for your stats. Chances are you probably already have a volumetric image on hand, in which case you don’t really need the surface image at all if you are planning on analyze in volumetric space. May you describe why you want to smooth on surface and then go to volumetric?
While I don’t do this kind of operation for FMRI data, I occasionally do smoothing on the surface and then reproject into the volume for creation of atlases or for thickness - measures or categories that I would like to assign uniformly as a cortical projection into the volume. Surface smoothing is generally less sensitive to the FWHM by respecting sulcal boundaries better. The programs in AFNI that are useful for these kinds of operations are SurfSmooth, SurfLocalstat, @surf_to_vol_spackle, 3dSurf2Vol and 3dVol2Surf.
Could you confirm that this function* is still not availablein nilearn (and elsewhere in python librairies) ?
: smoothing data (ndarray) using surface information (vtk polydata) ,for example after using nilearn.surface.vol_to_surf like wb_command -metric-smoothing would do on files