== MRIs, meshes and Forward Models in SPM5 == * SPM creates meshes by segmenting and normalising a subject's MRI (using unified segmentation; Ashburner & Friston, 2005, Neuroimage), then binarizing images of 1) the cortex (based on greymatter segment, c1sCBU*.nii), 2) the inner skull (based on the sum of grey, white and CSF segments, c1-c3*.nii) and 3) the outer scalp (based on the whole MRI). These images are eroded and grown a bit to smooth, then a simple shrink-wrap algorithm is used to fit a mesh to the outer surface of these images. * This gives reasonable meshes for the inner skull and outer scalp. The above process does not however do a good job for the much more convoluted cortical surface. Fortunately, SPM offers the use of a "canonical" cortical mesh, which is created by taking a (high quality, manually-created) cortical mesh of SPM's canonical MRI in MNI space, and warping it to match the subject's MRI by using the inverse of the normalisation parameters created above (see Mattout et al, 2007, Neuroimage; Henson et al, in press, Neuroimage). * A (triangular) mesh is simply defined by a number of "vertices" (x, y, z coordinates in a space, eg MRI space) and "faces" (triplets of integers that refer to each vertex that forms the corner of a triangle) - with typically at least twice as many faces as vertices. * For MEG, a single-shell (surface) is usually believed sufficient for calculating the leadfield matrix (ie, matrix of magnetic fields detected by each sensor for each location of an electrical dipole within a volume, determined by projecting the magnetic field caused by that current onto a surface according to Maxwell's equations). A single-sphere does a reasonable job, fit for example to the inner skull (only the centre of the sphere matters; the radius is irrelevant), and is very quick to estimate because of an analytical solution. * A single-shell Boundary Element Model (BEM) can do a better job for MEG (e.g, for "less spherical" regions of the cortex), although takes much longer to estimate (because it entails numerical solution) and can be prone to inaccuracies in the surface estimation or insufficient mesh resolution (e.g, face length relative to distance between surfaces). The BEM can be based on any skull/scalp mesh, though the inner skull is often used because it is often better defined (and typically contains the greatest change in conductivity, ie boundary between CSF (conductor) and skull (insulator)). * For EEG however, at least three-shells are needed - inner skull, outer skull and outer scalp - since the radius and conductivities associated with each boundary are important for predicting the electrical field measured by electrodes on the scalp. Three concentric spheres can be used, fit for example to the inner skull and with a specified ratio of radii, and for which analytical solutions and approximations (eg Berg approach) can again be utilised. However, BEMs (or even more sophisticated "finite" rather than "boundary" methods) are generally believed important for EEG.