2943
Comment:
|
10480
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
= Realistic head model: FEM with Duneuro = ''Authors: Takfarinas MEDANI,'' |
= Realistic head model: FEM with DUNEuro = '''[TUTORIAL UNDER DEVELOPMENT: NOT READY FOR PUBLIC USE]''' |
Line 4: | Line 4: |
This forward model uses a finite element element method (FEM) and was developed by the '''...(l''''''ink)'''. It uses the volume mesh of the realistic head model. The goal of this forward solution is mostly for '''EEG users''', to provide more accurate results than the spherical models and more complex geometry than the BEM. It is not necessary for MEG users, as the "overlapping spheres" method gives similar results but much faster. This method is illustrated using the tutorial [[http://neuroimage.usc.edu/brainstorm/Tutorials/Epilepsy|EEG and epilepsy]] or similar data ('''todo'''). | ''Authors: Takfarinas Medani '' |
Line 6: | Line 6: |
refe to these point : http://duneuro.org/ | This tutorial explains how to use brainstorm-dueneuro to compute the head model using the finite element method (FEM). |
Line 8: | Line 8: |
and to the documentation from here : | This forward model uses the FEM method implemented within the [[http://duneuro.org/|Duneuro]] software. More documentation could be found on this [[https://gitlab.dune-project.org/duneuro/duneuro/wikis/home|gitlab page]]. |
Line 10: | Line 10: |
https://gitlab.dune-project.org/duneuro/duneuro/wikis/home | The FEM methods use the realistic volume mesh of the head model generated from the segmentation of the magnetic resonance images (MRI). The FEM forward solution provides more accurate results than the spherical models and more realistic geometry and tissue propriety than the BEM. |
Line 12: | Line 12: |
Here we will describe the FEM and run some examples | ''In this tutorial, we will describe the software required to use the DUNEuro computation from brainstorm and examples on the FEM computation through the graphical interface. '' |
Line 14: | Line 14: |
== Duneuro == duneuro is an open-source C++ software library for solving partial differential equations in neurosciences using mesh bases methods. It is based on the DUNE library and its main features include solving the electroencephalography (EEG) and magnetoencephalography (MEG) forward problem and providing simulations for brain stimulation. |
== DUNEuro == [[http://duneuro.org/|DUNEuro]] is an open-source C++ software library for solving partial differential equations (PDE) in neurosciences using mesh bases methods. It is based on the [[https://www.dune-project.org/|DUNE library]] and its main features that include solving the electroencephalography (EEG) and magnetoencephalography (MEG) forward problem and providing simulations for brain stimulation. <<BR>> {{attachment:duneuroFromDune.JPG||height="240",width="700"}} <<BR>> |
Line 17: | Line 17: |
== Citing DUNEuro == Please cite the following papers if you use this software tool or its derivatives in your own work. Andreas Nüßing, Maria Carla Piastra, Sophie Schrader, Tuuli Miinalainen, Sampsa Pursiainen, Heinrich Brinck, Carsten H. Wolters, Christian Engwer ''"duneuro - A software toolbox for forward modeling in neuroscience"'' under review ''"The Brainstrom-Duneuro: friendly interface for the EEG/MEG with the Finite Element Method"'' underwriting == Software requirements == === FEM Computation : DUNEuro === In order to use the FEM computation, Brainstorm calls the DUNEuro Th DUNEuro binaries are distributed within the [[https://github.com/brainstorm-tools/bst-duneuro|bst-duneuro toolbox]]. These binaries are adapted and tested for Windows, MAC, and Linux 64bit systems. Therefore you don't need to install any extra software package to run the FEM computation, brainstorm will do it for you''' '''and install it in Brainstorm user folder (~username/.brainstorm/bst-duneuro/) === FEM mesh : software and toolbox === In order to use the FEM computation of the electromagnetic field (EEG/MEG), the volume mesh of the head is required. Brainstorm integrates most of the modern open-source tools used to generate realistic head mesh, either from nested surface mesh or from individual MR image (T1 or T1 and T2). The minimal requirement for FEM mesh generation is the [[http://iso2mesh.sourceforge.net/cgi-bin/index.cgi?Download|iso2mesh]] toolbox. For advanced mesh, the list of the available methods are listed and explained in [[https://neuroimage.usc.edu/brainstorm/meshGeneration#preview|this tutorial]]. New methods are under development and will be released to brainstorm in the next future. The FEM mesh visualization and mesh processing option are integrated with brainstorm. The use of these options requires also the installation of the [[http://iso2mesh.sourceforge.net/cgi-bin/index.cgi?Download|iso2mesh]]. Brainstrom will download the last release from this [[https://neuroimage.usc.edu/brainstorm/http://iso2mesh.sourceforge.net/cgi-bin/index.cgi?Download|webpage]] and install it when it is needed. However, you can also download the iso2mesh from the [[https://github.com/fangq/iso2mesh|github]] and add it to your Matlab path. === FEM and tissue anisotropy : Brainsuite === Among the advantages of the FEM, the use of tissue anisotropy (conductivity). The estimation of the tissue anisotropy is performed with the Brainsuite diffusion pipeline (BDP '''link'''). The diffusion tensor images are estimated with Brainsuite and then converted to conductivity tensor using the '''Tuch '''. In order to use this option, you need to install Brainsuite software, the rest of the process is distributed within bst-duneuro.<<BR>>'''<<TAG(Advanced)>>''' <<BR>> * DUNEuro software is built on top of the DUNE Library. The Duneuro [[https://gitlab.dune-project.org/duneuro/duneuro|source code]] works only on Linux operating systems. However, we were able to generate the binaries for the main platforms (Windows 64, Linux and Mac), thus, it can be easily used from brainstorm and Matlab without the need to install and compile the tedious Dune and Duneuro libraries on your computer. * The main process of the Duneuro compilation used for brainstorm is explained [[https://github.com/brainstorm-tools/bst-duneuro|here]] * When you use any options related to the FEM computation, brainstrom will download and install the [[https://github.com/brainstorm-tools/bst-duneuro|bst-duneuro toolbox]] and all the related toolbox on your computer (iso2mesh, brain2mesh ...). * The [[https://simnibs.github.io/simnibs/build/html/documentation/documentation.html|SimNibs]] (for FEM mesh generation from MR images) and [[http://brainsuite.org/|Brainsuite]] (for anisotropy tensor estimation from DWI) should be installed manually on the user's computer. == FEM head model == === Volume mesh generation === The basic model is the three realistic layers extracted from the subject's MRI (scalp, inner skull, outer skull), plus the source space (cortical surface). The process of the generation of these surfaces is interactively integrated with brainstorm. In the case you do not have any way to calculate the inner skull and outer skull surfaces, Brainstorm can generate rough approximations based on the subject's cortex and head surfaces and ICBM152's inner and outer skull surfaces. The surfaces created with Brainstorm are by construction non-intersecting. Thus, from these surfaces, you can generate the FEM mesh. Right-click on the subject and then "Generate FEM Mesh", then select the 'iso2mesh' method with the option "MergMesh". Keep the default values for the mesh resolution option (for more documentation please visite iso2mesh [[http://iso2mesh.sourceforge.net/cgi-bin/index.cgi?Doc/FunctionList|webpage]]). {{attachment:fem_mesh_generation.JPG||height="300",width="230"}} {{attachment:meshMethods.JPG||height="300",width="230"}} {{attachment:iso2meshMergeMethodOptions.JPG||height="200",width="200"}} The other mesh generation's methods are explained on this [[https://neuroimage.usc.edu/brainstorm/meshGeneration#preview|tutorial]]. === Volume mesh visualisation === In this tutorial, we use the ICBM head model template distributed with brainstorm. When the mesh generation is correctly completed, a new node will appear on the anatomy window. <<BR>> {{attachment:view_default_subject.JPG||height="140",width="200"}} Brainstorm offers also an interactive option to display FEM mesh. The following figure represents the surface mesh on the left (inner, outer and head) and the obtained FEM mesh on the right. {{attachment:dispIcbmMesh.JPG||height="300",width="580"}} <<BR>> <<BR>>'''<<TAG(Advanced)>>''' <<BR>> If intersections are present on the surfaces, the iso2mesh FEM mesh generation fails and an error will be displayed on the screen. If you face this problem, you need to check the surfaces and/or regenerate new surfaces from the MRI. If you still want to use the intersecting surfaces, you can try with the "MergSurf" option. This option will correct the intersection and create new nodes and elements. We do not recommend to use these models for EEG/MEG forward head computation. This is a research topic and it's still under investigation by the FEM communities. == FEM Forward model == To compute the forward model (Gain Matrix) with the FEM method, we assume that you have folowed the introduction tutorials and all the relative data are available(channels files, ...). first,on the anatomy view, you need to select the head model. In the case where you have multiple models, brainstorm uses the model with the name is displayed on green color. You need also to select the cortex to use as the source space. <<BR>> {{attachment:femNode.JPG||height="200",width="250"}} {{attachment:modelAndCortex.JPG||height="350",width="300"}} <<BR>> Then, switch to the view "Functional data (sorted by subjects)", 2nd button above the database explore. Right-click on the subject > '''Compute head model'''. Select '''DUNEuro '''FEM in the list. {{attachment:ComputeHeadModelDuneuro.JPG||height="350",width="420"}} <<BR>> The combined EEG/MEG is possible, and you can mixe between the available methods. A panel (full list of options) related to DUNEuro are displayed and you have the possibilities to change them. At this level we recommend you to use the default values. For advanced users, more details will be aded in this '''''page.''''' Explanations of the options: * DUNEuro options : If the FEM is not familiar to you, we recommend you to use the default option. The advanced options gives you the possibility to change the FEM source model, parameter of the sources and also a set of option related to the FEM method ('''''page'''''). * FEM''' conductivities''': brainstorm detects automatiquely the number of layers and assigne the default isotropic value for each layer. You can change these value according to you model. * You can select how many layers you want to use for the '''FEM''' model. The possible options is related to the number of layer on the FEM model. In our case are Scalp (=head), Skull (=outer skull), and Brain (=inner skull). * For EEG: Use all the layers * For MEG: You can use only the inner layers (here brain) * For SEEG : Only the inner (WM) * For ECOG : only the inner layers Then the calculation of the head model will automatically start. You may wait for a very long time. Be patient, it's worth it... == Additional documentation == |
|
Line 19: | Line 105: |
== Requirements == Duneuro is build on top of DUNE Library, at this time (sept 2019) these libraries work only on Linux systems. However we are able to run generate binaries for windows and can be easily used from Matlab for all platforms. |
https://www.dune-project.org/ |
Line 22: | Line 107: |
However if you want to use the source code of Duneuro you can visite: http://duneuro.org/ | https://simnibs.github.io/simnibs/build/html/index.html |
Line 24: | Line 109: |
We also put here : | https://simnibs.github.io/simnibs/build/html/documentation/command_line/headreco.html |
Line 26: | Line 111: |
The main steps you need in order to compile for windows are listed here : | https://github.com/brainstorm-tools/bst-duneuro/issues/1 |
Line 28: | Line 113: |
https://github.com/svdecomposer/brainstorm-duneuro | https://github.com/brainstorm-tools/brainstorm3/issues/242 |
Line 30: | Line 115: |
We distribute the binary files for Windows/Ubunto 64bit systems, you don't need to installan extra Microsoft software package to run '''Duneuro''' . Microsoft Visual C++ 2010 Redistributable Package (x64). == FEM surfaces / Volume generation == === Volume generation from surface files === In this part you can generate your FEM mesh from surfaces that you can get fron the segmentation software (brainSuite, FreeSurfer ....). This process will - merge the surfaces, - check the self intersecting - fixe the size of the mesh - generate the volum mesh - visual checking ... - TODO : may be we can add some mesh auqlity measures ?? === Volume generation from T1 MRI data === === Head model based on the level set approach === == Forward model == === Head model === Number of layers, conductivity value, === Electrode model === Check the position of the electrodes and align to the head model (projection if needed) === Source model === === Advanced paramaters === == Additional documentation == == Reported Errors & alternative solution == '''<<TAG(Advanced)>>''' == The MEEG forward problem with the FEM == == License == == Reference == |
https://github.com/brainstorm-tools/brainstorm3/issues/185 |
Realistic head model: FEM with DUNEuro
[TUTORIAL UNDER DEVELOPMENT: NOT READY FOR PUBLIC USE]
Authors: Takfarinas Medani
This tutorial explains how to use brainstorm-dueneuro to compute the head model using the finite element method (FEM).
This forward model uses the FEM method implemented within the Duneuro software. More documentation could be found on this gitlab page.
The FEM methods use the realistic volume mesh of the head model generated from the segmentation of the magnetic resonance images (MRI). The FEM forward solution provides more accurate results than the spherical models and more realistic geometry and tissue propriety than the BEM.
In this tutorial, we will describe the software required to use the DUNEuro computation from brainstorm and examples on the FEM computation through the graphical interface.
DUNEuro
DUNEuro is an open-source C++ software library for solving partial differential equations (PDE) in neurosciences using mesh bases methods. It is based on the DUNE library and its main features that include solving the electroencephalography (EEG) and magnetoencephalography (MEG) forward problem and providing simulations for brain stimulation.
Citing DUNEuro
Please cite the following papers if you use this software tool or its derivatives in your own work.
Andreas Nüßing, Maria Carla Piastra, Sophie Schrader, Tuuli Miinalainen, Sampsa Pursiainen, Heinrich Brinck, Carsten H. Wolters, Christian Engwer
"duneuro - A software toolbox for forward modeling in neuroscience" under review
"The Brainstrom-Duneuro: friendly interface for the EEG/MEG with the Finite Element Method"
underwriting
Software requirements
FEM Computation : DUNEuro
In order to use the FEM computation, Brainstorm calls the DUNEuro Th DUNEuro binaries are distributed within the bst-duneuro toolbox. These binaries are adapted and tested for Windows, MAC, and Linux 64bit systems. Therefore you don't need to install any extra software package to run the FEM computation, brainstorm will do it for you and install it in Brainstorm user folder (~username/.brainstorm/bst-duneuro/)
FEM mesh : software and toolbox
In order to use the FEM computation of the electromagnetic field (EEG/MEG), the volume mesh of the head is required. Brainstorm integrates most of the modern open-source tools used to generate realistic head mesh, either from nested surface mesh or from individual MR image (T1 or T1 and T2).
The minimal requirement for FEM mesh generation is the iso2mesh toolbox. For advanced mesh, the list of the available methods are listed and explained in this tutorial.
New methods are under development and will be released to brainstorm in the next future.
The FEM mesh visualization and mesh processing option are integrated with brainstorm. The use of these options requires also the installation of the iso2mesh.
Brainstrom will download the last release from this webpage and install it when it is needed. However, you can also download the iso2mesh from the github and add it to your Matlab path.
FEM and tissue anisotropy : Brainsuite
Among the advantages of the FEM, the use of tissue anisotropy (conductivity). The estimation of the tissue anisotropy is performed with the Brainsuite diffusion pipeline (BDP link). The diffusion tensor images are estimated with Brainsuite and then converted to conductivity tensor using the Tuch . In order to use this option, you need to install Brainsuite software, the rest of the process is distributed within bst-duneuro.
DUNEuro software is built on top of the DUNE Library. The Duneuro source code works only on Linux operating systems. However, we were able to generate the binaries for the main platforms (Windows 64, Linux and Mac), thus, it can be easily used from brainstorm and Matlab without the need to install and compile the tedious Dune and Duneuro libraries on your computer.
The main process of the Duneuro compilation used for brainstorm is explained here
When you use any options related to the FEM computation, brainstrom will download and install the bst-duneuro toolbox and all the related toolbox on your computer (iso2mesh, brain2mesh ...).
The SimNibs (for FEM mesh generation from MR images) and Brainsuite (for anisotropy tensor estimation from DWI) should be installed manually on the user's computer.
FEM head model
Volume mesh generation
The basic model is the three realistic layers extracted from the subject's MRI (scalp, inner skull, outer skull), plus the source space (cortical surface). The process of the generation of these surfaces is interactively integrated with brainstorm. In the case you do not have any way to calculate the inner skull and outer skull surfaces, Brainstorm can generate rough approximations based on the subject's cortex and head surfaces and ICBM152's inner and outer skull surfaces. The surfaces created with Brainstorm are by construction non-intersecting. Thus, from these surfaces, you can generate the FEM mesh.
Right-click on the subject and then "Generate FEM Mesh", then select the 'iso2mesh' method with the option "MergMesh". Keep the default values for the mesh resolution option (for more documentation please visite iso2mesh webpage).
The other mesh generation's methods are explained on this tutorial.
Volume mesh visualisation
In this tutorial, we use the ICBM head model template distributed with brainstorm. When the mesh generation is correctly completed, a new node will appear on the anatomy window.
Brainstorm offers also an interactive option to display FEM mesh. The following figure represents the surface mesh on the left (inner, outer and head) and the obtained FEM mesh on the right.
If intersections are present on the surfaces, the iso2mesh FEM mesh generation fails and an error will be displayed on the screen. If you face this problem, you need to check the surfaces and/or regenerate new surfaces from the MRI.
If you still want to use the intersecting surfaces, you can try with the "MergSurf" option. This option will correct the intersection and create new nodes and elements. We do not recommend to use these models for EEG/MEG forward head computation. This is a research topic and it's still under investigation by the FEM communities.
FEM Forward model
To compute the forward model (Gain Matrix) with the FEM method, we assume that you have folowed the introduction tutorials and all the relative data are available(channels files, ...).
first,on the anatomy view, you need to select the head model. In the case where you have multiple models, brainstorm uses the model with the name is displayed on green color. You need also to select the cortex to use as the source space.
Then, switch to the view "Functional data (sorted by subjects)", 2nd button above the database explore. Right-click on the subject > Compute head model. Select DUNEuro FEM in the list.
The combined EEG/MEG is possible, and you can mixe between the available methods.
A panel (full list of options) related to DUNEuro are displayed and you have the possibilities to change them. At this level we recommend you to use the default values. For advanced users, more details will be aded in this page.
Explanations of the options:
DUNEuro options : If the FEM is not familiar to you, we recommend you to use the default option. The advanced options gives you the possibility to change the FEM source model, parameter of the sources and also a set of option related to the FEM method (page).
FEM conductivities: brainstorm detects automatiquely the number of layers and assigne the default isotropic value for each layer. You can change these value according to you model.
You can select how many layers you want to use for the FEM model. The possible options is related to the number of layer on the FEM model. In our case are Scalp (=head), Skull (=outer skull), and Brain (=inner skull).
- For EEG: Use all the layers
- For MEG: You can use only the inner layers (here brain)
- For SEEG : Only the inner (WM)
- For ECOG : only the inner layers
Then the calculation of the head model will automatically start. You may wait for a very long time. Be patient, it's worth it...
Additional documentation
https://simnibs.github.io/simnibs/build/html/index.html
https://simnibs.github.io/simnibs/build/html/documentation/command_line/headreco.html
https://github.com/brainstorm-tools/bst-duneuro/issues/1