<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thanks Martin and Eric,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I have not tried using some of these options (for instance subdivided octahedrons) so will play around with some of these further. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Neither have I been using cortical patch information &#8211; so I will try and get to grips with this as well.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thanks for your help, much appreciated,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Andy<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><a name="_MailEndCompose"><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></a></p><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Eric Larson [mailto:larson.eric.d@gmail.com] <br><b>Sent:</b> 11 November 2013 19:23<br><b>To:</b> Martin Luessi<br><b>Cc:</b> acgt2@cam.ac.uk; mne_analysis@nmr.mgh.harvard.edu<br><b>Subject:</b> Re: [Mne_analysis] Displaying .stc data as discreet 'hexagons' of colour on the freesurfer-generated mesh<o:p></o:p></span></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><p class=MsoNormal>Hey Andy,<o:p></o:p></p><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>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.<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>Eric<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div></div><div><p class=MsoNormal style='margin-bottom:12.0pt'><o:p>&nbsp;</o:p></p><div><p class=MsoNormal>On Mon, Nov 11, 2013 at 5:27 AM, Martin Luessi &lt;<a href="mailto:mluessi@nmr.mgh.harvard.edu" target="_blank">mluessi@nmr.mgh.harvard.edu</a>&gt; wrote:<o:p></o:p></p><p class=MsoNormal>Hi Andy,<br><br>Let me try to answer some of your questions. The problem is that the<br>source space with 10242 sources (ico-5) is created by using a subset of<br>the vertices in the full resolution FreeSurfer (FS) mesh but the number<br>of vertices in the FS mesh is subject specific. So, naturally you won't<br>get nice hexagons, as the number of vertices is not a multiple of 10242.<br><br>If you want to show patches, the &quot;--cps&quot; option when using<br>mne_setup_source_space. This will include a<br>&quot;FIFF_MNE_SOURCE_SPACE_NEAREST&quot; tag in created fiff file, which gives<br>you the closest (geodesic dist.) vertex in the 10242 mesh for every<br>vertex in the FS mesh. So you could use this information to create your<br>patches (which won't be exactly hexagonal). In the Python code, relevant<br>lines are:<br><br>a) Reading nearest from fiff file:<br><br><a href="https://github.com/mne-tools/mne-python/blob/master/mne/source_space.py#L375" target="_blank">https://github.com/mne-tools/mne-python/blob/master/mne/source_space.py#L375</a><br><br>b) Converting nearest to patches (list of neighbors in FS mesh for every<br>vertex in the 10242 mesh):<br><br><a href="https://github.com/mne-tools/mne-python/blob/master/mne/source_space.py#L88" target="_blank">https://github.com/mne-tools/mne-python/blob/master/mne/source_space.py#L88</a><br><br>I hope this helps.<br><br>Martin<o:p></o:p></p><div><p class=MsoNormal><br><br>On 11/11/13 07:57, <a href="mailto:acgt2@cam.ac.uk">acgt2@cam.ac.uk</a> wrote:<br>&gt; Hi MNE mailing-list,<br>&gt;<br>&gt; I am trying to display my .stc data (downsampled to 10242 sources) as<br>&gt; discreet &#8216;hexagons&#8217; of colour on the freesurfer-generated mesh, with<br>&gt; sharp boundaries (ie no interpolation), between each hexagon.<br>&gt;<br>&gt; (I am not doing this colouring using any of the MNE visualisation tools,<br>&gt; instead rendering the mesh and colouring vertices/faces using openGL)<br>&gt;<br>&gt; Unfortunately, although the &#8216;data-bearing&#8217; vertices are at the centre of<br>&gt; &#8216;notional&#8217; tessellating hexagons, these hexagons are not exactly<br>&gt; divisible by faces (see attached &#8211; white is the actual mesh, black the<br>&gt; &#8216;notional&#8217; hexagons, and &#8216;D&#8217; represents the data bearing vertices<br>&gt; present in the .stc file). You can see that I have problems in the<br>&gt; corners of each of the &#8216;notional&#8217; hexagons, as the black and white lines<br>&gt; don&#8217;t match.<br>&gt;<br>&gt; So a couple of questions:<br>&gt;<br>&gt; I&#8217;m guessing that this was the reason to use smoothing/blurring in<o:p></o:p></p></div><p class=MsoNormal>&gt; MNE_analyse (chapter 8.3of the manual) rather than simply having<o:p></o:p></p><div><p class=MsoNormal>&gt; discreet hexagonal patches, in as much that set at the right level, the<br>&gt; resultant colouring will always begin to approximate hexagons? Second,<br>&gt; is this mismatch between the notional hexagon and mesh faces true for<br>&gt; all resolutions (I&#8217;m pretty sure it is, but just want to check)? And<br>&gt; lastly - has anyone else wanted to display these discreet &#8216;notional&#8217;<br>&gt; hexagons and thought of a work-around?<br>&gt;<br>&gt; Thanks in advance for any thoughts,<br>&gt;<br>&gt; Andy<br>&gt;<br>&gt;<br>&gt;<o:p></o:p></p></div><p class=MsoNormal style='margin-bottom:12.0pt'>&gt; _______________________________________________<br>&gt; Mne_analysis mailing list<br>&gt; <a href="mailto:Mne_analysis@nmr.mgh.harvard.edu">Mne_analysis@nmr.mgh.harvard.edu</a><br>&gt; <a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><br>&gt;<br><br><br>--<br>Martin Luessi, Ph.D.<br><br>Research Fellow<br><br>Department of Radiology<br>Athinoula A. Martinos Center for Biomedical Imaging<br>Massachusetts General Hospital<br>Harvard Medical School<br>149 13th Street<br>Charlestown, MA 02129<br><br>Fax: <a href="tel:%2B1%20617%20726-7422">+1 617 726-7422</a><br>_______________________________________________<br>Mne_analysis mailing list<br><a href="mailto:Mne_analysis@nmr.mgh.harvard.edu">Mne_analysis@nmr.mgh.harvard.edu</a><br><a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><br><br><br>The information in this e-mail is intended only for the person to whom it is<br>addressed. If you believe this e-mail was sent to you in error and the e-mail<br>contains patient information, please contact the Partners Compliance HelpLine at<br><a href="http://www.partners.org/complianceline" target="_blank">http://www.partners.org/complianceline</a> . If the e-mail was sent to you in error<br>but does not contain patient information, please contact the sender and properly<br>dispose of the e-mail.<o:p></o:p></p></div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></div></body></html>