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

Martin Luessi mluessi at nmr.mgh.harvard.edu
Mon Nov 11 08:27:23 EST 2013
Search archives:

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



More information about the Mne_analysis mailing list