Skip to content

The headModel toolbox for MATLAB/EEGLAB encapsulates in a single interface (the headModel class) common routines to allow out-of-the-box solutions to EEG forward and inverse problems.

License

aojeda/headModel

Repository files navigation

headModel toolbox for MATLAB/EEGLAB

Note: I am moving this repo elsewere to consolidate the forward and inverse problem solvers into a single toolbox. If you are still interested in the headModel toolbox please download it from EEGLAB's extention page.

headModel.plot()

The headModel toolbox for MATLAB/EEGLAB is a collection of routines, encapsulated in the headModel class, that are commonly used for solving the forward and inverse problems of the EEG.

Why another forward/inverse problem toolbox?

The headModel toolbox was built out of frustration. With some exceptions, it is often cumbersome to get up and running with distributed source analysis of EEG data in MATLAB.

To estimate EEG source images (see EEG source imaging) we need an electric and geometric model of the head to link cortical EEG sources distributed inside the brain to the sensors where the data are collected. Towards that end, below is a summary of the items that we often need to construct such model (requirements for specific use cases can vary):

  • Template or individual MRI.
  • Standard or digitized EEG sensor positions.
  • Segment the MRI into gray, white, bone, and scalp tissue.
  • Extract surfaces from of the segmented MRIs (for surface-based inverse problem).
  • Co-register the EEG sensors with the MRI or surface-based head model.
  • Find an EEG forward solver that works well with your MRI-derived data.

Finding solutions for each point listed above is highly nontrivial for many researchers and engineers, and often a limiting factor for doing EEG (distributed) source imaging (ESI) analysis. The pourpuse of the headModel toolbox is to provide an out-of-the-box solution in MATLAB/EEGLAB that can get us quickly from scalp EEG data to distributed cortical source estimates sidestepping the complications listed above.

Batteries are included

  • We provide pre-built and curated surface-based head models in the following variants:
    • Colins27 template with 2003 cortical sources (vertices) and 339 scalp sensors superset of the 10/20 standard montage.
    • Colins27 template with 5003 cortical sources and Biosemi 256 standard montage.
    • Colins27 template with 5003 cortical sources and 339 scalp sensors superset of the 10/20 standard montage.
  • All templates come with the 68 structures Desikan & Killiany anatomical atlas.
  • We provide high-level interfaces to EEGLAB and OpenMEEG toolboxes.
  • We provide several out-of-the box visualization tools.

What this toolbox can be used for?

  • Affine and nonlinear co-registration between a surface-based head model template and a set of sensor locations, both manually through a (painless) GUI and unsupervised at script level. We can apply the co-registration from the space of the template to the space of the subject's sensors (for computing an individualized head model) or in the opposite direction so that the same head model can be used for all subjects in a study.
  • Computation of the lead field matrix using the Boundary Element Method, for which we interface the OpenMEEG toolbox.
  • Estimation of cortical sources using Low Resolution Electrical Tomography (LORETA). We use our own implementation in MATLAB for greater flexibility.

What this toolbox is not for?

  • We do not support volume-based head models.
  • We cannot segment, normalize, label or extract surfaces from MRI data, for that you can use FreeSurfer.
  • We cannot solve the forward problem of the EEG using Finite Element method (FEM), for that you can use the NFT toolbox, which is part of the EEGLAB plug-in suite.

About

The headModel toolbox for MATLAB/EEGLAB encapsulates in a single interface (the headModel class) common routines to allow out-of-the-box solutions to EEG forward and inverse problems.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published