| ggseg_atlas | R Documentation |
Creates an object of class 'ggseg_atlas' for plotting brain parcellations using ggseg (2D) and ggseg3d (3D).
ggseg_atlas(atlas, type, core, data, palette = NULL)
brain_atlas(atlas, type, core, data, palette = NULL)
atlas |
atlas short name, length one |
type |
atlas type: "cortical", "subcortical", "tract", or "cerebellar" |
core |
data.frame with required columns hemi, region, label (one row per unique region). May contain additional columns for grouping or metadata (e.g., lobe, network, Brodmann area). |
data |
a ggseg_atlas_data object created by
|
palette |
named character vector of colours keyed by label |
an object of class 'ggseg_atlas'
core <- data.frame(
hemi = c("left", "left"),
region = c("region1", "region2"),
label = c("lh_region1", "lh_region2")
)
vertices <- data.frame(
label = c("lh_region1", "lh_region2"),
vertices = I(list(c(1L, 2L, 3L), c(4L, 5L, 6L)))
)
atlas <- ggseg_atlas(
atlas = "test",
type = "cortical",
core = core,
data = ggseg_data_cortical(vertices = vertices)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.