[Mne_analysis] Generating labels with mne_python

Stephen Politzer-Ahles politzerahless at gmail.com
Sat Aug 24 10:56:29 EDT 2013
Search archives:

Hi Luke,

It sounds like you want to do spatial clustering based on the functional
data. I recently had a similar issue, and I found that I could create a
neighborhood structure using the 'use_tris' information from the source
space (I did this in MATLAB, but I think it can also be done in Python).
Each row of use_tris is three columns long, indicating the vertex numbers
of the three vertices that form a triangle (and thus are adjacent), so it's
possible to go through use_tris and create a dictionary (or similar
structure) listing, for each used vertex in the source space, the vertices
that are adjacent to it. From there it's probably straightforward to make
clusters of adjacent vertices that exceed your threshold based on the stc
data, although I haven't done it myself; what I did for my analysis is just
put that neighbor structure and the source data into a Fieldtrip [
http://fieldtrip.fcdonders.nl/] timelock data structure (just treating the
source vertices as "channels" of sensor data), and used Fieldtrip's
built-in spatiotemporal clustering algorithm to do statistics. (This
somewhat roundabout way may not be strictly necessary--I've seen some
example Python code on mne-python for temporal-spectral clustering of
source data, for example, but haven't used it myself.)

Best,
Steve



Stephen Politzer-Ahles
New York University, Abu Dhabi
Psychology Department
http://www.nyu.edu/projects/politzer-ahles/


On Wed, Aug 7, 2013 at 9:57 PM, Luke Bloy <luke.bloy at gmail.com> wrote:

> Hi all,****
>
> ** **
>
> I am interested in generating a label from an stc. What I would like is to
> be able to supply a seed and a threshold, and to get as output a label
> consisting of the source points  connected to the seed and above threshold.
> Basically I’d like to be able to compute connected components on stcs. Has
> this been implemented? If not could someone maybe help me out by pointing
> to how I could get neighborhood information from the src space?
> Alternatively, can someone think of a way to combine thresholding stc.data
> with mne.label.grow_label to do what I want?****
>
> ** **
>
> A second easier question. Is there an simple way to show labels on a
> pysurfer plot. At the moment I’m generating the label, then saving it to
> disk and using ‘brain.add_label’ to load the label from disk. Is there a
> more straight forward way that I’m missing.****
>
> ** **
>
> Thanks****
>
> Luke****
>
> ** **
>
> _______________________________________________
> 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/20130824/8244ff68/attachment.html 


More information about the Mne_analysis mailing list