[FieldTrip] fieldtrip Digest, Vol 120, Issue 3

RICHARDS, JOHN RICHARDS at mailbox.sc.edu
Wed Nov 4 13:43:08 CET 2020


Jan-Mathijs

Thanks for the update.  I have the May 2020 version, this looks like it was updated in July 2020.  I'll upload the latest version and check.

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
https://jerlab.sc.edu
*************************************************


-----Original Message-----
From: fieldtrip <fieldtrip-bounces at science.ru.nl> On Behalf Of fieldtrip-request at science.ru.nl
Sent: Wednesday, November 4, 2020 6:00 AM
To: fieldtrip at science.ru.nl
Subject: fieldtrip Digest, Vol 120, Issue 3

Send fieldtrip mailing list submissions to
	fieldtrip at science.ru.nl

To subscribe or unsubscribe via the World Wide Web, visit
	https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
or, via email, send a message with subject or body 'help' to
	fieldtrip-request at science.ru.nl

You can reach the person managing the list at
	fieldtrip-owner at science.ru.nl

When replying, please edit your Subject line so it is more specific than "Re: Contents of fieldtrip digest..."


Today's Topics:

   1. tetra for source model and head model (RICHARDS, JOHN)
   2. Re: tetra for source model and head model
      (Schoffelen, J.M. (Jan Mathijs))


----------------------------------------------------------------------

Message: 1
Date: Tue, 3 Nov 2020 22:23:41 +0000
From: "RICHARDS, JOHN" <RICHARDS at mailbox.sc.edu>
To: FieldTrip discussion list <fieldtrip at science.ru.nl>
Subject: [FieldTrip] tetra for source model and head model
Message-ID:
	<MN2PR19MB294497A9FB13B172AE8EFDB6F6110 at MN2PR19MB2944.namprd19.prod.outlook.com>
	
Content-Type: text/plain; charset="utf-8"

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
*************************************************


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20201103/2bd9bd33/attachment-0001.htm>

------------------------------

Message: 2
Date: Wed, 4 Nov 2020 07:48:30 +0000
From: "Schoffelen, J.M. (Jan Mathijs)" <jan.schoffelen at donders.ru.nl>
To: FieldTrip discussion list <fieldtrip at science.ru.nl>
Subject: Re: [FieldTrip] tetra for source model and head model
Message-ID: <2101F7C2-4191-4850-B46F-04F438E4D0FE at donders.ru.nl>
Content-Type: text/plain; charset="utf-8"

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://protect2.fireeye.com/v1/url?k=6cc55fff-335e672c-6cc5113e-86d3f8f67bce-d5f21a2832ac511e&q=1&e=c2d660d7-d8da-42b9-a1a6-e6113c1478ec&u=https%3A%2F%2Fgithub.com%2Ffieldtrip%2Ffieldtrip%2Fblob%2Fmaster%2Fprivate%2Fprepare_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-0001.htm>

------------------------------

Subject: Digest Footer

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


------------------------------

End of fieldtrip Digest, Vol 120, Issue 3
*****************************************



More information about the fieldtrip mailing list