10504
Comment:
|
10663
|
Deletions are marked like this. | Additions are marked like this. |
Line 4: | Line 4: |
''Authors: Takfarinas Medani & ''''Juan Garcia-Prieto'' | ''Authors: Takfarinas Medani & Juan Garcia-Prieto''''' ''' |
Line 8: | Line 8: |
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]]. | 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 15: | Line 15: |
[[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>> | '''[[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 30: | Line 30: |
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/) | 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/) |
Line 35: | Line 35: |
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]]. | 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 39: | Line 39: |
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]]. | 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]]'''. ''' |
Line 41: | Line 41: |
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. | 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 44: | Line 44: |
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>> | 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>> ''' |
Line 49: | Line 49: |
* 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. |
* 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 58: | Line 58: |
{{attachment:fem_mesh_generation.JPG||height="300",width="230"}} {{attachment:meshMethods.JPG||height="300",width="230"}} {{attachment:iso2meshMergeMethodOptions.JPG||height="200",width="200"}} | ''' {{attachment:fem_mesh_generation.JPG||height="300",width="230"}} {{attachment:meshMethods.JPG||height="300",width="230"}} {{attachment:iso2meshMergeMethodOptions.JPG||height="200",width="200"}} ''' |
Line 60: | Line 60: |
The other mesh generation's methods are explained on this [[https://neuroimage.usc.edu/brainstorm/meshGeneration#preview|tutorial]]. | The other mesh generation's methods are explained on this''' [[https://neuroimage.usc.edu/brainstorm/meshGeneration#preview|tutorial]]. ''' |
Line 63: | Line 63: |
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"}} | 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"}} ''' |
Line 67: | Line 67: |
{{attachment:dispIcbmMesh.JPG||height="300",width="580"}} <<BR>> | ''' {{attachment:dispIcbmMesh.JPG||height="300",width="580"}} <<BR>> ''' |
Line 69: | Line 69: |
<<BR>>'''<<TAG(Advanced)>>''' <<BR>> | '''<<BR>>'''<<TAG(Advanced)>>''' <<BR>> ''' |
Line 80: | Line 80: |
<<BR>> {{attachment:femNode.JPG||height="200",width="250"}} {{attachment:modelAndCortex.JPG||height="350",width="300"}} <<BR>> | '''<<BR>> {{attachment:femNode.JPG||height="200",width="250"}} {{attachment:modelAndCortex.JPG||height="350",width="300"}} <<BR>> ''' |
Line 82: | Line 82: |
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. | 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. |
Line 84: | Line 84: |
{{attachment:ComputeHeadModelDuneuro.JPG||height="350",width="420"}} <<BR>> | ''' {{attachment:ComputeHeadModelDuneuro.JPG||height="350",width="420"}} <<BR>> ''' |
Line 88: | Line 88: |
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.''''' | 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.'' |
Line 92: | Line 92: |
* 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). |
* 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). |
Line 103: | Line 103: |
http://duneuro.org/ | '''http://duneuro.org/ ''' |
Line 105: | Line 105: |
https://www.dune-project.org/ | '''https://www.dune-project.org/ ''' |
Line 107: | Line 107: |
https://simnibs.github.io/simnibs/build/html/index.html | '''https://simnibs.github.io/simnibs/build/html/index.html ''' |
Line 109: | Line 109: |
https://simnibs.github.io/simnibs/build/html/documentation/command_line/headreco.html | '''https://simnibs.github.io/simnibs/build/html/documentation/command_line/headreco.html ''' |
Line 111: | Line 111: |
https://github.com/brainstorm-tools/bst-duneuro/issues/1 | '''https://github.com/brainstorm-tools/bst-duneuro/issues/1 ''' |
Line 113: | Line 113: |
https://github.com/brainstorm-tools/brainstorm3/issues/242 | '''https://github.com/brainstorm-tools/brainstorm3/issues/242 ''' |
Line 115: | Line 115: |
https://github.com/brainstorm-tools/brainstorm3/issues/185 | '''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 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