[Mne_analysis] Overlaying multiple labels on a surface in mne_analyze

Eric Larson larson.eric.d at gmail.com
Tue Aug 13 11:30:57 EDT 2013
Search archives:

Support for mne-python label objects is in master on the PySurfer github
site. It hasn't been released yet, but I /think/ PySurfer might be planning
another release soon, if it matters in your decision. The master branch has
been stable in my experience (it's what I use).

Installing from source should be fairly straightforward ("git clone git://
github.com/nipy/PySurfer.git", then "python setup.py install", maybe with a
"--user" if appropriate).

Eric



On Tue, Aug 13, 2013 at 7:58 AM, Luke Bloy <luke.bloy at gmail.com> wrote:

> Hi Eric,****
>
> ** **
>
> What’s the best way to install pysurfer to get this label ability. I’ve
> been using the version the gets installed via pip. But that is pysurfer
> 0.3.1 is there a newer release that has this change. Should I just grab the
> master branch from git hub and install from source? How stable is the
> master branch?****
>
> ** **
>
> Thanks.****
>
> Luke****
>
> ** **
>
> *From:* mne_analysis-bounces at nmr.mgh.harvard.edu [mailto:
> mne_analysis-bounces at nmr.mgh.harvard.edu] *On Behalf Of *Eric Larson
> *Sent:* Tuesday, August 13, 2013 10:44 AM
> *To:* Stephen Politzer-Ahles
> *Cc:* mne_analysis at nmr.mgh.harvard.edu
> *Subject:* Re: [Mne_analysis] Overlaying multiple labels on a surface in
> mne_analyze****
>
> ** **
>
> Hey Steve,****
>
> ** **
>
> In mne-python, you can load your label using 'label = mne.read_label(...)'
> and then just use the 'label.smooth(...)' method -- it will do exactly what
> you want, namely fill in a label so it becomes contiguous if it was
> produced on a decimated surface. If the label was produced on fsaverage, 2
> smoothing steps should be enough (although it will look jagged so 3-5 might
> look better), otherwise you might need more. Drawing labels in PySurfer is
> then as easy as doing brain.add_label(label, color='r', alpha=0.5), because
> it has been coded to understand mne-python Label objects. One of the
> options for "add_label" is to use outlines. PySurfer then also has a
> brain.save_image() method to save the image. This makes scripting figures
> easy, if you're into that. This is the pipeline I've adopted recently with
> seemingly nice results.****
>
> ** **
>
> Eric****
>
> ** **
>
> ** **
>
> On Tue, Aug 13, 2013 at 7:23 AM, Stephen Politzer-Ahles <
> politzerahless at gmail.com> wrote:****
>
> Hi Eric,
>
> Thanks for the feedback. Is it also possible to draw labels in PySurfer?
> The reason I ask is because I have some funky labels (labels which were
> defined on a decimated source space instead of a Freesurfer surface, so
> when I plot them they show up as a bunch of disconnected points rather than
> as nice contiguous areas), so I was hoping to just draw labels around them
> to make nicer-looking plots; but to keep them from overlapping with
> neighboring labels, I would probably need to be able to overlay a few at
> once. (I tried doing this in Freesurfer by turning my labels into an
> annotation and plotting the annotation, but I've been running into issues
> with that pipeline, so I thought I'd try it in MNE instead.)
>
> Best,
> Steve****
>
>
> ****
>
> ** **
>
> ** **
>
> Stephen Politzer-Ahles
> New York University, Abu Dhabi
> Psychology Department
> http://files.nyu.edu/spa268/public****
>
> ** **
>
> On Tue, Aug 13, 2013 at 6:07 PM, Eric Larson <larson.eric.d at gmail.com>
> wrote:****
>
> I have not found a way to do it in mne_analyze, but it is quite easy in
> PySurfer.****
>
> Best,
> Eric****
>
> On Aug 13, 2013 1:32 AM, "Stephen Politzer-Ahles" <
> politzerahless at gmail.com> wrote:****
>
> Hi,****
>
> Is it possible to overlay multiple layers at the same time (ideally in
> different colors) on a surface in mne_analyze? ****
>
> Thanks,
> Steve
> ****
>
> ** **
>
> ** **
>
> 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/20130813/1ccf85a2/attachment.html 


More information about the Mne_analysis mailing list