80
Comment:
|
12475
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
Describe Duneuro here. | = Realistic head model: FEM with DUNEuro = '''[TUTORIAL UNDER DEVELOPMENT: NOT READY FOR PUBLIC USE]''' |
Line 3: | Line 4: |
Here we will describe the FEM and run some examples | ''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 [[http://duneuro.org/|Duneuro]]''' '''software. More documentation could be found on this''' '''[[https://gitlab.dune-project.org/duneuro/duneuro/wikis/home|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 [[https://neuroimage.usc.edu/brainstorm/Tutorials/TutBem?highlight=(bem)|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 == '''[[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 == 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/) === 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 [[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 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]]'''. ''' 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 ([[http://brainsuite.org/processing/diffusion/|BDP]]). The diffusion tensor images (DTI) are estimated with Brainsuite from the diffusion weighted 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>> ''' * 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]] * 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 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"}} ''' 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. ''' {{attachment:dispIcbmMesh.JPG||height="300",width="580"}} <<BR>> ''' '''<<BR>>'''<<TAG(Advanced)>>''' <<BR>> ''' 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 [[https://neuroimage.usc.edu/brainstorm/Tutorials/TutBem?highlight=(bem)|introduction tutorials]] and all the relative [[https://neuroimage.usc.edu/brainstorm/Tutorials/HeadModel|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. '''<<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 on the list. ''' {{attachment:ComputeHeadModelDuneuro.JPG||height="350",width="360"}} <<BR>> ''' 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)'' '''<<BR>>'''<<TAG(Advanced)>>''' <<BR>>''' The dipole model is one of the most challenging parameters for the FEM. The source space (cortex) should be within the grey matter volume. In this example all the dipoles are located within the innerskull. We will discuss this issu on the advaced model ('''''on this page''''') . == Advantages of the FEM == In this tutorial, we have shown how to use the FEM computation for a basic model. In similar cases, it has shown that the FEM has similar accuracy as the the BEM and could be faster {ref : M.Clerc }. 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'''). More documentation is comming ... == Additional documentation == '''http://duneuro.org/ ''' '''https://www.dune-project.org/ ''' '''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 ''' '''https://github.com/brainstorm-tools/brainstorm3/issues/242 ''' '''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 weighted 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)
The dipole model is one of the most challenging parameters for the FEM. The source space (cortex) should be within the grey matter volume. In this example all the dipoles are located within the innerskull. We will discuss this issu on the advaced model (on this page)
Advantages of the FEM
In this tutorial, we have shown how to use the FEM computation for a basic model. In similar cases, it has shown that the FEM has similar accuracy as the the BEM and could be faster {ref : M.Clerc }.
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).
More documentation is comming ...
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