Realistic head model: BEM with OpenMEEG

Authors: Francois Tadel, Alexandre Gramfort

openmeeg.gif

This forward model uses a symmetric boundary element method (symmetric BEM) and was developed by the French public research institute INRIA (website). It uses three realistic layers (scalp, inner skull, outer skull). The goal of this forward solution is mostly for EEG users, to provide more accurate results than the spherical models. 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 EEG and epilepsy.

Requirements

On Windows 64bit systems, you need to install an extra Microsoft software package to run OpenMEEG: Microsoft Visual C++ 2010 Redistributable Package (x64).
http://www.microsoft.com/en-us/download/details.aspx?id=14632

BEM surfaces

We need three realistic layers extracted from the subject's MRI (scalp, inner skull, outer skull), plus the source space (cortical surface). These layers are sometimes complicated to generate. 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.

  1. Select the protocol TutorialEpilepsy.

  2. Go to the anatomy view (first button on top of the database explorer).
  3. Right-click on the subject folder > Generate BEM surfaces. You can set the approximate number of vertices you want for each layer. For this example, leave the default parameters and click on Ok.

    bemPopup.gif [ATTACH]

  4. At the end of the process, three new surfaces are added to the database:

    [ATTACH] [ATTACH]

How to set the number of vertices per layer

Forward model

  1. Switch to the view "Functional data (sorted by subjects)", 2nd button above the database explore.
  2. Right-click on the channel file > Compute head model. Select OpenMEEG BEM in the list.

    headmodeler.gif

  3. Explanations of the options:
    • BEM Layers & conductivities: You can select how many layers you want to use for the BEM model. The possible options in our case are Scalp (=head), Skull (=outer skull), and Brain (=inner skull). The values on the right are the relative conductivities of each layer.

      • For EEG: Use all the layers
      • For MEG: Use only the inner skull layer
    • Use adjoint formulation: Decrease significantly the amount of memory that is necessary in memory and on the hard drive, but much longer.

    • Use adaptive integration: This produces a more accurate solution, mostly in the cases of dipoles (vertices of the cortex surface) that are very close to the inner skull layer. Keep this option selected.

    • Process dipoles by blocks: If you consistently run into crashes, it could be because you don't have enough memory available. You can try to process the dipoles by smaller blocks. It would be longer but could work. Select this option only if you have memory errors.

  4. Download OpenMEEG software? Yes.
    This will download the latest version of the OpenMEEG binaries for your operating system from INRIA website, and install it in Brainstorm user folder (~username/.brainstorm/openmeeg/)

    openmeegDownload.gif

  5. Then the calculation of the head model will automatically start. You may wait for a very long time. Be patient, it's worth it...

    openmeegWait.gif

  6. You have now a new head model for this subject.

    treeFinal.gif

Warning: Dipoles outside

OpenMEEG BEM solver may be unstable when the dipoles (= the vertices of the cortex surface) are outside or too close to the innermost layer (= the brain/inner skull surface). Brainstorm tries to detect for which dipoles OpenMEEG could return wrong values, and displays a warning if any:

warning_dipout.gif

This doesn't mean that these points would necessarily cause problems in the BEM forward model, but it is important to be aware that they might, and check this carefully. First, evaluate visually the intersections between the cortex and the innerskull surfaces: display both in a 3D view by double-clicking on them, then from the Surface tab, set a bright color for the cortex and 0% transparency for the innerskull. This image may reveal that some parts of the cortex are sticking out of the inner skull surface.

warning_dipout2.png

To fix the surfaces, two solutions:

Note that this is only a WARNING: even with many suspicious points, the BEM forward model might be entirely valid. You may decide to keep the surfaces unmodified, and go back to fixing them only if you observe abnormal lead fields or source values at these locations.

To display the forward fields, right-click on the BEM head model > View lead field vectors. Abnormal displays may look like the one below: one or a few arrows are much longer than all the others. You may need to adjust the relative size of the lead field arrows in order to see something - press H for help. In this case, one of the occipital dipoles that was initially detected as a possible problem shows an abnormality that may impact your source analysis: the surfaces should be fixed and the forward model recomputed.

warning_dipout5.png

The example used to illustrated this section is the EEG/Epilepsy tutorial, using BEM surfaces with 642/482/482 vertices. Everything can be reproduced easily.

Errors

OpenMEEG may crash for various reasons: we tried to list the possible causes here.

Linux

MacOS

Windows

All systems

Solution not found

If you cannot find a solution, please post a bug report on the Brainstorm user forum:

Additional documentation

Tutorial "Head modeling": https://neuroimage.usc.edu/brainstorm/Tutorials/HeadModel

License

OpenMEEG is distributed under the French opensource license CeCILL-B. It is intended to give users the freedom to modify and redistribute the software. It is therefore compatible with popular opensource licenses such as the GPL and BSD licenses. The CeCILL-B license imposes to anybody distributing a software incorporating OpenMEEG the obligation to give credits (by citing the appropriate publications), in order for all contributions to be properly identified and acknowledged.

The references to be acknowledged are:





Feedback: Comments, bug reports, suggestions, questions
Email address (if you expect an answer):


Tutorials/TutBem (last edited 2021-03-30 07:16:05 by FrancoisTadel)