2943
Comment:
|
11739
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
= Realistic head model: FEM with Duneuro = ''Authors: Takfarinas MEDANI,'' 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'''). refe to these point : http://duneuro.org/ and to the documentation from here : https://gitlab.dune-project.org/duneuro/duneuro/wikis/home Here we will describe the FEM and run some examples == 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. http://duneuro.org/ == 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. However if you want to use the source code of Duneuro you can visite: http://duneuro.org/ We also put here : The main steps you need in order to compile for windows are listed here : https://github.com/svdecomposer/brainstorm-duneuro 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). |
= Realistic head model: FEM with DUNEuro = '''[TUTORIAL UNDER DEVELOPMENT: NOT READY FOR PUBLIC USE]''' ''Authors: Takfarinas, Juan, François ...Sophie, Johannes, Maria, Christian, Carsten, John, Richard ? '' 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 [[http://duneuro.org/|Duneuro]] software. More documentation could be found on this [[https://gitlab.dune-project.org/duneuro/duneuro/wikis/home|gitlab page]]. The FEM methods use the realistic volume mesh of the head model genertaed from the segmentation of the magnetic reasonance images (MRI). The FEM forward solution provides more accurate results than the spherical models and more realistic geometry and tissu propriety than the BEM. ''In this tutorial we will describe the software requirement to use the DUNEuro computation from brainstrom and 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 that include solving the electroencephalography (EEG) and magnetoencephalography (MEG) forward problem and providing simulations for brain stimulation. {{attachment:duneuroFromDune2.png|height="50",width="120"}} == Citing DUNEuro == Please cite 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 : friendely interface for the EEG/MEG with the Finite Elelemt Method"'' under writing == Software requirements == === FEM Computation : DUNEuro === In order to use the FEM computation, Brainstorm call 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'''.''' === FEM head model : Mesh generation === 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 realistric head mesh, either from nested surface mesh or from individual MR image (T1 or T1 and T2). The list of the available methods are listed and explained on [[https://neuroimage.usc.edu/brainstorm/meshGeneration#preview|this tutorial]]. New mthods are under devellopement and will be released to brainstorm in next future. === FEM head model : Mesh visualisation === The FEM mesh visualisation and mesh processing option are integrated with brainstorm. The use of these options equires 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 tissu anisotropy : Brainsuite === Among the advantages of the FEM, the use of the tissu anisotropy (conductivity). The estimation of the tissu anisotropy is performed with the brainsuite diffusion pipline (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 are 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 tediuos Dune and Duneuro libraries on your computer. * The main process of the Duneuro compilation used for brainstorm are 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 geneation from MR images) and [[http://brainsuite.org/|Brainsuite]] (for anistropy tensor estimation from DWI) should be installed manually on the user's computer. |
Line 35: | Line 58: |
=== Volume mesh generation from Brainstorm === The most modern software that are used to generate the volume mesh head model are integrated within brainstorm with an easy graphical interface to use call these tools. Right click on the subject and then "Generate FEM Mesh" {{attachment:menuGenerateFemMesh.PNG|height="40",width="150"}} The available options are : . {{attachment:FemMeshMethods.PNG|height="50",width="100"}} "Iso2mesh" : This option merges the brainstorm surfaces available on the subject and then generarte the tetrahedral mesh. "Brain2Mesh" : This options uses the MRIs available on the subjects, then it calls the SPM segmentation of the volume into 5 tissus (white, gray, scf, skull and skin). After that it converts into a tetrahedral mesh. "SimNibs" : The recommended option, it calls the headreco {ref} and generate a FEM head model "FieldTrip" : (in progress) "Roast" : (in progress) "headreco" : https://simnibs.github.io/simnibs/build/html/documentation/command_line/headreco.html This function is part of the SimNibs software: https://simnibs.github.io/simnibs/build/html/index.html === headreco === The headreco function is fully integrated to brainstorm. With this option, brainstorm can reconstructs a tetrahedral head mesh from T1- and T2-weighted structural MR images. It runs also with only a T1w image, but it will achieve more reliable skull segmentations when a T2w image is supplied. === Surface mesh generation from volume mesh === |
|
Line 52: | Line 106: |
=== Volume generation from T1 MRI data === |
'''<<TAG(Advanced)>>''' === Volume generation from T1/T2 MRI data === You can also generate your own FEM head model and then load it to brainstorm. However the automatic head model generation from from imaging techniques are not accurate and most of the time visual checking are needed and manual correction are required. ==> this depends lagely on the quality of the T1/T2 MRI image(https://simnibs.github.io/simnibs/build/html/tutorial/head_meshing.html). This step is based on the "roast" toolbox (link to roast : https://github.com/andypotatohy/roast ) that we adapted for the MEEG forward computation. If you want to generate your own FEM head model from an MRI, you will need to download these file (link), then run the bst process as explained here. * f there is a MRI file with the string "T2" in the subject anatomy folder, it will use it * Otherwise, if you select explicitly two MRI files with CTRL+Click, it will use the first one as the T1 and the second one as the T2 (this needs to be documented in the tutorial) === FEM Head model generation with SimNibs === This method used the SimNibs software. So to call this process, you need to download and install the SimNibs software, the process of the installation is explained in the SimNibs webpage : https://simnibs.github.io/simnibs/build/html/installation/simnibs_installer.html. When you have installed SimNibs, Brainstorm can call the main function used for the mesh generation frm the main graphical interface. Depemding on your computer performances, this process will take between 2 to 5 hours. We highly recommend to close all other running process and application on our computer in order to speed this process. - Explain here the main steps with screenshots : 1- Create new subject within the current protocole 2- Load the T1 of the subject to the brainstorm database. 3- Associate a T2 mri to the subject if it's available (this is better for csf/skull/scalp segmentation) 4- Right click on the subject, select the "Generate FEM mesh" . Select "SIMNIBS", and choose "Tetrahedral element" and keep the other options to the default value. 5- When this process is finished, a new node will appear in the data base, which hase he name "FEM xxxV, (simNibs, yLayers)". This is the FEM mesh model generated from the T1. === FEM Head model template === - Load the FEM volumic mesh (template created from ICBM T1 MRI using SimNibs) - Load the surface mesh (template created also from ICBM using ICBM ) and then generates the volume mesh (either tetra or hexa) by calling the tetgen process cia iso2mesh toolbox (if hexa are desired, the tetra mesh will be converted to hexa ... ) https://github.com/brainstorm-tools/brainstorm3/issues/185#issuecomment-576749612 |
Line 57: | Line 147: |
== Forward model == |
TODO and Validate if users want to use freesurfer and simnibs, the priority is given to freesurfer, then load the fs files, then call simnibs headmodel generation from t1/t2. == FEM computation and interface to DUNEuro == |
Line 60: | Line 153: |
Number of layers, conductivity value, | Number of layers, conductivity value, isotropy/anisotropy/ mesh resolution/ |
Line 66: | Line 159: |
Similarly to the spherical nad BEM head model, the source position are defined on the cortex surface vertices. We can either define a contraned or not constrained orientation. However, for the FEM model, more paramters could be tuned for the source model. Choice of the source model : PI, Venant, Subtraction, Whitney Panel of the options choice that the user can select. (other wise we will set to default ) '''<<TAG(Advanced)>>''' |
|
Line 68: | Line 170: |
- Solver parameters - Electrodes projection - maybe explain here the relevant option of the mini file ?? |
|
Line 70: | Line 177: |
refer to : http://duneuro.org/ https://www.dune-project.org/ https://simnibs.github.io/simnibs/build/html/index.html |
|
Line 72: | Line 187: |
simnibs pblm : https://simnibs.github.io/simnibs/build/html/installation/throubleshooting.html |
|
Line 76: | Line 195: |
== Additional documentation == 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, Juan, François ...Sophie, Johannes, Maria, Christian, Carsten, John, Richard ?
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 genertaed from the segmentation of the magnetic reasonance images (MRI). The FEM forward solution provides more accurate results than the spherical models and more realistic geometry and tissu propriety than the BEM.
In this tutorial we will describe the software requirement to use the DUNEuro computation from brainstrom 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 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 : friendely interface for the EEG/MEG with the Finite Elelemt Method"
under writing
Software requirements
FEM Computation : DUNEuro
In order to use the FEM computation, Brainstorm call 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.
FEM head model : Mesh generation
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 realistric head mesh, either from nested surface mesh or from individual MR image (T1 or T1 and T2). The list of the available methods are listed and explained on this tutorial.
New mthods are under devellopement and will be released to brainstorm in next future.
FEM head model : Mesh visualisation
The FEM mesh visualisation and mesh processing option are integrated with brainstorm. The use of these options equires 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 tissu anisotropy : Brainsuite
Among the advantages of the FEM, the use of the tissu anisotropy (conductivity). The estimation of the tissu anisotropy is performed with the brainsuite diffusion pipline (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 are 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 tediuos Dune and Duneuro libraries on your computer.
The main process of the Duneuro compilation used for brainstorm are 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 geneation from MR images) and Brainsuite (for anistropy tensor estimation from DWI) should be installed manually on the user's computer.
FEM surfaces / Volume generation
Volume mesh generation from Brainstorm
The most modern software that are used to generate the volume mesh head model are integrated within brainstorm with an easy graphical interface to use call these tools.
Right click on the subject and then "Generate FEM Mesh"
The available options are :
"Iso2mesh" : This option merges the brainstorm surfaces available on the subject and then generarte the tetrahedral mesh.
"Brain2Mesh" : This options uses the MRIs available on the subjects, then it calls the SPM segmentation of the volume into 5 tissus (white, gray, scf, skull and skin). After that it converts into a tetrahedral mesh.
"SimNibs" : The recommended option, it calls the headreco {ref} and generate a FEM head model
"FieldTrip" : (in progress) "Roast" : (in progress)
"headreco" :
https://simnibs.github.io/simnibs/build/html/documentation/command_line/headreco.html
This function is part of the SimNibs software:
https://simnibs.github.io/simnibs/build/html/index.html
headreco
The headreco function is fully integrated to brainstorm. With this option, brainstorm can reconstructs a tetrahedral head mesh from T1- and T2-weighted structural MR images. It runs also with only a T1w image, but it will achieve more reliable skull segmentations when a T2w image is supplied.
Surface mesh generation from volume mesh
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/T2 MRI data
You can also generate your own FEM head model and then load it to brainstorm. However the automatic head model generation from from imaging techniques are not accurate and most of the time visual checking are needed and manual correction are required.
==> this depends lagely on the quality of the T1/T2 MRI image(https://simnibs.github.io/simnibs/build/html/tutorial/head_meshing.html).
This step is based on the "roast" toolbox (link to roast : https://github.com/andypotatohy/roast
) that we adapted for the MEEG forward computation. If you want to generate your own FEM head model from an MRI, you will need to download these file (link), then run the bst process as explained here.
- f there is a MRI file with the string "T2" in the subject anatomy folder, it will use it
- Otherwise, if you select explicitly two MRI files with CTRL+Click, it will use the first one as the T1 and the second one as the T2 (this needs to be documented in the tutorial)
FEM Head model generation with SimNibs
This method used the SimNibs software. So to call this process, you need to download and install the SimNibs software, the process of the installation is explained in the SimNibs webpage : https://simnibs.github.io/simnibs/build/html/installation/simnibs_installer.html.
When you have installed SimNibs, Brainstorm can call the main function used for the mesh generation frm the main graphical interface. Depemding on your computer performances, this process will take between 2 to 5 hours. We highly recommend to close all other running process and application on our computer in order to speed this process.
- Explain here the main steps with screenshots :
1- Create new subject within the current protocole
2- Load the T1 of the subject to the brainstorm database.
3- Associate a T2 mri to the subject if it's available (this is better for csf/skull/scalp segmentation)
4- Right click on the subject, select the "Generate FEM mesh"
- Select "SIMNIBS", and choose "Tetrahedral element" and keep the other options to the default value.
5- When this process is finished, a new node will appear in the data base, which hase he name "FEM xxxV, (simNibs, yLayers)". This is the FEM mesh model generated from the T1.
FEM Head model template
- Load the FEM volumic mesh (template created from ICBM T1 MRI using SimNibs)
- Load the surface mesh (template created also from ICBM using ICBM ) and then generates the volume mesh (either tetra or hexa) by calling the tetgen process cia iso2mesh toolbox (if hexa are desired, the tetra mesh will be converted to hexa ... )
https://github.com/brainstorm-tools/brainstorm3/issues/185#issuecomment-576749612
Head model based on the level set approach
TODO and Validate
if users want to use freesurfer and simnibs, the priority is given to freesurfer, then load the fs files, then call simnibs headmodel generation from t1/t2.
FEM computation and interface to DUNEuro
Head model
Number of layers, conductivity value, isotropy/anisotropy/ mesh resolution/
Electrode model
Check the position of the electrodes and align to the head model (projection if needed)
Source model
Similarly to the spherical nad BEM head model, the source position are defined on the cortex surface vertices. We can either define a contraned or not constrained orientation.
However, for the FEM model, more paramters could be tuned for the source model.
Choice of the source model : PI, Venant, Subtraction, Whitney
Panel of the options choice that the user can select. (other wise we will set to default )
Advanced paramaters
- Solver parameters
- Electrodes projection
- maybe explain here the relevant option of the mini file ??
Additional documentation
refer to :
https://simnibs.github.io/simnibs/build/html/index.html
Reported Errors & alternative solution
simnibs pblm :
https://simnibs.github.io/simnibs/build/html/installation/throubleshooting.html
The MEEG forward problem with the FEM
License
Reference
Additional documentation
https://github.com/brainstorm-tools/bst-duneuro/issues/1