[Mne_analysis] filling gaps between a set of concatenated labels
Martin Luessi
mluessi at nmr.mgh.harvard.edu
Mon Aug 18 12:24:36 EDT 2014
Hi Denis,
Attached is a script that iteratively grows each label until all the
gaps are filled. It currently only works for a parcellation with small
gaps. You will need to adjust it for your case where you have a large
missing area.
Best,
Martin
On 08/18/14 11:54, Denis-Alexander Engemann wrote:
> The best thing would be to compute a "smooth" enveolope around the
> outermost vertices and just take everything inside. I fear this is not
> as easy to get as it sounds ...
> Anyways, on closer inspection, the actual amount of vertices disjoint by
> th gaps is neglegible. I might not suffer enough to look into it.
>
> Alex, have we ever thought about adding some set logic to labels? I'm
> thinking of overloading the minus operator for example.
>
> -D
>
> On Mon, Aug 18, 2014 at 5:47 PM, Alexandre Gramfort
> <alexandre.gramfort at telecom-paristech.fr
> <mailto:alexandre.gramfort at telecom-paristech.fr>> wrote:
>
> hi,
>
> you could "smooth" the label (although we should have named it
> dilate). The current code in stc_to_label could maybe help.
>
> HTH
> Alex
>
>
> On Sat, Aug 16, 2014 at 10:13 PM, Denis-Alexander Engemann
> <denis.engemann at gmail.com <mailto:denis.engemann at gmail.com>> wrote:
> > Dear list,
> >
> > for a recent analysis I'm assembling a big label (using operator
> overloading
> > np.sum(labels)) based on the Brodmann PALS B12 parcelation.
> > As a result, some gaps remain between adjacent labels.
> > E.g. see:
> https://www.dropbox.com/s/rzzzcz1tv1k75si/label_check_lat.png
> >
> > I'm wondering about the easisest way to fill these gaps (code-based).
> >
> > Best,
> > Denis
> >
> > _______________________________________________
> > Mne_analysis mailing list
> > Mne_analysis at nmr.mgh.harvard.edu
> <mailto: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.
> >
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> <mailto:Mne_analysis at nmr.mgh.harvard.edu>
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
>
>
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
--
Martin Luessi, Ph.D.
Research Fellow
Department of Radiology
Athinoula A. Martinos Center for Biomedical Imaging
Massachusetts General Hospital
Harvard Medical School
149 13th Street
Charlestown, MA 02129
Fax: +1 617 726-7422
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_fill_parc.py
Type: text/x-python
Size: 2736 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140818/2347751d/attachment.py
More information about the Mne_analysis
mailing list