Learn R Programming

fsbrain (version 0.1.0)

coloredmesh.from.label: Create a coloredmesh from a label.

Description

Create a coloredmesh from a label.

Usage

coloredmesh.from.label(
  subjects_dir,
  subject_id,
  label,
  hemi,
  surface = "white",
  colormap = NULL,
  makecmap_options = list(colFn = squash::rainbow2)
)

Arguments

subjects_dir

string. The FreeSurfer SUBJECTS_DIR, i.e., a directory containing the data for all your subjects, each in a subdir named after the subject identifier.

subject_id

string. The subject identifier.

label

string or vector of integers. If a string, the name of the label file, without the hemi part (if any), but including the '.label' suffix. E.g., 'cortex.label' for '?h.cortex.label'. Alternatively, the already loaded label data as a vector of integers.

hemi

string, one of 'lh' or 'rh'. The hemisphere name. Used to construct the names of the label data files to be loaded.

surface

character string or `fs.surface` instance. The display surface. E.g., "white", "pial", or "inflated". Defaults to "white".

colormap

a colormap function. See the squash package for some colormaps. Defaults to jet.

makecmap_options

named list of parameters to pass to makecmap. Must not include the unnamed first parameter, which is derived from 'measure'.

Value

coloredmesh. A named list with entries: "mesh" the tmesh3d mesh object. "col": the mesh colors. "render", logical, whether to render the mesh. "hemi": the hemisphere, one of 'lh' or 'rh'.