How to use Nilearn to plot freesurfer surface vertices


I have extracted a list of freesurfer surface vertices in an array from the left hemisphere. The array has a single number (index) for each vertex.

Now I want to plot these vertices on top of a statical map that is in MNI space. I was able to read in the array as a Python variable but now I am stuck on how to convert each index into (X,Y, Z) MNI coordinates to plot them on top of my fMRI statistical results.

Any advice would be appreciated,

I hope to do that with Nilearn

Thanks in advance.

Hi @M.S_Yani :wave:

So to be clear, you have a single hemisphere surface that you’d like to convert to a volumetric representation ?

Nilearn supports the reverse direction of vol_to_surf, so you could bring your statistical map to the surface. But to go from the surface to the volume, I’m not immediately sure that there’s a pure Python solution – though there’s certainly discussion around creating one and providing broader access.

There is of course mri_surf2vol from FreeSurfer, which is certainly worth checking out, if you haven’t already !