[Mne_analysis] Overlaying multiple labels on a surface in mne_analyze

Eric Larson larson.eric.d at gmail.com
Tue Aug 13 10:43:58 EDT 2013
Search archives:

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/6d02b429/attachment.html 


More information about the Mne_analysis mailing list