Realistic head model: FEM with DUNEuro

Authors: Takfarinas Medani, Juan Garcia-Prieto, Francois Tadel, Sophie Schrader, Anand Joshi, Christian Engwer, Carsten Wolters, John Mosher and Richard Leahy

logo_duneuro.png

This tutorial explains how to use DUNEuro to compute the forward model using the finite element method (FEM). The FEM methods use a realistic volume mesh of the head generated from the segmentation of the MRI. The FEM models provide more accurate results than the spherical forward models and more realistic geometry and tissue properties than the BEM methods. Its applications include accurate source localization in MEG/EEG/sEEG/ECoG and TMS/TDCS optimizations.

The scope of this page is limited to a basic example (head model with 3 layers). More advanced options for mesh generation and forward model computation are discussed in other tutorials: FEM mesh generation, FEM tensors estimation, FEM median nerve example. We assume that you have already followed the introduction tutorials, we will not discuss the general principles of forward modeling here.

DUNEuro

DUNEuro is an open-source C++ software library for solving partial differential equations (PDE) in neurosciences using mesh-based methods. It is based on the DUNE library and its main features include solving the EEG and MEG forward problem and providing simulations for brain stimulation.

As distributed on the DUNEuro GitLab, the 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. For Brainstorm, we adapted this code and were able to generate binaries for the main operating systems (Windows, Linux and MacOS), which are downloaded automatically when needed as a Brainstorm plugin. This project is available on our GitHub repository bst-duneuro.

We would like to thank the DUNEuro team for their help with this integration work: Carsten Wolters, Christian Engwer, Sophie Schrader, Andreas Nuessing, Tim Erdbruegger, Marios Antonakakis, Johannes Vorwerk & Maria Carla Piastra.

duneuroFromDune.JPG

If you use Brainstorm-DUNEuro please cite the following papers in your work:

For further documentations about DUNEuro, please refer to the following webpages:

Requirements

In order to reproduce the computation present below on your computer, you need to fulfill all the conditions listed below. Alternatively, you can read this page as a reference documentation about DUNEuro and not try to reproduce the results.

FEM mesh

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). This tutorial describes only a simple approach based on three nested surfaces meshed in 3D with Iso2mesh. For the full list of available methods and description of options, please refer to the tutorial FEM mesh generation.

FEM forward model

The forward model (or head model in the Brainstorm documentation and interface) describes how the electric activity in the source space (the cortex surface or a regular grid of volume points) influences the electric potential (EEG) or magnetic fields (MEG) at the level of the sensors. The FEM method uses the tetrahedral mesh computed above to establish this relationship.

Advanced

DUNEuro options: Basic

When assuming isotropic conductivities for all the tissues, the DUNEuro basic options are limited to the selection of the tissues and their conductivities.

Advanced

DUNEuro options: Advanced [TODO]

In the DUNEuro options panel, click on the button Show details to access the advanced options.

For more information about these methods, users can check Johannes Vorwerk's PhD thesis.

Advanced

Troubleshooting [TODO]

DUNEuro binaries may crash for various reasons: we tried to list the possible causes here. Many FEM forward modeling issues are related with memory overload or extremely long computation times. Reducing the size of the problem may help in many cases. If you cannot find a solution, please post the full error message on the Brainstorm user forum (you can copy-paste the error message from the Matlab command window after closing the error message box).

Grid error messages

Remove the neck

One way to reduce the size of the forward problem is to decrease the number of FEM elements in the head model. When the field of the MRI is large, you may have the mesh of the neck and even the shoulders. In most cases, it is safe to remove the lower part of the FEM mesh, below the nose and the brainstem. Right-click on the FEM mesh > Resect Neck.

resectNeck.JPG

Once the process is finished, a new FEM mesh appears in the database, with a tag "resect". The following figure shows the model before (743828 vertices / 4079587 elements) and after resection (613955 vertices / 3400957 elements). It will reduce the size of the problem by 20%.

FemMeshAllandResect.JPG

Additional documentation

DUNEuro references

Brainstorm-DUNEuro integration

Brainstorm user forum

Tutorials/Duneuro (last edited 2022-02-15 22:45:01 by TakfarinasMedani)