[FieldTrip] Incorporating White Matter conductivity anisotropy into FEM simbio

Ravi Mill rdm146 at newark.rutgers.edu
Mon Nov 12 17:36:29 CET 2018


Many thanks Marios and Carsten - I will try out the scripts you sent me and let you know if I have any issues.


Best wishes

Ravi


________________________________
From: Marios Antonakakis <antonakakismar at gmail.com>
Sent: Tuesday, November 6, 2018 8:21:56 AM
To: Carsten Wolters
Cc: fieldtrip at science.ru.nl; Ravi Mill
Subject: Re: [FieldTrip] Incorporating White Matter conductivity anisotropy into FEM simbio

Hi Ravi,

assuming that you work under Linux and you have already the DTI data registered to MRI, you need then to run the below script.

%%1, calculate conductivity tensor for every voxel
% mri_segmented_final, V1, ... L1 variables have ft MRI structure

                       %skin,skull compacta, skull spongiosa, CSF, GM, WM
conductivity = [0.4300,    0.0024,    0.0086,    1.7900,    0.3300,    0.1400];
cfg =[];
cfg.compartments = mri_segmented_final.anatomylabel; % anatomical labels, skin: 0, skull spongiosa 2 and show on...
cfg.conductivity = conductivity;
[condcell, s, fail] = sb_calcTensorCond_tuch(cfg,mri_segmented_final,V1,V2,V3,L1,L2,L3);

