fsbrain (version 0.0.2)

coloredmesh.from.morphdata: Create a coloredmesh from arbitrary data.

Description

Create a coloredmesh from arbitrary data.

Usage

coloredmesh.from.morphdata(subjects_dir, vis_subject_id, morph_data, hemi,
  surface = "white", colormap = squash::jet,
  all_nan_backup_value = 0)

Arguments

subjects_dir,

string. The FreeSurfer SUBJECTS_DIR, containing the subdir of vis_subject_id, the subject that you want to use for visualization.

vis_subject_id,

string. The subject identifier from which to obtain the surface for data visualization. Example: 'fsaverage'.

morph_data,

string. The morphometry data to use. E.g., 'area' or 'thickness.'

hemi,

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

surface,

string. 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 [squash::jet].

all_nan_backup_value,

numeric. If all morph_data values are NA/NaN, no color map can be created. In that case, the values are replaced by this value, and this is indicated in the entry morph_data_was_all_na in the return value. Defaults to 0.0.

Value

coloredmesh. A named list with entries: "mesh" the [rgl::tmesh3d] mesh object. "col": the mesh colors. "morph_data_was_all_na", logical. Whether the mesh values were all NA, and thus replaced by the all_nan_backup_value. "hemi": the hemisphere, one of 'lh' or 'rh'.