Creates a surface mesh, applies a colormap transform the morphometry data values into colors, and renders the resulting colored mesh in an interactive window. If hemi is 'both', the data is rendered for the whole brain.
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.
- vis_subject_id
string. The subject identifier from which to obtain the surface for data visualization. Example: 'fsaverage'.
- morph_data_lh
numeric vector or character string or NULL, the data to visualize on the left hemisphere surface. If a string, it is treated as a filename and data is loaded from it first. When it is a numerical vector, this is assumed to be the data already. The data must have the same length as the surface of the vis_subject_id has vertices. If NULL, this surface will not be rendered. Only one of morph_data_lh or morph_data_rh is allowed to be NULL.
- morph_data_rh
numeric vector or character string or NULL, the data to visualize on the right hemisphere surface. If a string, it is treated as a filename and data is loaded from it first. When it is a numerical vector, this is assumed to be the data already. The data must have the same length as the surface of the vis_subject_id has vertices. If NULL, this surface will not be rendered. Only one of morph_data_lh or morph_data_rh is allowed to be NULL.
- surface
string. The display surface. E.g., "white", "pial", or "inflated". Defaults to "white".
- views
list of strings. Valid entries include: 'si': single interactive view. 't4': tiled view showing the brain from 4 angles. 't9': tiled view showing the brain from 9 angles.
- rgloptions
option list passed to
par3d. Example:rgloptions = list("windowRect"=c(50,50,1000,1000)).- rglactions
named list. A list in which the names are from a set of pre-defined actions. The values can be used to specify parameters for the action. The following example clips outliers in the data before plotting and writes a screenshot in PNG format:
rglactions = list("snapshot_png"="~/fsbrain.png", "clip_data"=c(0.05, 0.95)). Seerglactions.- draw_colorbar
logical or one of the character strings 'vertical' or 'horizontal', whether to draw a colorbar. Notice: the colorbar is drawn to a separate subplot, and this only works if there is enough space for it, i.e., the plot resolution must be high enough. You may have to increase the plot size for the colorbar to show up, see the vignette for instructions. Defaults to
FALSE. Seecoloredmesh.plot.colorbar.separatefor an alternative.- makecmap_options
named list of parameters to pass to
makecmap. Must not include the unnamed first parameter, which is derived from 'measure'. Should include at least a colormap function as name 'colFn'.- bg
a background definition. Can be a surface color layer or a character string like 'curv_light' to select a pre-defined layer, see
collayer.bgfor valid strings.- morph_data_both
numeric vector or NULL, the data to visualize on both hemispheres. This must be a single vector with length equal to the sum of the vertex counts of the left and the right hemisphere. The data for the left hemisphere must come first. If this is given, 'morph_data_lh' and 'morph_data_rh' must be NULL.
- style
character string, a rendering style, e.g., 'default', 'shiny' or 'semitransparent'.
See also
Other visualization functions:
highlight.vertices.on.subject(),
highlight.vertices.on.subject.spheres(),
vis.color.on.subject(),
vis.data.on.fsaverage(),
vis.labeldata.on.subject(),
vis.mask.on.subject(),
vis.region.values.on.subject(),
vis.rglwidget(),
vis.subject.annot(),
vis.subject.label(),
vis.subject.morph.native(),
vis.subject.morph.standard(),
vis.subject.pre(),
vis.symmetric.data.on.subject(),
vis.volume.on.surface(),
vislayout.from.coloredmeshes()
Other morphometry visualization functions:
vis.data.on.fsaverage(),
vis.subject.morph.native(),
vis.subject.morph.standard(),
vis.symmetric.data.on.subject()
Examples
if (FALSE) { # \dontrun{
fsbrain::download_optional_data();
subjects_dir = fsbrain::get_optional_data_filepath("subjects_dir");
morph_data_lh = subject.morph.native(subjects_dir, 'subject1', 'thickness', 'lh');
morph_data_rh = NULL;
vis.data.on.subject(subjects_dir, 'subject1', morph_data_lh, morph_data_rh);
} # }