Note that this reference documentation is identical to the help that is displayed in Matlab when you type “help ft_volumesegment”.
FT_VOLUMESEGMENT segments an anatomical MRI into gray matter, white matter,
and cerebro-spinal fluid compartments.
This function uses the SPM2 toolbox, see http://www.fil.ion.ucl.ac.uk/spm/
Use as
[segment] = ft_volumesegment(cfg, mri)
The input arguments are a configuration structure (see below) and an
anatomical MRI structure. Instead of an MRI structure, you can also
specify a string with a filename of an MRI file.
The configuration options are
cfg.spmversion = 'spm8' (default) or 'spm2'
cfg.template = filename of the template anatomical MRI (default is the 'T1.mnc' (spm2) or 'T1.nii' (spm8)
in the (spm-directory)/templates/)
cfg.name = string for output filename
cfg.write = 'no' or 'yes' (default = 'no'),
writes the segmented volumes to SPM compatible analyze-files,
with the suffix (spm2)
_seg1, for the gray matter segmentation
_seg2, for the white matter segmentation
_seg3, for the csf segmentation
or with the prefix (spm8)
c1, for the gray matter segmentation
c2, for the white matter segmentation
c3, for the csf segmentation
cfg.smooth = 'no' or the FWHM of the gaussian kernel in voxels (default = 'no')
cfg.coordinates = 'spm, 'ctf' or empty for interactive (default = [])
As the first step the coordinate frame of the input MRI has to
be approximately aligned to the template. For this, a homogeneous
transformation matrix is used, which makes the assumption that the
template mri is defined in SPM/MNI-coordinates:
x-axis pointing to the right ear
y-axis along the acpc-line
z-axis pointing to the top of the head
origin in the anterior commissure.
Note that the segmentation only works if the template MRI is in SPM
coordinates.
If the input mri is a string pointing to a CTF *.mri file, the
x-axis is assumed to point to the nose, and the origin is assumed
to be on the interauricular line.
If the input mri is a string pointing to another fileformat, or a
structure containing an anatomical MRI in Matlab memory, the user will
be asked about the axis-definition and the origin of the coordinate system.
As a second step, the segmentation is performed, using the
default parameters from SPM. The output volume is in the original
coordinate-frame.
As a third and optional step, you can perform a smoothing of the segmented
volumes.