Note that this reference documentation is identical to the help that is displayed in Matlab when you type “help ft_prepare_singleshell”.
FT_PREPARE_SINGLESHELL creates a simple and fast method for the MEG forward calculation for one shell of arbitrary shape. This is based on a correction of the lead field for a spherical volume conductor by a superposition of basis functions, gradients of harmonic functions constructed from spherical harmonics. Use as vol = ft_prepare_singleshell(cfg, seg), or vol = ft_prepare_singleshell(cfg, mri), or vol = ft_prepare_singleshell(cfg) If you do not use a segmented MRI, the configuration should contain cfg.headshape = a filename containing headshape, a structure containing a single triangulated boundary, or a Nx3 matrix with surface points cfg.numvertices = number, to retriangulate the mesh with a sphere (default = 3000) instead of specifying a number, you can specify 'same' to keep the vertices of the mesh identical to the original headshape points The following options are relevant if you use a segmented MRI cfg.smooth = 'no' or the FWHM of the gaussian kernel in voxels (default = 5) cfg.sourceunits = 'mm' or 'cm' (default is 'cm') cfg.threshold = 0.5, relative to the maximum value in the segmentation To facilitate data-handling and distributed computing with the peer-to-peer module, this function has the following option: cfg.inputfile = ... If you specify this option the input data will be read from a *.mat file on disk. This mat files should contain only a single variable named 'mri', corresponding to the input structure. This function implements G. Nolte, "The magnetic lead field theorem in the quasi-static approximation and its use for magnetoencephalography forward calculation in realistic volume conductors", Phys Med Biol. 2003 Nov 21;48(22):3637-52.
Share this page: