[Mne_analysis] Displaying .stc data as discreet 'hexagons' of colour on the freesurfer-generated mesh

Eric Larson larson.eric.d at gmail.com
Mon Nov 11 14:22:36 EST 2013
Search archives:

Hey Andy,

The underlying source space definitions use triangulations -- you could try
looking at `use_tris` for `ico` or `oct` source spaces. I /think/ that
would give you triangulations with 10242 vertices (for ico-5 at least) that
you could plot directly with OpenGL. In any case, the ico and oct source
space generation code is now available in mne-python, so you might want to
take a look at how that works to see if it otherwise contains the
information you need.

Eric



On Mon, Nov 11, 2013 at 5:27 AM, Martin Luessi
<mluessi at nmr.mgh.harvard.edu>wrote:

> Hi Andy,
>
> Let me try to answer some of your questions. The problem is that the
> source space with 10242 sources (ico-5) is created by using a subset of
> the vertices in the full resolution FreeSurfer (FS) mesh but the number
> of vertices in the FS mesh is subject specific. So, naturally you won't
> get nice hexagons, as the number of vertices is not a multiple of 10242.
>
> If you want to show patches, the "--cps" option when using
> mne_setup_source_space. This will include a
> "FIFF_MNE_SOURCE_SPACE_NEAREST" tag in created fiff file, which gives
> you the closest (geodesic dist.) vertex in the 10242 mesh for every
> vertex in the FS mesh. So you could use this information to create your
> patches (which won't be exactly hexagonal). In the Python code, relevant
> lines are:
>
> a) Reading nearest from fiff file:
>
>
> https://github.com/mne-tools/mne-python/blob/master/mne/source_space.py#L375
>
> b) Converting nearest to patches (list of neighbors in FS mesh for every
> vertex in the 10242 mesh):
>
> https://github.com/mne-tools/mne-python/blob/master/mne/source_space.py#L88
>
> I hope this helps.
>
> Martin
>
>
> On 11/11/13 07:57, acgt2 at cam.ac.uk wrote:
> > Hi MNE mailing-list,
> >
> > I am trying to display my .stc data (downsampled to 10242 sources) as
> > discreet ‘hexagons’ of colour on the freesurfer-generated mesh, with
> > sharp boundaries (ie no interpolation), between each hexagon.
> >
> > (I am not doing this colouring using any of the MNE visualisation tools,
> > instead rendering the mesh and colouring vertices/faces using openGL)
> >
> > Unfortunately, although the ‘data-bearing’ vertices are at the centre of
> > ‘notional’ tessellating hexagons, these hexagons are not exactly
> > divisible by faces (see attached – white is the actual mesh, black the
> > ‘notional’ hexagons, and ‘D’ represents the data bearing vertices
> > present in the .stc file). You can see that I have problems in the
> > corners of each of the ‘notional’ hexagons, as the black and white lines
> > don’t match.
> >
> > So a couple of questions:
> >
> > I’m guessing that this was the reason to use smoothing/blurring in
> > MNE_analyse (chapter 8.3of the manual) rather than simply having
> > discreet hexagonal patches, in as much that set at the right level, the
> > resultant colouring will always begin to approximate hexagons? Second,
> > is this mismatch between the notional hexagon and mesh faces true for
> > all resolutions (I’m pretty sure it is, but just want to check)? And
> > lastly - has anyone else wanted to display these discreet ‘notional’
> > hexagons and thought of a work-around?
> >
> > Thanks in advance for any thoughts,
> >
> > Andy
> >
> >
> >
> > _______________________________________________
> > 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
> _______________________________________________
> 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/20131111/ecea91a5/attachment.html 


More information about the Mne_analysis mailing list