[Neuroimaging] Creating a nibabel image using MNI coordinates help

Shai Goldman shaitzvi at gmail.com
Tue Jun 30 15:20:14 EDT 2020

Dear Nipy team,

I'm new to NiBabel/NiLearn and I'm trying to figure out how to plot some
brain imaging based on MNI coordinates for ECoG data. I have a number of
electrodes with x,y, and z coordinates in MNI space, and each electrode has
a z-score value correlated with it. I found its easy to
use plotting.view_markers(locations, marker_color=colors) with the
locations of my electrodes and an array of colors based on my Z-scores and
I get the electrodes plotted nicely into a 3d brain. I also have
used plotting.plot_connectome(connections, locations, node_color=colors),
with an empty connections matrix to achieve the same thing but in 2d.

What I'm having a lot of trouble figuring out how to do, is to interpolate
my electrode datapoints to the whole brain: i.e, instead of dots where the
electrodes are, color the whole brain based on those dots. I figured I'd
need to use something like plotting.plot_stat_map, but I cannot figure out
how to create the image I am looking for which must be passed in. Is there
an easy way to get an image of the standard MNI brain with the right affine
and fdata based on the brains boundaries? What affine should be used for
MNI? When I use plot_connectome or view_markers it does not ask me for any
affines or data, so I'm confused as to how to properly build those


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/neuroimaging/attachments/20200630/02681908/attachment.html>

More information about the Neuroimaging mailing list