Creating a volume conduction model of the head for source-reconstruction of MEG data
Introduction
In this tutorial you can find information about how to construct a volume conduction model of the head (head model) based on a single subject's MRI. We will use the anatomical images that belong to the same subject whose data were analyzed in the preprocessing and averaging tutorials (Trigger-based trial selection, Event related averaging and planar gradient). The corresponding anatomical MRI data is available from the ftp server.
The volume conduction model of the head that will be constructed here is specific to the computation and source reconstruction of MEG data. Different strategies can be used for the construction of head models. The processing pipeline of the tutorial is an example which we think is the most appropriate for the tutorial-dataset.
This tutorial will not show how to perform the source reconstruction itself. If you are interested in source reconstruction methods, you can go to the Localizing oscillatory sources using beamformer techniques and to the Source reconstruction of event-related fields using minimum-norm estimate tutorials.
Background
This tutorial is focusing on how to build the volume conduction model for the head.
In this specific tutorial we will use a semi-realistic head model developed by Nolte (2003) that assumes a realistic information about the interface between the brain and the skull. This outer brain surface will be extracted from the anatomical MRI images of the subject. First, we will use anatomical MRI of the subject to extract the brain surface from the anatomical images, which is termed segmentation. Note that the segmentation procedure is quite time consuming. Following the segmentation of the anatomical images, a description of the surface using vertices and triangles is constructed. Finally, the single-shell head model will be computed.
Procedure
We will create a head model based on the anatomical mri of the tutorial data set which is available here. The pipeline is depicted in Figure 2.
- First, we will read the anatomical data with ft_read_mri;
- then we segment the anatomical information into different tissue types with ft_volumesegment;
- and create the headmodel with ft_prepare_headmodel.
- Finally, we will check the geometry of the head model by plotting it with ft_plot_vol.
Reading in the anatomical data
Before starting to use FieldTrip, it is important that you set up your MATLAB path properly. You can read about how to set up your MATLAB path here.
cd PATH_TO_FIELDTRIP ft_defaults
Then, you can read in the mri data.
mri = ft_read_mri('Subject01.mri'); disp(mri) dim: [256 256 256] anatomy: [256x256x256 int16] hdr: [1x1 struct] transform: [4x4 double] unit: 'mm' coordsys: 'ctf'
The structure of your mri variable contains the following fields:
- dim: This field gives information on the size (i.e. the number of voxels) of the anatomical volume into each direction.
- anatomy: This is a matrix (with the size and number of dimensions specified in dim) that contains the anatomical information represented by numbers.
- hdr: Header information of the anatomical images.
- transform: A transformation matrix that aligns the anatomical data (in field anatomy) to a certain coordinate system.
- coordsys: The description of the coordinate system which the anatomical data is aligned to.
You can see that the coordsys field of anatomical data that we read in is already aligned to the ctf coordinate system. This can be done using the CTF specific MRIConverter and MRIViewer software as outlined here or using the ft_volumerealign function.
When you read in your own anatomical data, it may not give information on the coordinate system in which the anatomical data is expressed and/or maybe there is no transformation matrix specified. In this case, you can check the coordinate-system with the ft_determine_coordsys function.
Segmentation
In this step, the voxels of the anatomical MRI are segmented (i.e. separated) into different tissue types . By default, the gray matter, white matter and the cerebro-spinal fluid (csf) compartments are differentiated. Based on these compartments a so called brainmask is created, which is a binary mask of the content inside the skull. All voxels that are inside the skull (i.e. the complete brain) are represented by 1, all other voxels by 0. The function ft_volumesegment will produce the required output.
cfg = []; cfg.output = 'brain'; segmentedmri = ft_volumesegment(cfg, mri); save segmentedmri segmentedmri disp(segmentedmri) dim: [256 256 256] transform: [4x4 double] coordsys: 'ctf' unit: 'mm' brain: [256x256x256 logical] cfg: [1x1 struct]
The segmentedmri data structure contains the following fields:
- dim
- transform
- coordsys
- unit: unit of measurement of the voxels
- brain: binary brainmask
- cfg: configuration information of the function which created segmentedmri
The segmentation does not change the coordinate system, nor the size of the volume. You can see this in the first three fields (dim, transform and coordsys) which are the same as the corresponding fields of the input mri data structure. But now, the field transform aligns the matrix in field brain (which contains the brainmask) to the coordinate system defined in the coordsys field.
Alternatively, you can also leave out the definition of the cfg.output. In this case, the function will output the default segmentation that are the probabilistic values of the gray, white and csf compartments. In this case, the brain mask will be automatically created in the next step by the ft_prepare_headmodel function. For further information on the different segmentation options, read the help of ft_volumesegment.
Head model
Once the brain mask is segmented out of the anatomical MRI, a surface description of the brain is constructed and the volume conduction model . We will specify method 'singleshell' to build the head model in the cfg.method field using ft_prepare_headmodel.
cfg = []; cfg.method='singleshell'; vol = ft_prepare_headmodel(cfg, segmentedmri); save vol vol disp(vol) bnd: [1x1 struct] type: 'singleshell' unit: 'mm' cfg: [1x1 struct]
The vol data structure contains the following fields:
- bnd: contains the geometrical description of the head model.
- type: describes the method that was used to create the headmodel.
- unit: the unit of measurement of the geometrical data in the bnd field
- cfg: configuration of the function that was used to create vol
The bnd field describes a surface with vertices and triangles (in the bnd.pnt and bnd.tri fields) as the geometrical description of the volume conductor.
The method used in this tutorial is based on Nolte G. (2003) The magnetic lead field theorem in the quasi-static approximation and its use for magnetoencephalography forward calculation in realistic volume conductors. We recommend this method for most general MEG situations.
The paper Lalancette M, Quraan M, Cheyne D. (2011) Evaluation of multiple-sphere head models for MEG source localization discusses another popular method for MEG forward modeling, which is based on fitting local spheres to the surface. This alternative method can be used by specifying 'localspheres' as method in ft_prepare_headmodel.
Alternatively, you can also create and use a multiple-layered head model with Openmeeg. For this you can follow the procedure described in the tutorial for creating a volume conduction model for EEG data
Visualization
The head model (vol) contains the brain-skull boundary as the geometrical description of the head. You can visualize this using the following code. First, we will plot the sensors (MEG channels) with the ft_plot_sens function. Second, we will plot the head model with ft_plot_vol in the same figure with the sensors. In order to plot also the location of the MEG channels, we read in the location of the channels using the .ds file from the tutorial data and the ft_read_sens function. (The .zip file that can be downloaded from the FieldTrip ftp server also contains the .ds file.) The units of the headmodel are defined in 'mm', while the units of the sensors are in 'cm'. When we plot the headmodel together with the sensors, they need to have the same units. Therefore, the units of the headmodel will be converted to 'cm' with the ft_convert_units function.
vol = ft_convert_units(vol,'cm'); sens = ft_read_sens('Subject01.ds'); figure ft_plot_sens(sens, 'style', '*b'); hold on ft_plot_vol(vol);
Figure 3. The geometry of the volume conduction model of the head using method “singleshell”
When the figure is plotted, you can look at the figure from different views using the curved arrow in the MATLAB figure menu. Note that there are 4 channels hovering above the normal channels; those are the MEG reference channels that can be used for environmental noise suppression.
Exercise 1
- Create a head model with method 'singlesphere' that you fit on the inside brain surface, i.e. using the output of the already made segmentation.
- Plot both head models in the same figure, check the help of ft_plot_vol for further options of the visualization (e.g. color, transparency) which help to see the two head models together.
- What is the difference between the head models?
Exercise 2
- In exercise 1, you created a head model with method 'singlesphere'. How is its geometrical description defined? What is the difference between the fields of the single sphere and single shell model which contain the geometrical description?
Summary and further reading
In this tutorial, it was explained how to build a volume conduction model of the head using a single subject anatomical mri and the single shell method developed by Nolte (2003). In the exercises, we compared the head model to a single sphere that was fitted on the inside brain surface.
You can read more about specific source-reconstruction methods in the Localizing oscillatory sources using beamformer techniques and in the Source reconstruction of event-related fields using minimum-norm estimate tutorials.
Here are the related faqs:
2009/11/09 15:25 | ||
2009/02/17 15:18 | Robert Oostenveld | |
2009/02/17 15:16 | Robert Oostenveld | |
2009/02/17 15:16 | Robert Oostenveld | |
2012/03/02 15:55 | ||
2011/02/01 12:39 | ||
2013/12/05 11:01 | Robert Oostenveld | |
2011/08/25 21:39 | Robert Oostenveld | |
2010/09/15 16:21 | ||
2011/09/07 09:57 | ||
2014/05/26 15:59 | Jan-Mathijs Schoffelen | |
2012/10/22 10:55 | Lilla Magyari | |
2010/10/06 16:30 | Robert Oostenveld | |
2010/01/12 10:44 | ||
2009/02/17 15:15 | Robert Oostenveld | |
2009/02/26 22:06 |
and the related example scripts:
2009/03/03 21:52 | ||
2009/03/03 21:58 | ||
2012/08/09 20:01 | Lilla Magyari | |
2014/09/25 19:55 | ||
2009/03/03 21:52 | ||
2009/07/31 11:49 | ||
2009/07/09 20:11 | ||
2013/10/07 16:29 | Lilla Magyari | |
2010/07/21 11:04 | Robert Oostenveld | |
2009/05/20 14:57 | ||
2010/01/04 18:18 | ||
2009/03/31 14:21 | ||
2009/03/03 21:53 | ||
2012/05/29 17:19 | ||
2009/04/08 11:14 | Robert Oostenveld | |
2009/05/20 14:57 | ||
2009/03/05 16:56 | Saskia Haegens | |
2009/10/29 16:22 |