<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 15 (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:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
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-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi all.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have been working on a tetrahedral source model, and head model.  The reason for the source model is that we have infant participants and use the gm segment as the brain part for the source model.  Our GM has “limbs” that are fairly narrow,
 like 1 to 3 mm.    We use a 2mm grid which results in nearly 50K source locations and even then the limbs are poorly covered.  Typical source models are 10mm or greater, and this misses large areas of GM.  So, I used the iso2mesh with cgalsurf (or cgalmesh)
 to create [node face elem}, and create .pos based on the node(s).  I also either create the other parts of the grid by scratch (dim, xvalues yvalues zvaluse inside), or use a grid based on a head mask to get the pos and other, and then change the inside to
 match the locations of the node(s).  This works and gives better coverage.  I can tune the iso2mesh to have 20k to 60k source dipoles.  These are “sort of large” quantities of source models, but we have a linux cluster with very large mem nodes.  I would be
 glad to share the code.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I also have worked on the tetrahedral mesh for the head model.  We use FEM models with the simbio external module.  The ft_prepare_headmodel will do “hex” or “tetra” head models for simbio.  The ft_prepare_mesh will use “tetrahedral” as
 the mesh, but “prepare_mesh_tetrahedral” does not add the tissue and tissuelabel members, so the ft_prepare_headmodel crashes.  The “prepare_mesh_hexahedral” includes the following code for these:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">labels = mesh.labels;<o:p></o:p></p>
<p class="MsoNormal">mesh = rmfield(mesh, 'labels');<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">mesh.tissue = zeros(size(labels));<o:p></o:p></p>
<p class="MsoNormal">numlabels = size(unique(labels), 1);<o:p></o:p></p>
<p class="MsoNormal">mesh.tissuelabel = {};<o:p></o:p></p>
<p class="MsoNormal">ulabel = sort(unique(labels));<o:p></o:p></p>
<p class="MsoNormal">for i = 1:numlabels<o:p></o:p></p>
<p class="MsoNormal">  mesh.tissue(labels == ulabel(i)) = i;<o:p></o:p></p>
<p class="MsoNormal">  mesh.tissuelabel{i} = tissue{i};<o:p></o:p></p>
<p class="MsoNormal">end<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I think these could be added to the prepare_mesh_tetrahedral.  I added the following code to it.  The prepare_mesh_tet..  uses the iso2mesh and node, elem, and face are returned.  The “reorient” is due to simbio complaining to reorient
 the tetra columns.  I might compare this to the code above to see if it works.<o:p></o:p></p>
<p class="MsoNormal">%JER add this for tissue and tissuelabel<o:p></o:p></p>
<p class="MsoNormal">[newelem evol]=meshreorient(node(:,1:3),elem(:,1:4));<o:p></o:p></p>
<p class="MsoNormal">elem(:,1:4)=newelem;<o:p></o:p></p>
<p class="MsoNormal">mesh.tet = elem(:,1:4);<o:p></o:p></p>
<p class="MsoNormal">mesh.tissue=elem(:,5);<o:p></o:p></p>
<p class="MsoNormal">mesh.tissuelabel=cfg.tissue;<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">All of these “work”, e.g., they create reasonable files and the ft_prepare_headmodel gives a reasonable struct and files.   We will try these with some empirical data to compare<o:p></o:p></p>
<p class="MsoNormal">Hex source model and hex head model<o:p></o:p></p>
<p class="MsoNormal">Hex source model and tet head model<o:p></o:p></p>
<p class="MsoNormal">Tet source model and hex head model<o:p></o:p></p>
<p class="MsoNormal">Tet source model and tet head model<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The motivation for doing the tet head model over the hex model is that the tet is known to work better with small areas nested in other areas, better than the hex.  We use full FEM segmented head models with 10 elements and have a lot of
 twists and turns, small areas with limbs or small encapsulated media areas, etc.  I am pretty sure with our segmented heads that  it could easily be shown the tetra model does better than the hex model.  I suspect this will not have extensive effects on the
 source reconstruction results but use the best method possible.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">John<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas;color:black">***********************************************<br>
John E. Richards<br>
Carolina Distinguished Professor<br>
Department of Psychology<br>
University of South Carolina<br>
Columbia, SC  29208<br>
Dept Phone: 803 777 2079<br>
Fax: 803 777 9558<br>
Email: </span><a href="mailto:richards-john@sc.edu"><span style="font-size:10.0pt;font-family:Consolas;color:#0563C1">richards-john@sc.edu</span></a><u><span style="font-size:10.0pt;font-family:Consolas;color:blue"><br>
</span></u><span style="font-size:10.0pt;font-family:Consolas;color:black">https://jerlab.sc.edu<br>
*************************************************<br>
<br>
</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>