[FieldTrip] tetra for source model and head model

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Wed Nov 4 08:48:30 CET 2020


Dear John,

This all looks like a good change. Normally I’d have asked to send us this code change as a PR to github.

But, as a matter of fact, the current version in the code already seems to have this in place (https://github.com/fieldtrip/fieldtrip/blob/master/private/prepare_mesh_tetrahedral.m). I’d recommend to upgrade to a more recent version of FieldTrip, and verify whether it works for you.

Best wishes,
Jan-Mathijs




On 3 Nov 2020, at 23:23, RICHARDS, JOHN <RICHARDS at mailbox.sc.edu<mailto:RICHARDS at mailbox.sc.edu>> wrote:

Hi all.

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.

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:

labels = mesh.labels;
mesh = rmfield(mesh, 'labels');

mesh.tissue = zeros(size(labels));
numlabels = size(unique(labels), 1);
mesh.tissuelabel = {};
ulabel = sort(unique(labels));
for i = 1:numlabels
  mesh.tissue(labels == ulabel(i)) = i;
  mesh.tissuelabel{i} = tissue{i};
end

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.
%JER add this for tissue and tissuelabel
[newelem evol]=meshreorient(node(:,1:3),elem(:,1:4));
elem(:,1:4)=newelem;
mesh.tet = elem(:,1:4);
mesh.tissue=elem(:,5);
mesh.tissuelabel=cfg.tissue;


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
Hex source model and hex head model
Hex source model and tet head model
Tet source model and hex head model
Tet source model and tet head model

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.

John

***********************************************
John E. Richards
Carolina Distinguished Professor
Department of Psychology
University of South Carolina
Columbia, SC  29208
Dept Phone: 803 777 2079
Fax: 803 777 9558
Email: richards-john at sc.edu<mailto:richards-john at sc.edu>
https://jerlab.sc.edu<https://jerlab.sc.edu/>
*************************************************


_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20201104/4a25189a/attachment.htm>


More information about the fieldtrip mailing list