The function vol_to_surf (as called in the tutorial you linked) will handle projection from the volume (i.e., a 3D representation) to the cortical surface (i.e. a 2D representation) for you. You can find more specific information on how it does this in the function API docs, particularly in the Notes section.
One point that might have been confusing in the example : Nilearn includes a few FreeSurfer-based surfaces in the library, since these are common projection targets for MNI aligned data. But you can provide your own projection targets as well, if your data are not in MNI space !
Thanks so much for your kind response.
One newbie question perhaps: what is the purpose of using a surfaced-based plotting view with a volume file (nifti)? Compared with traditional volumeâbased maps, e.g., averages made using cortical surface have different assumptions. Wouldnât publishing a surface plot from a nifti file be somewhat deceiving? Thanks!
I do prefer showing volumetric data on volumes and surface on surfaces throughout analysis (and at the acquired/relevant resolution). But a lot of people find surfaces more âprettyâ for publications/talks/posters/etc., and you can sometimes squish a bit more detail in with a surface than a volume image. In my opinion itâs ok to project volume stats to a surface for an illustration, but it should be very clearly labeled as a surface projection, clear in the methods how the analyses and visualizations were done, and volumetric versions of the results (without the surface projection) included as supplemental.