Create a coloredmesh from a mesh and pre-defined colors.
coloredmesh.from.color(
subjects_dir,
subject_id,
color_data,
hemi,
surface = "white",
metadata = list(),
style = NULL
)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'. If not NULL, also "style": the rendering style for this mesh.
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.
string. The subject identifier.
vector of hex color strings, a single one or one per vertex.
string, one of 'lh' or 'rh'. The hemisphere name. Used to construct the names of the label data files to be loaded.
character string or fs.surface instance. The display surface. E.g., "white", "pial", or "inflated". Defaults to "white".
a named list, can contain whatever you want. Typical entries are: 'src_data' a hemilist containing the source data from which the 'color_data' was created, optional. If available, it is encoded into the coloredmesh and can be used later to plot a colorbar. 'makecmap_options': the options used to created the colormap from the data.
NULL or a rendering style for this mesh, see get.rglstyle. Styles can be a style name (like 'default' or 'glass') or a named list of material properties (like list('alpha'=0.2)). The style is stored in the 'style' field of the returned coloredmesh and is used when the mesh is rendered with style='from_mesh', see vis.coloredmeshes. This is how you can give individual meshes in a scene their own look, e.g., to draw a cortex mesh semi-transparently behind colored data meshes.
Other coloredmesh functions:
Triangles3D.to.coloredmesh(),
coloredmesh.from.annot(),
coloredmesh.from.label(),
coloredmesh.from.mask(),
coloredmesh.from.morph.native(),
coloredmesh.from.morph.standard(),
coloredmesh.from.morphdata(),
coloredmeshes.from.color()