2076
Comment:
|
12172
|
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 & Juan Garcia-Prieto''''' ''' |
Line 6: | Line 6: |
refe to these point : http://duneuro.org/ | This tutorial explains how to use brainstorm-dueneuro to compute the forward 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|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 [[https://neuroimage.usc.edu/brainstorm/Tutorials/TutBem?highlight=(bem)|BEM]]. |
Line 12: | Line 12: |
Here we will describe the FEM and run some examples | ''In this tutorial, we will describe the softwares required to use the DUNEuro computation from brainstorm and a basic examples on the FEM computation through the graphical interface. '' == 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 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>>''' == Citing DUNEuro and Brainstorm-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 |
Line 16: | Line 25: |
== Duneuro == | == Software requirements == === FEM Computation : DUNEuro === In order to use the FEM computations, 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/) |
Line 18: | Line 29: |
== 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. |
=== FEM mesh : software and toolbox === In order to use the FEM computations of the electromagnetic field (EEG/MEG), the volume mesh of the head is required. Brainstorm integrates most of the modern open-source tools to generate realistic head mesh, either from nested surface mesh or from individual MR images (T1 or T1 and T2). |
Line 21: | Line 32: |
However if you want to use the source code of Duneuro you can visite: http://duneuro.org/ | 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]]'''. ''' |
Line 23: | Line 34: |
We also put here : | New methods are under development and will be released to brainstorm in the next future. |
Line 25: | Line 36: |
The main steps you need in order to compile for windows are listed here : | The FEM mesh visualization and mesh processing options 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]]'''. ''' |
Line 27: | Line 38: |
https://github.com/svdecomposer/brainstorm-duneuro | 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. |
Line 29: | Line 40: |
We distribute the binary files for Windows/Ubunto 64bit systems, you don't need to installan extra Microsoft software package to run '''Duneuro''' | === 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 ([[http://brainsuite.org/processing/diffusion/|BDP]]). The diffusion tensor images (DTI) are estimated with Brainsuite from the diffusion wighted images (DWI) and then converted to conductivity tensor using the [[https://www.pnas.org/content/98/20/11697|Tuch process]]. In order to use this option, you need to install [[http://forums.brainsuite.org/download/|Brainsuite]]software, the rest of the process is distributed within bst-duneuro.'''<<BR>>'''<<TAG(Advanced)>>''' <<BR>> ''' |
Line 31: | Line 43: |
Microsoft Visual C++ 2010 Redistributable Package (x64). | * 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. Interfaces to Matlab and python are possible, but you need to install and compile duneuro by yourself ([[http://www.sci.utah.edu/~wolters/ChengduSummerschool/DUNEuroPresentation/|more documentation]]). For brainstorm, 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]] |
Line 33: | Line 46: |
* 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. |
|
Line 34: | Line 49: |
== 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). |
|
Line 35: | Line 53: |
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. | |
Line 36: | Line 55: |
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]]). | |
Line 37: | Line 57: |
== FEM surfaces / Volume generation == | ''' {{attachment:fem_mesh_generation.JPG||height="300",width="230"}} {{attachment:meshMethods.JPG||height="300",width="230"}} {{attachment:iso2meshMergeMethodOptions.JPG||height="200",width="200"}} ''' |
Line 39: | Line 59: |
The other mesh generation's methods are explained on this''' [[https://neuroimage.usc.edu/brainstorm/meshGeneration#preview|tutorial]]. ''' | |
Line 40: | Line 61: |
=== Volume mesh visualisation === In this tutorial, we use the ICBM head model template distributed with brainstorm. When the FEM mesh generation is correctly completed, a new node will appear on the anatomy window. '''<<BR>>''' ''' {{attachment:view_default_subject.JPG||height="140",width="200"}} ''' |
|
Line 41: | Line 64: |
=== Volume generation from surface files === | 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 on the right, the final FEM mesh generated by iso2mesh. |
Line 43: | Line 66: |
=== Volume generation from T1 MRI data === | ''' {{attachment:dispIcbmMesh.JPG||height="300",width="580"}} <<BR>> ''' |
Line 45: | Line 68: |
'''<<BR>>'''<<TAG(Advanced)>>''' <<BR>> ''' | |
Line 46: | Line 70: |
If intersections are present on the surfaces mesh, the iso2mesh FEM mesh generation fails (tetgen) 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. | |
Line 47: | Line 72: |
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 computations. This is a research topic and it's still under investigation by the FEM communities. | |
Line 48: | Line 74: |
== FEM Forward model == To compute the forward model (Gain Matrix) with the FEM method, we assume that you have followed the [[https://neuroimage.usc.edu/brainstorm/Tutorials/TutBem?highlight=%28bem%29|introduction tutorials]] and all the relative [[https://neuroimage.usc.edu/brainstorm/Tutorials/HeadModel|data are available]](channels files, ...). |
|
Line 49: | Line 77: |
== Forward model == | First, on the anatomy view, you need to select the head model. In the case where you have multiple FEM head models, brainstorm uses the model displayed on green color. You need also to select the cortex to use as the source space. |
Line 51: | Line 79: |
=== Head model === | '''<<BR>> {{attachment:femNode.JPG||height="200",width="250"}} {{attachment:modelAndCortex.JPG||height="350",width="300"}} <<BR>> ''' |
Line 53: | Line 81: |
=== Source model === | 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 on the list. |
Line 55: | Line 83: |
''' {{attachment:ComputeHeadModelDuneuro.JPG||height="350",width="420"}} <<BR>> ''' | |
Line 56: | Line 85: |
For the 'Source space' we recommend to use the 'Cortex surface'. For the forward modeling method, the combined EEG/MEG is possible (depending on your data), and you can mixe between the available forward methods. | |
Line 57: | Line 87: |
=== Advanced paramaters === | When you press OK, a set of panels (full list of options) related to DUNEuro options are displayed and you have the possibilities to change the options. At this level, we recommend you use the default values. For advanced users, more details will be added to this '''''page'''.'' |
Line 59: | Line 89: |
Explanations of the options: | |
Line 60: | Line 91: |
* '''DUNEuro options:''' If the FEM is not familiar to you, we recommend you to use the default options. The advanced options gives you the possibility to change the FEM source model, parameter of the sources and also a set of options related to the FEM method ('''''page'''''). * '''FEM conductivities:''' brainstorm detects automatically the number of layers on your model and assigns the default isotropic value for each layer. However, you have the possibility to change these values according to your model. * '''FEM tissues :''' You can select the layers that you want to use for the FEM computation. The possible options are related to the number of the layer on the FEM head model model. In our case, there 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 |
|
Line 61: | Line 99: |
Then the calculation of the head model will automatically start. You may wait for a very long time, that depend on the mesh resolution. | |
Line 62: | Line 101: |
So, be patient, it's worth it... | |
Line 63: | Line 103: |
''(for this model it's quite fast ... less than 10 min)'' | |
Line 64: | Line 105: |
== Advantages of the FEM == In this tutorial, we have shown how to use the FEM computation for a basic model. In the case of this head model, it has shown that the FEM has similar accuracy as the the BEM and could be faster {ref : M.Clerc }. The model showed in this tutorial is simple. The FEM can be used with more realistic head model with more than three layers (up to 6 layers). FEM can also include tissu anisotropy ('''page'''). |
|
Line 66: | Line 111: |
'''http://duneuro.org/ ''' | |
Line 67: | Line 113: |
'''https://www.dune-project.org/ ''' | |
Line 68: | Line 115: |
'''https://simnibs.github.io/simnibs/build/html/index.html ''' | |
Line 69: | Line 117: |
== Reported Errors & alternative solution == | '''https://simnibs.github.io/simnibs/build/html/documentation/command_line/headreco.html ''' |
Line 71: | Line 119: |
'''https://github.com/brainstorm-tools/bst-duneuro/issues/1 ''' | |
Line 72: | Line 121: |
'''https://github.com/brainstorm-tools/brainstorm3/issues/242 ''' | |
Line 73: | Line 123: |
'''<<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 & Juan Garcia-Prieto
This tutorial explains how to use brainstorm-dueneuro to compute the forward 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 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 softwares required to use the DUNEuro computation from brainstorm and a basic 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 include solving the electroencephalography (EEG) and magnetoencephalography (MEG) forward problem and providing simulations for brain stimulation.
Citing DUNEuro and Brainstorm-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 computations, 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 computations of the electromagnetic field (EEG/MEG), the volume mesh of the head is required. Brainstorm integrates most of the modern open-source tools to generate realistic head mesh, either from nested surface mesh or from individual MR images (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 options 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). The diffusion tensor images (DTI) are estimated with Brainsuite from the diffusion wighted images (DWI) and then converted to conductivity tensor using the Tuch process. In order to use this option, you need to install Brainsuitesoftware, 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. Interfaces to Matlab and python are possible, but you need to install and compile duneuro by yourself (more documentation). For brainstorm, 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 FEM 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 on the right, the final FEM mesh generated by iso2mesh.
If intersections are present on the surfaces mesh, the iso2mesh FEM mesh generation fails (tetgen) 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 computations. 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 followed 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 FEM head models, brainstorm uses the model 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 on the list.
For the 'Source space' we recommend to use the 'Cortex surface'. For the forward modeling method, the combined EEG/MEG is possible (depending on your data), and you can mixe between the available forward methods.
When you press OK, a set of panels (full list of options) related to DUNEuro options are displayed and you have the possibilities to change the options. At this level, we recommend you use the default values. For advanced users, more details will be added to this page.
Explanations of the options:
DUNEuro options: If the FEM is not familiar to you, we recommend you to use the default options. The advanced options gives you the possibility to change the FEM source model, parameter of the sources and also a set of options related to the FEM method (page).
FEM conductivities: brainstorm detects automatically the number of layers on your model and assigns the default isotropic value for each layer. However, you have the possibility to change these values according to your model.
FEM tissues : You can select the layers that you want to use for the FEM computation. The possible options are related to the number of the layer on the FEM head model model. In our case, there 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, that depend on the mesh resolution.
So, be patient, it's worth it...
(for this model it's quite fast ... less than 10 min)
Advantages of the FEM
In this tutorial, we have shown how to use the FEM computation for a basic model. In the case of this head model, it has shown that the FEM has similar accuracy as the the BEM and could be faster {ref : M.Clerc }.
The model showed in this tutorial is simple. The FEM can be used with more realistic head model with more than three layers (up to 6 layers). FEM can also include tissu anisotropy (page).
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