Build a geometrical description of the volume conduction model of the head

Introduction

This tutorial will explain how to start to construct a volume conduction model (or headmodel) from anatomical images. It is not going into details about the different volume conduction models that are implemented in FieldTrip, but the Summary and suggested further readings provides links to pages where you can get more information about those. For an explanation of the different source reconstruction approaches, you can look at the Source reconstruction of event-related fields using minimum-norm estimate and at the Localizing oscillatory sources using beamformer techniques tutorials.

Background

To reconstruct the location and the timecourse or spectral content of a source in the brain, various methods are available, such as beamforming, dipole fitting and minimum-norm estimation.

Given the geometry and the conductive properties, and given the distribution of the EEG measured on the scalp, or given the distribution of the magnetic field around the head measured with MEG, it is possible to estimate the location of the source activity.

Estimating the potential or field distribution for a known source and for a known model of the head is referred to as forward modeling. Estimating the sources corresponding to the measured EEG or MEG is referred to as inverse modeling.

Forward modeling relies on a volume conduction model (or sometimes referred to as head model) that describes the geometrical and electrical properties of the tissue of the head. Inverse modeling depends on forward modeling and hence requires that a volume conduction model is specified. In FieldTrip it is usually indicated with the Matlab variable vol.

The volume conduction model often requires a geometrical description of tissue boundaries in the head. These boundaries are typically described as meshes, i.e. triangulated surfaces in 3D-space. The coordinate system in which the vertices of these boundaries are expressed is typically subject-based. As such the exact definition of the coordinate system is irrelevant, but it is important to note that all geometric information that is needed to obtain a forward model needs to be expressed in the same coordinate system. As the sensor positions are commonly expressed in a subject-based coordinate system, the tissue boundaries need to be expressed in this coordinate system as well.

This may for example result in both the geometry of the sensors and the head model being expressed in centimeters, relative to the point in between the two ears (the origin), with the x-axis pointing towards the nasion, the y-axis approximately to the left ear and the z-axis approximately towards the vertex. This is the convention which is used in the CTF and 4D-Neuroimaging MEG systems.

The more accurate the description of the geometry, the better the quality of the forward model Therefore, if possible, individual anatomical MRIs are used to extract the boundaries of the relevant tissue compartments. These boundaries can be extracted by means of a segmentation procedure. In a next step, the meshes describing the relevant tissue boundaries can be created.

Coordinates of the anatomical MRI

Since the head model is usually constructed from an anatomical MRI, the MRI has to be described in this coordinate system. In FieldTrip you can use ft_volumerealign for this. Alternatives are MRIViewer in the CTF software, or other software that comes with your acquisition system.

Coordinates of the EEG or MEG sensors

To specify the position of the EEG electrodes relative to the head, you can use the ft_electroderealign function. For MEG the sensor positions are always by default defined relative to the fiducial coils and you don't have to specifically align the MEG sensor positions.

Procedure

This part describes the steps to be done to get a generic head model, with the final aim to calculate the lead fields. Firstly download and unzip the MRI file found in HERE, which is named standard_BEM.zip. The following steps are necessary to build a head model in FieldTrip, and are reported below with the corresponding FieldTrip code:

After the segmentation, FieldTrip provides different functions for creating the volume conduction model (see Summary and suggested further readings).

Figure 1. Pipeline for creating a headmodel from anatomical MRI images

Read in the anatomical images

FieldTrip supports many sorts of anatomical data. You can check out the supported data formats on this page. For example, if you want to work with dicom (xxx.ima) images, you have to put the path to the first image file after the ft_read_mri function. The function will find and read in all the other images and it will put them into one structure.

mri=ft_read_mri('<path to .ima directory>/XXX.ima');

In this tutorial, we start only loading a standard mri that is already in matlab (.mat) format.

% load MRI from mat file
load standard_mri.mat

Realign to 'head coordinates'

Normally the position of each voxel in the MRI is defined in its native 'voxel' space. To match EEG or MEG sensors and to relate the MRI to other anatomical information it is necessary to assign a common 'head coordinates' system. This frequently asked question contains an overview of the various coordinate systems.

% This step is useful to align the original voxel coordinates with a 
% system used also for the sensors (i.e. to align everything in 'Head coordinates')
% Coregister the MRI to a 'CTF-like' reference system (head coordinates)
% The cfg.method is 'interactive' so the nasion, 
% left ear and right ear pits have to be marked by pressing the right keys ('n'/'l'/'r')
 
cfg = [];
cfg.method = 'interactive';
mri_realign = ft_volumerealign(cfg, standard_mri);

MRI Reslicing

The original MRI often has a different resolution within the planes/slices than between the planes/slices. Reslicing makes the dimensions of the voxels cubic and interpolates/reslices the mri volume according to a given grid of points (i.e. in the MEG sensors space). After this transformation the voxel's dimensions are the same and the voxels are aligned with the axes of the coordinate system.

Attention: if the transform matrix is incorrect this may lead to incorrect reslicing since the XYZ box is defined on the physical coordinates

cfg = [];
cfg.resolution = 1; % mm
cfg.dim = mri_orig.dim;
mri_reslice = ft_volumereslice(cfg, mri_realign);

The ft_volumerealign function does not change the volumetric image but sets the origin of the head Cartesian coordinates. Accordingly ft_volumerealign defines slices which are oriented along the direction of the previously defined axes, and eventually sets also the resolution of the voxels. The definition of a homogenous voxel resolution is necessary if we want to apply morphological operators to the anatomic volume (e.g. dilating, opening, etc.).

The realignment operation follows the scheme in the figure below:

The picture shows the original volumetric slices (dotted black axes) and the desired head coordinates axes (bold red axes). Note that the distance of the original slices is 2 cm (in the schematic figure), whereas the pixel distance within the same slice is 1 cm. This causes the voxels to be rectangular in the visualized projection. The reslicing operation returns homogeneous voxel dimensions.

Segment the anatomy

% This may take some time, note that SPM8 is used here
 
cfg = [];
cfg.output= {'scalp','skull','brain'};
[mri_segment] = ft_volumesegment(cfg, mri_reslice); 
 
% Combine the various volumes in one structure for visualization. 
% The 'seg' field will contain the segmented compartment with values 
% that can easily be color coded
mri_combine = mri_reslice;
mri_combine.seg  = mri_segment.scalp + 3*mri_segment.skull + 6*mri_segment.brain;
mri_combine.mask = (mri_combine.seg)>0;
 
cfg = [];
cfg.interactive   = 'yes';
cfg.funparameter  = 'seg';
cfg.funcolormap   = 'jet';
cfg.funcolorlim = [0 7];
cfg.opacitylim    = [0 1.5];
cfg.maskparameter = 'mask';
figure, ft_sourceplot(cfg,mri_combine);


Figure 2. The segmented compartments (skin, skull, brain) colorcoded

Summary and suggested further readings

This tutorial showed how to create a geometrical description for the volume-conduction models. In order to build a volume conduction model the following functions are available in FieldTrip at this moment:

You can read more about these functions on the reference pages that you can reach if you click on the function-names above. In the future, one new function, ft_prepare_headmodel will be used for creating the different types of volume conduction models. It will substitute all the different functions above. But this function is still under development.

If you are interested in how to create a forward model, check the ft_prepare_leadfield function or other tutorial pages about source reconstruction: Localizing oscillatory sources using beamformer techniques and Source reconstruction of event-related fields using minimum-norm estimate.

The following example scripts and FAQs deal also with volume conduction models and forward modelling:

tutorial/headmodel.txt · Last modified: 2011/11/30 22:53 by 131.174.45.50

You are here: starttutorialheadmodel
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