[Mne_analysis] Plotting a downsampled source space together with a .label file

Eric Larson larson.eric.d at gmail.com
Wed Jul 31 18:26:12 EDT 2013
Search archives:

Hey Steve,

Offhand I see a couple possibilities. If you're referencing by vertex
numbers, you might be hitting off-by-one errors somewhere, since MATLAB
uses 1-based indexing, and surfaces / vertices are 0-index (C) based. If
you upload the source space file and label file somewhere, someone (maybe
me) might be able to track down what's going on. For what it's worth, if
you have a working mne-python install, it uses 0-based indexing, and has
useful functions for plotting brains with labels and the like. By OBO
errors in my experience make usually result in worse errors, so that's
probably not it.

If you're getting the positions directly from the label file, one thing you
might want to check is the positions you get if you take the vertices
referenced in the label file and use those to get positions in the source
space. (In this case, be careful about the indexing...) Label files contain
position values (what I have a feeling you're using to make the plots), but
they also contain vertex numbers that those are meant to correspond to in
source space.  You might be hitting a problem where the label locations are
pulled from one surface (e.g., pial), while the source space is defined
over another (e.g., orig). I usually do my source-space manipulations using
vertex numbers (instead of positions) to avoid this issue completely, as it
treats all surfaces (e.g., pial, orig, sphere) equally.

Eric



On Wed, Jul 31, 2013 at 3:01 PM, Stephen Politzer-Ahles <
politzerahless at gmail.com> wrote:

> Hello,
>
> I am trying to plot a mesh of points from a sourcespace (e.g.,
> $SUBJECTS_DIR/$SUBJECT/bem/$SUBJECT-ico-4-src.fif) together with the points
> in the label file. (the reason is because we made some custom labels using
> a script, and they turned out looking patchy--see
> http://imgur.com/bUAuaJH--so I want to check whether these labels really
> cover the whole regions they're supposed to, or whether there are
> sources/vertices that should be in those labels but aren't.) However, when
> I do this, the locations of the vertices from the label file don't quite
> line up with vertices from the source space (see
> http://i.imgur.com/IGlKB9T.png and http://i.imgur.com/CUj6cF7.png for
> comparisons; the green vertices from the label file are in more or less the
> right place [what's plotted here is Brodmann area 46], but don't quite line
> up with the black vertices from the source space), which I was surprised
> by, since I thought the locations of vertices in a label file came directly
> from the source space. What I was doing was reading the -ico-4-src.fif file
> into MATLAB using the FieldTrip toolbox, and reading a label file in
> directly, and then plotting them together.
>
> So I am just wondering if there is a different file I should be using to
> plot the locations of all the vertices in my sourcespace that labels could
> have come from? Otherwise I guess it's a problem with how we created the
> labels.
>
> Thank you,
> Steve Politzer-Ahles
>
> ----
> Stephen Politzer-Ahles
> New York University, Abu Dhabi
> Psychology Department
> http://files.nyu.edu/spa268/public
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
>
> The information in this e-mail is intended only for the person to whom it
> is
> addressed. If you believe this e-mail was sent to you in error and the
> e-mail
> contains patient information, please contact the Partners Compliance
> HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in
> error
> but does not contain patient information, please contact the sender and
> properly
> dispose of the e-mail.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20130731/fb505482/attachment.html 


More information about the Mne_analysis mailing list