coloredmesh.from.mask: Create a coloredmesh from a mask.

View source: R/coloredmesh.R

coloredmesh.from.maskR Documentation

Create a coloredmesh from a mask.

Description

Create a coloredmesh from a mask.

Usage

coloredmesh.from.mask(
  subjects_dir,
  subject_id,
  mask,
  hemi,
  surface = "white",
  surface_data = 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.

mask

logical vector, contains one logical value per vertex.

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".

surface_data

optional surface mesh object, as returned by subject.surface. If given, used instead of loading the surface data from disk (which users of this function may already have done). Defaults to NULL.

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'.

See Also

Other mask functions: mask.from.labeldata.for.hemi(), vis.mask.on.subject()

Other coloredmesh functions: coloredmesh.from.annot(), coloredmesh.from.label(), coloredmesh.from.morph.native(), coloredmesh.from.morph.standard(), coloredmesh.from.morphdata(), coloredmeshes.from.color()


dfsp-spirit/fsbrain documentation built on Nov. 28, 2024, 10:29 a.m.