The purpose of this page is just to serve as todo or scratch pad for the development project and to list and share some ideas.

After making changes to the code and/or documentation, this page should remain on the wiki as a reminder of what was done and how it was done. However, there is no guarantee that this page is updated in the end to reflect the final state of the project

So chances are that this page is considerably outdated and irrelevant. The notes here might not reflect the current state of the code, and you should not use this as serious documentation.

Implement a robust algorithm for constructing triangulated EEG-BEM head models

The goal is to implement in FieldTrip an algorithm (or set of algoritms) that allow the robust creation of single-subject triangulations of the skin/skull/brain boundaries to be used in EEG-BEM volume conduction modelling. Seperate to this project, work is still required to improve the implementatin of the actual forward computaion, especially the computation of the BEM system matrix.

The algorithms should be able to asumme that the input MRI data fullfils the following requirements:

  • the head coordinate system is specified by a homgemous transformation matrix
  • the location of the fiducuals (nas/lpa/rpa) is known
  • the volume is isotropic, i.e. equal voxel size in each direction
  • the image processing toolbox is available


Steps to be taken

  • document the algoritm (see below)
  • define the function/functions that have to be implemeted/included in FieldTrip
    • user interface
    • data interface, i.e. requirements on data structures
    • low-level functions that are of general use
  • change the (existing) code to match the requirements of documentation and interfaces


A short description of the algorithm

The skin

  • Determine which voxels belong to head using simple thresholding, smoothing and region growing
  • Project triangulated sphere at center of mass brain onto boundary

The brain

  • Determine which voxels belong to brain using volumesegment
  • Project triangulated sphere at center of mass brain onto boundary
  • Optional: use laplacian smoothing on the triangulated surface

The skull

  • Draw lines from triangulated sphere at center of mass brain
  • “Top half”: determine boundary along lines in MR images by trying several algorithms (see below)
  • “Bottom half”: define vertices along lines based on average skull thickness

A potential problem in the bottom half is that the skull and brain triangulation intersect. To avoid this one can use the same number of vertices for skull as in brain. An alternative solution is to base the lower half of the triangulation on an “imdilated” brain segmentation.

A known problem in the top half is that the algorithms for determining the skull-skin boundary are not 100% robust. They are based on the MRI intensity countour along the radial lines through the skull and skin.

This results in outliers.

Optimizing the skull triangulation

This requires the computation of the surface laplacial (i.e. smoothness) of the radius of the skull surface. Subsequently the following steps are taken:

  1. Detect suspicious vertices in the skull triangulation
    • Any vertex less than 2.5 mm from the brain
    • Any vertex less than 3.5 mm from the scalp
    • Any vertex where the surface laplacian is not sufficiently smooth
  2. Remove suspicious vertices and replace them by interpolation (using minimum laplacian)
  3. Check that the 2.5 and 3.5 criteria are optimally met
  4. Go back to step 1 and repeat untill it converges

Additional ideas

It is possible to use the skull laplacian smoothness criterium and interpolation also on the brain surface.

It is possible to replace the initial triangulation of the brain surface using the intensity profiles by a triangulation of a segmentation resulting from an dilated brain and eroded skin (using XOR).

development/bemmodel.txt · Last modified: 2010/12/17 11:45 by robert

You are here: startdevelopmentbemmodel
This DokuWiki features an Anymorphic Webdesign theme, customised by Eelke Spaak and Stephen Whitmarsh.
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0