Interactive 3D Brain Atlas Visualization

Plot brain atlases as interactive 3D meshes using 'Three.js' via 'htmlwidgets', or render publication-quality static images through 'rgl' and 'rayshader'. A pipe-friendly API lets you map data onto brain regions, control camera angles, toggle region edges, overlay glass brains, and snapshot or ray-trace the result. Additional atlases are available through the 'ggsegverse' r-universe. Mowinckel & Vidal-Piñeiro (2020) .


ggseg3d

CoverageStatus CRANstatus downloads Lifecycle:stable code-quality R-CMD-check

Interactive 3D brain atlas visualization in R. Plot brain parcellations as WebGL meshes powered by Three.js, or render publication-quality static images through rgl and rayshader. A pipe-friendly API lets you map data onto brain regions, control camera angles, toggle region edges, overlay glass brains, and snapshot the result.

Installation

Install from CRAN:

install.packages("ggseg3d")

Or get the development version from the ggsegverse r-universe:

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

Atlases

Three atlases ship with the package (via ggseg.formats):

  1. dk – Desikan-Killiany cortical atlas
  2. aseg – Automatic subcortical segmentation
  3. tracula – White-matter tract atlas

Additional atlases are available through the ggsegverse r-universe.

Usage

ggseg3d(atlas = dk(), hemisphere = "left") |>
  pan_camera("left lateral")

Subcortical structures with a translucent glass brain overlay:

ggseg3d(atlas = aseg()) |>
  add_glassbrain() |>
  pan_camera("right lateral")

See the package website for the full walkthrough, rayshader rendering, and Shiny integration.

Citation

Mowinckel & Vidal-Piñeiro (2020). Visualization of Brain Statistics With R Packages ggseg and ggseg3d. Advances in Methods and Practices in Psychological Science. doi:10.1177/2515245920928009

Funding

This tool is partly funded by:

EU Horizon 2020 Grant: Healthy minds 0-100 years: Optimising the use of European brain imaging cohorts (Lifebrain).

Grant agreement number: 732592.

Call: Societal challenges: Health, demographic change and well-being

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("ggseg3d")

2.1.2 by Athanasia Mo Mowinckel, 3 months ago


https://github.com/ggsegverse/ggseg3d, https://ggsegverse.github.io/ggseg3d/


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


Browse source code at https://github.com/cran/ggseg3d


Authors: Athanasia Mo Mowinckel [aut, cre] (ORCID: , Didac Vidal-Piñeiro [aut] (ORCID: , Center for Lifespan Changes in Brain and Cognition (LCBC) , University of Oslo [cph] , three.js authors [ctb, cph] (Three.js and OrbitControls libraries , see LICENSE.note)


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports cli, dplyr, ggseg.formats, htmlwidgets, knitr, lifecycle, rlang, scales, tidyr, webshot2

Suggests ggseg.meshes, png, rayshader, rgl, rmarkdown, shiny, spelling, testthat


See at CRAN