%% 2. assign the conductivity tensor with the hex mesh
[mesh.nodes,mesh.elements,mesh.labels]= read_vista_mesh('foo_mesh.v);

mask = mri_segmented_final;
mask.anatomy((mask.anatomy~=5) & (mask.anatomy~=6))=0;
mask.anatomy((mask.anatomy==5) | (mask.anatomy==6))=1;

tensors = sb_assiTensorCond(mask,mesh.nodes,mesh.elements,mesh.labels,condcell);
write_vista_mesh('foo_mesh_aniso.v',mesh.nodes,mesh.elements,mesh.labels,tensors');

Do not hesitate to ask further questions.

*Note that write_vista_mesh and read_vista_mesh are private ft functions.

Best regards,
  Marios
[https://mailfoogae.appspot.com/t?sender=aYW50b25ha2FraXNtYXJAZ21haWwuY29t&type=zerocontent&guid=420ef8db-499e-48d0-b63b-37a4d6551822]ᐧ

Στις Τρί, 6 Νοε 2018 στις 12:10 μ.μ., ο/η Carsten Wolters <carsten.wolters at uni-muenster.de<mailto:carsten.wolters at uni-muenster.de>> έγραψε:
Hi Ravi,

Marios (in CC) promised to send you the short Matlab-script that we use to transform the diffusion tensors
to conductivity tensors using Tuch's effective medium approach.

For this approach, please check e.g. the subsection
"Calibrated Finite Element Head Model and Forward Solution"
in
https://link.springer.com/article/10.1007/s10548-017-0568-9<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flink.springer.com%2Farticle%2F10.1007%2Fs10548-017-0568-9&data=02%7C01%7Crdm146%40newark.rutgers.edu%7C9546e51982124567778d08d643eb0c3f%7Cb92d2b234d35447093ff69aca6632ffe%7C1%7C0%7C636771074190746266&sdata=0V8kiAHNRSer1xqWNzPXDP4lZDk9UGk25eJzVGyasMY%3D&reserved=0>

BR
   Carsten

Am 05.11.18 um 18:26 schrieb Ravi Mill:

Hi Carsten and Johannes


Many thanks for responding, and for developing these great tools!


I'm in the process of acquiring a large diffusion MR dataset from which I can hopefully create an 'averaged' atlas. From your responses I think I have a sense of how to integrate the conductivity tensors derived from this atlas with the Fieldtrip FEM pipeline.


But I was wondering if you had any advice on how to compute these conductivity tensors in the first place? From the paper that Carsten sent, It seems like the FDT program within FSL is what I need to compute diffusion tensors from the raw diffusion images (steps 1-6 from the FDT user guide https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FDT/UserGuide#Processing_pipeline<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ffsl.fmrib.ox.ac.uk%2Ffsl%2Ffslwiki%2FFDT%2FUserGuide%23Processing_pipeline&data=02%7C01%7Crdm146%40newark.rutgers.edu%7C9546e51982124567778d08d643eb0c3f%7Cb92d2b234d35447093ff69aca6632ffe%7C1%7C0%7C636771074190756278&sdata=pMVolviUdbDljTvYcZpDYNu7qixY72mGJFgzTBk6KPQ%3D&reserved=0>)? Seemingly, these diffusion tensors need to then be converted to conductivity tensors - any advice on how to do this (or if you could point me to some example code) would be greatly appreciated.


Thanks

Ravi


FDT/UserGuide - FslWiki - University of Oxford<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ffsl.fmrib.ox.ac.uk%2Ffsl%2Ffslwiki%2FFDT%2FUserGuide%23Processing_pipeline&data=02%7C01%7Crdm146%40newark.rutgers.edu%7C9546e51982124567778d08d643eb0c3f%7Cb92d2b234d35447093ff69aca6632ffe%7C1%7C0%7C636771074190756278&sdata=pMVolviUdbDljTvYcZpDYNu7qixY72mGJFgzTBk6KPQ%3D&reserved=0>
fsl.fmrib.ox.ac.uk<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Ffsl.fmrib.ox.ac.uk&data=02%7C01%7Crdm146%40newark.rutgers.edu%7C9546e51982124567778d08d643eb0c3f%7Cb92d2b234d35447093ff69aca6632ffe%7C1%7C0%7C636771074190766286&sdata=rb%2FV95nFVCUi651UDHnXUfWTJpD%2Fu9PyVL5QerzYnEk%3D&reserved=0>
Eddy Current Correction. Eddy currents in the gradient coils induce (approximate) stretches and shears in the diffusion weighted images. These distortions are different for different gradient directions.




Thanks again
Ravi


________________________________
From: fieldtrip <fieldtrip-bounces at science.ru.nl><mailto:fieldtrip-bounces at science.ru.nl> on behalf of Johannes Vorwerk <j.vorw01 at gmail.com><mailto:j.vorw01 at gmail.com>
Sent: Monday, October 29, 2018 10:14:16 AM
To: FieldTrip discussion list
Subject: Re: [FieldTrip] Incorporating White Matter conductivity anisotropy into FEM simbio

Dear Ravi,

as Carsten already said, calculating FEM with anisotropic conductivities is not directly supported by the FieldTrip-SimBio implementation. However, if you are willing to invest a bit of time it is possible to work around this.

The „only“ thing that needs to be changed is the calculation of the FEM stiffness matrix, which is performed by the routine „calc_stiffness_matrix_val“ in the function sb_calc_stiff (usually called from ft_prepare_headmodel). The problem is that FieldTrip does not support anisotropic conductivities, so that you would have to call calc_stiffness_matrix_val directly. You can see the correct call in sb_calc_stiff. For anisotropic conductivities you have to replace the input „cond“ by a #elements x 6 matrix containing your anisotropic conductivities in the format "xx yy zz xy yz zx“. If you now follow the normal FieldTrip-SimBio workflow using the resulting stiffness matrix, you will get results for anisotropic conductivities.

Best,
Johannes

Am 29.10.2018 um 12:31 schrieb Carsten Wolters <carsten.wolters at uni-muenster.de<mailto:carsten.wolters at uni-muenster.de>>:

Dear Ravi,

1) You can use the pure SimBio-code from
https://www.mrt.uni-jena.de/simbio/index.php/Main_Page<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.mrt.uni-jena.de%2Fsimbio%2Findex.php%2FMain_Page&data=02%7C01%7Crdm146%40newark.rutgers.edu%7C9546e51982124567778d08d643eb0c3f%7Cb92d2b234d35447093ff69aca6632ffe%7C1%7C0%7C636771074190776294&sdata=rlLOQYHDMLXgHD3OI023GbYYBFdrfc1vhw80FMrxysg%3D&reserved=0>
to treat WM anisotropy.
While it would in principle also be possible to use anisotropic conductivities with FieldTrip-SimBio,
this is currently not implemented using ft_prepare_headmodel. Johannes (in CC), who implemented
Fieldtrip-SimBio, answered a same question by Junjie Wu in March 2018:
"Depending on your matlab skills and your available time, I could help you to give it a
try though. It should be possible with using some direct function calls instead of the high-level fieldtrip-functions."

2) We recommend
http://www.sci.utah.edu/~wolters/PaperWolters/2012/RuthottoEtAl_PhysMedBiol_2012.pdf<https://na01.safelinks.protection.outlook.com/?url=http:%2F%2Fwww.sci.utah.edu%2F~wolters%2FPaperWolters%2F2012%2FRuthottoEtAl_PhysMedBiol_2012.pdf&data=02%7C01%7Crdm146%40newark.rutgers.edu%7C9546e51982124567778d08d643eb0c3f%7Cb92d2b234d35447093ff69aca6632ffe%7C1%7C0%7C636771074190776294&sdata=NwqVxmn1XFHEMKNFih%2FyGKqzOxuc09l4q%2Fzo6oPKFz4%3D&reserved=0>
on individual data. I could imagine that an atlas does a reasonable job w.r.t. the main
bigger fiber tracts such as corpus callosum or pyramidal tracts, but that the finer details
in the cortices are individual. We always measure T1, T2 and DTI from each subject
and I personally do not have experience with such a group-level anisotropy compared
to the individual one. Might be interesting to hear from others what they think!?

BR
   Carsten



Am 25.10.18 um 23:05 schrieb Ravi Mill:
Dear Fieldtrippers

I have applied the FEM simbio head modeling pipeline implemented in Fieldtrip to my EEG data. My understanding is that this pipeline assumes isotropic conductivities for 5 head compartments (as specified by cfg.conductivity in ft_prepare_headmodel). After reading some papers (e.g. Vorwerk et al 2014 https://doi.org/10.1016/j.neuroimage.2014.06.040<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1016%2Fj.neuroimage.2014.06.040&data=02%7C01%7Crdm146%40newark.rutgers.edu%7C9546e51982124567778d08d643eb0c3f%7Cb92d2b234d35447093ff69aca6632ffe%7C1%7C0%7C636771074190786303&sdata=uzIHxDZ985MawVWXs3wIEPKQzflY8K45fheAeVamaEo%3D&reserved=0>), it seems like incorporating white matter conductivity anisotropy has a relatively small albeit significant effect on the source solution. I am interested in comparing FEM results when treating white matter as anisotropic. My questions are as follows:


  1.  Is there a way to implement the FEM simbio head model whilst treating WM as anisotropic within Fieldtrip? If so, how would one do this (or are there any resources available that demonstrate this)?
  2.  From previous papers and some simbio documentation (https://www.mrt.uni-jena.de/simbio/index.php/SIMBIO/Releasenotes/Examples<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.mrt.uni-jena.de%2Fsimbio%2Findex.php%2FSIMBIO%2FReleasenotes%2FExamples&data=02%7C01%7Crdm146%40newark.rutgers.edu%7C9546e51982124567778d08d643eb0c3f%7Cb92d2b234d35447093ff69aca6632ffe%7C1%7C0%7C636771074190796311&sdata=%2BnHcr2pce3FTYJhfLl21L1UuybVN9M0X8I%2BjvidmwAI%3D&reserved=0>) it seems like diffusion MRI data is required to calculate the WM conductivity for each individual subject. I only have T1 and T2 scans for my subjects. So would it be possible to use WM anisotropic information obtained from some kind of diffusion MRI group average/atlas instead (accepting some loss in subject-level precision)? If so, does such a group average/atlas exist?

Any help would be greatly appreciated!

Thanks
Ravi






_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=02%7C01%7Crdm146%40newark.rutgers.edu%7C9546e51982124567778d08d643eb0c3f%7Cb92d2b234d35447093ff69aca6632ffe%7C1%7C0%7C636771074190806319&sdata=gVXshPpBrk%2FbnsFY1LD%2BJWmlPe3Pj0WiLn%2B0IE3%2B%2Brs%3D&reserved=0>
https://doi.org/10.1371/journal.pcbi.1002202<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=02%7C01%7Crdm146%40newark.rutgers.edu%7C9546e51982124567778d08d643eb0c3f%7Cb92d2b234d35447093ff69aca6632ffe%7C1%7C0%7C636771074190806319&sdata=1si880uY0ryxYWodLlZ3QHLQhtFiEurIZdWmZgHnE90%3D&reserved=0>




--
Prof. Dr.rer.nat. Carsten H. Wolters
University of Münster
Institute for Biomagnetism and Biosignalanalysis
Malmedyweg 15
48149 Münster, Germany

Phone:
+49 (0)251 83 56904
+49 (0)251 83 56865 (secr.)

Fax:
+49 (0)251 83 56874

Email: carsten.wolters at uni-muenster.de<mailto:carsten.wolters at uni-muenster.de>
Web: https://campus.uni-muenster.de/biomag/das-institut/mitarbeiter/carsten-wolters/<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcampus.uni-muenster.de%2Fbiomag%2Fdas-institut%2Fmitarbeiter%2Fcarsten-wolters%2F&data=02%7C01%7Crdm146%40newark.rutgers.edu%7C9546e51982124567778d08d643eb0c3f%7Cb92d2b234d35447093ff69aca6632ffe%7C1%7C0%7C636771074190816327&sdata=nSKW70cIZRqhjpSqwitcFCGEM%2B14FMhN6j9iF2zd7wM%3D&reserved=0>




_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=02%7C01%7Crdm146%40newark.rutgers.edu%7C9546e51982124567778d08d643eb0c3f%7Cb92d2b234d35447093ff69aca6632ffe%7C1%7C0%7C636771074190826335&sdata=N%2FLAR%2Fs%2FBMd5yYn18AOTutnKdGieWSENcbsk7HvgArI%3D&reserved=0>
https://doi.org/10.1371/journal.pcbi.1002202<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=02%7C01%7Crdm146%40newark.rutgers.edu%7C9546e51982124567778d08d643eb0c3f%7Cb92d2b234d35447093ff69aca6632ffe%7C1%7C0%7C636771074190826335&sdata=ZaMLdeDD0abJhf6LVW9tkPGpuqHeH7naBVmUb8kP3nE%3D&reserved=0>




--
Prof. Dr.rer.nat. Carsten H. Wolters
University of Münster
Institute for Biomagnetism and Biosignalanalysis
Malmedyweg 15
48149 Münster, Germany

Phone:
+49 (0)251 83 56904
+49 (0)251 83 56865 (secr.)

Fax:
+49 (0)251 83 56874

Email: carsten.wolters at uni-muenster.de<mailto:carsten.wolters at uni-muenster.de>
Web: https://campus.uni-muenster.de/biomag/das-institut/mitarbeiter/carsten-wolters/<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcampus.uni-muenster.de%2Fbiomag%2Fdas-institut%2Fmitarbeiter%2Fcarsten-wolters%2F&data=02%7C01%7Crdm146%40newark.rutgers.edu%7C9546e51982124567778d08d643eb0c3f%7Cb92d2b234d35447093ff69aca6632ffe%7C1%7C0%7C636771074190836344&sdata=A497DY4xuuXNPgmDXLZLNwnY%2BxdSJaOcXYY%2BEeCdcps%3D&reserved=0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20181112/20bf6495/attachment-0001.html>


More information about the fieldtrip mailing list