Brain Atlas Data Structures for the 'ggsegverse' Ecosystem

Provides the 'ggseg_atlas' S3 class used across the 'ggsegverse' ecosystem for 2D and 3D brain visualisation. Ships four bundled atlases ('Desikan-Killiany', 'FreeSurfer' 'aseg', 'TRACULA', 'SUIT') and functions for querying, subsetting, renaming, and enriching atlas objects. Also includes readers for 'FreeSurfer' statistics files.


ggseg.formats

R-CMD-check code-quality coverage CRANstatus Lifecycle:experimental

ggseg.formats provides the ggseg_atlas S3 class that powers the ggsegverse ecosystem for 2D and 3D brain visualisation. It ships four bundled atlases, a set of accessor functions for querying atlas contents, and a pipe-friendly manipulation API for subsetting, renaming, and enriching atlas objects.

Bundled atlases

The package includes four atlases covering the main atlas types:

  • dk — Desikan-Killiany cortical parcellation (68 regions)
  • aseg — FreeSurfer automatic subcortical segmentation
  • tracula — TRACULA white matter tract atlas
  • suit — SUIT cerebellar lobular atlas
library(ggseg.formats)
plot(dk())
plot(aseg())
plot(tracula())
plot(suit())

Quick example

Atlas objects are designed for exploration and customisation. You can query regions, filter views, and pipe operations together:

aseg_small <- aseg() |>
  atlas_region_keep("hippocampus|amygdala|thalamus") |>
  atlas_view_keep("coronal_3|axial_3") |>
  atlas_view_gather()
plot(aseg_small)

Installation

Install from the ggsegverse r-universe:

options(repos = c(
    ggsegverse = 'https://ggsegverse.r-universe.dev',
    CRAN = 'https://cloud.r-project.org'))

install.packages('ggseg.formats')

Or install the development version from GitHub:

# install.packages("devtools")
devtools::install_github("ggsegverse/ggseg.formats")

Learn more

  • vignette("ggseg.formats") — understanding atlas structure and accessors
  • vignette("atlas-manipulation") — region, view, and metadata manipulation

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("ggseg.formats")

0.0.4 by Athanasia Mo Mowinckel, 3 months ago


https://github.com/ggsegverse/ggseg.formats, https://ggsegverse.github.io/ggseg.formats/


Report a bug at https://github.com/ggsegverse/ggseg.formats/issues


Browse source code at https://github.com/cran/ggseg.formats


Authors: Athanasia Mo Mowinckel [aut, cre] (ORCID: , Center for Lifespan Changes in Brain and Cognition (LCBC) , University of Oslo [cph]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports cli, lifecycle, rlang, sfheaders

Suggests covr, devtools, here, knitr, rmarkdown, sf, spelling, testthat, withr


Imported by ggseg, ggseg3d.

Suggested by ggseg.meshes.


See at CRAN