Posts tagged neuroimaging

Adding contours of a surface region to a statistical map in Nilearn

I often use Nilearn’s surface plotting to show a statistical map on the cortex - and wish that I could add the outlines of a region on top of the statistical map. This is harder than it seems at the first thought, since matplotlib’s mesh plotting allows us to only edit the whole color of a mesh-face, hence we need to find all faces that correspond to the outside edge of a region.

But here’s code that’s working for me.

png

Read more ...