Skip to contents

ggseg atlas

Create and inspect ggseg atlas objects.

core_contract
What an atlas's three name columns mean
ggseg_atlas() brain_atlas()
Constructor for ggseg atlas
ggseg_data_cerebellar()
Create cerebellar atlas data
ggseg_data_cortical() brain_data_cortical()
Create cortical atlas data
ggseg_data_subcortical() brain_data_subcortical()
Create subcortical atlas data
ggseg_data_tract() brain_data_tract()
Create tract atlas data
ggseg_data_wm()
Create white-matter atlas data
is_ggseg3d_atlas()
Check if object is a legacy ggseg3d atlas
is_ggseg_atlas() is_cortical_atlas() is_subcortical_atlas() is_tract_atlas() is_cerebellar_atlas() is_wm_atlas() is_brain_atlas()
Check ggseg atlas class
as_ggseg_atlas() as_brain_atlas()
Coerce to ggseg atlas
assert_ggseg_atlas()
Require a valid ggseg atlas, reporting why it is not

Legacy conversion

Convert old ggseg/ggseg3d atlases to the unified ggseg_atlas format.

convert_legacy_brain_atlas() unify_legacy_atlases() superseded
Convert legacy ggseg atlases to ggseg_atlas format
as_ggseg_atlas() as_brain_atlas()
Coerce to ggseg atlas
atlas_labels() brain_labels()
Extract the label column of an atlas
atlas_regions() brain_regions()
Extract the region column of an atlas
atlas_views() brain_views()
Get available views in atlas
get_brain_mesh()
Get brain surface mesh
ggseg_atlas() brain_atlas()
Constructor for ggseg atlas
ggseg_data_cortical() brain_data_cortical()
Create cortical atlas data
ggseg_data_subcortical() brain_data_subcortical()
Create subcortical atlas data
ggseg_data_tract() brain_data_tract()
Create tract atlas data
is_ggseg_atlas() is_cortical_atlas() is_subcortical_atlas() is_tract_atlas() is_cerebellar_atlas() is_wm_atlas() is_brain_atlas()
Check ggseg atlas class
migrate_atlas_display()
Give an atlas built before display existed its display names
migrate_atlas_hemi()
Map a legacy hemi spelling onto the vocabulary

Accessors

Query atlas contents without reaching into slots directly.

atlas_centerlines()
Get atlas tract centerlines
atlas_context()
The labels an atlas draws but does not treat as regions
atlas_display()
Extract the display-name column of an atlas
atlas_geom()
Get the raw 2D geometry of an atlas
atlas_geometry_type() is_atlas_sf() is_atlas_polygon()
Classify or test an atlas's 2D geometry
atlas_hemi()
Extract the hemisphere column of an atlas
atlas_labels() brain_labels()
Extract the label column of an atlas
atlas_meshes()
Get atlas meshes for 3D rendering
atlas_palette()
Get the palette of an atlas
atlas_plot_palette()
Get a plottable palette for an atlas
atlas_polygons()
Get atlas polygons for 2D rendering
atlas_provenance()
How an atlas was built
atlas_region_semantics()
Does this atlas's region aggregate across hemispheres?
atlas_regions() brain_regions()
Extract the region column of an atlas
atlas_sf()
Get atlas data for 2D rendering
atlas_type()
Detect atlas type
atlas_undrawn()
The regions an atlas names but never draws
atlas_vertices()
Get atlas vertices for 3D rendering
atlas_views() brain_views()
Get available views in atlas
atlas_views_empty()
The views an atlas has that draw no region
legacy_region_map()
Map pre-0.1.0 region names to current region keys
get_cerebellar_mesh()
Get SUIT cerebellar surface mesh

Setters

Replace atlas properties, returning a modified ggseg_atlas.

set_atlas_palette()
Set the palette of an atlas
set_atlas_provenance()
Record how an atlas was built
set_atlas_type()
Set the type of an atlas
set_mesh_space() get_mesh_space()
Attach or read a mesh's coordinate record

Geometry representation (sf-optional)

Convert atlas 2D geometry between sf and the sf-optional brain_polygons representation stored in the single geom slot, and migrate atlas files.

as_polygon_atlas()
Convert a ggseg atlas to the sf-optional polygon representation
as_sf_atlas()
Rehydrate a ggseg atlas into sf-backed form
migrate_atlas_files()
Migrate atlas .rda files to the sf-optional polygon format
attach_sfc()
Attach an sfc column and class a data frame as sf, without sf
reorder_sfc()
Reorder an sfc without sf

Mesh coordinate spaces

Record what a mesh’s coordinates mean, so a consumer reads its vertex space, hemisphere and mapping to MNI305 rather than inferring them.

mesh_space()
Record what a mesh's coordinates mean

Atlas manipulation

Pipe-friendly functions, each group acting on a different thing: the regions an atlas has, the views it has, and which regions are drawn inside a view. All return a new ggseg_atlas.

atlas_core_add()
Join additional metadata columns to an atlas's core
atlas_manipulation
Manipulate brain atlas regions, views and drawings
atlas_relabel() relabel_atlas()
Re-key an atlas's labels
atlas_structure_reorder()
Reorder the structures of an atlas
atlas_prune_region() atlas_prune_small() atlas_prune_weak() atlas_view_select() atlas_view_remove_region() atlas_view_remove_small()
Change which regions are drawn inside a view
atlas_region_remove() atlas_region_contextual() atlas_region_op() atlas_context_remove() atlas_region_rename() atlas_region_keep()
Change which regions an atlas has
atlas_view_remove() atlas_view_keep() atlas_view_gather() atlas_view_reorder()
Change which views an atlas has, and where they sit
context() regions()
Select an atlas's backdrop, or its regions, in a geometry verb

Bundled atlases

Ready-to-use atlases shipped with the package.

dk()
Desikan-Killiany Cortical Atlas
aseg()
FreeSurfer Automatic Subcortical Segmentation Atlas
tracula()
TRACULA White Matter Tract Atlas
suit()
SUIT Cerebellar Lobular Atlas

FreeSurfer I/O

Read FreeSurfer statistics files into R.

read_atlas_files()
Read in atlas data from all subjects
read_freesurfer_stats()
Read in raw FreeSurfer stats file
read_freesurfer_table()
Read in stats table from FreeSurfer