Note that this reference documentation is identical to the help that is displayed in Matlab when you type “help ft_prepare_mesh”.
FT_PREPARE_MESH creates a triangulated surface mesh for the volume conduction model. The mesh can either be selected manually from raw mri data or can be generated starting from a segmented volume information stored in the mri structure. The result is a bnd structure which contains the information about all segmented surfaces related to mri and are expressed in world coordinates. Use as bnd = ft_prepare_mesh(cfg, mri) Configuration options: cfg.interactive = 'no' (default) or 'yes' (manual interaction) cfg.tissue = list with segmentation values corresponding with each compartment cfg.numvertices = vector, length equal cfg.tissue. e.g. [2000 1000 800]; cfg.downsample = integer (1,2, ...) defines the level of refinement of the mri data cfg.sourceunits = e.g. 'mm' cfg.headshape = (optional) a filename containing headshape, a Nx3 matrix with surface points, or a structure with a single or multiple boundaries To facilitate data-handling and distributed computing with the peer-to-peer module, this function has the following options: cfg.inputfile = ... cfg.outputfile = ... If you specify one of these (or both) the input data will be read from a *.mat file on disk and/or the output data will be written to a *.mat file. These mat files should contain only a single variable, corresponding with the input/output structure. Example use: mri=ft_read_mri('Subject01.mri'); cfg=[]; cfg.output={'scalp', 'skull', 'brain'}; segment=ft_volumesegment(cfg, mri); scalp=(segment.scalp)&~(segment.skull | segment.brain); skull=2*(segment.skull); brain=3*(segment.brain); segment.seg=scalp+skull+brain; cfg=[]; cfg.tissue=[1 2 3]; cfg.numvertices=[2000 1000 800]; cfg.sourceunits=segment.unit; bnd = ft_prepare_mesh(cfg, segment);
Share this page: