Package 'ggseg.meshes'

Title: Additional Brain Surface Meshes for the 'ggsegverse' Ecosystem
Description: Provides additional brain surface meshes for cortical and cerebellar visualisation in the 'ggsegverse' ecosystem. Cortical surfaces include pial, white, midthickness, semi-inflated, sphere, smoothwm, and orig at fsaverage5 resolution. Cerebellar surfaces include the Spatially Unbiased Infratentorial Template (SUIT) flatmap. All meshes follow the same vertices/faces data frame format used by 'ggseg.formats' and 'ggseg3d'.
Authors: Athanasia Mo Mowinckel [aut, cre] (ORCID: <https://orcid.org/0000-0002-5756-0223>), Center for Lifespan Changes in Brain and Cognition (LCBC), University of Oslo [cph]
Maintainer: Athanasia Mo Mowinckel <[email protected]>
License: MIT + file LICENSE
Version: 0.0.1
Built: 2026-05-09 08:26:54 UTC
Source: https://github.com/ggsegverse/ggseg.meshes

Help Index


List available cerebellar surfaces

Description

List available cerebellar surfaces

Usage

available_cerebellar_surfaces()

Value

Character vector of available surface names.

Examples

available_cerebellar_surfaces()

List available cortical surfaces

Description

List available cortical surfaces

Usage

available_cortical_surfaces()

Value

Character vector of available surface names.

Examples

available_cortical_surfaces()

Get SUIT cerebellar flatmap mesh

Description

Retrieves the SUIT cerebellar flatmap surface mesh. This is a 2D flattened representation of the cerebellar cortex, useful for visualising cerebellar parcellations without 3D rendering.

Usage

get_cerebellar_flatmap(surface = .cerebellar_surfaces)

Arguments

surface

Surface type. Currently only "suit_flat".

Details

The flatmap has z-coordinates near zero (flat projection). Vertex count matches the SUIT 3D pial surface in ggseg.formats, so vertex indices from cerebellar atlases map directly to this mesh.

Value

A list with vertices (data.frame with x, y, z) and faces (data.frame with i, j, k, 0-based indices matching ggseg.formats convention for cerebellar meshes). Has attribute face_index_base = 0L.

Examples

mesh <- get_cerebellar_flatmap()
nrow(mesh$vertices)

Get cortical brain surface mesh

Description

Retrieves a cortical brain surface mesh for the specified hemisphere and surface type. All surfaces are fsaverage5 resolution (10,242 vertices, 20,480 faces per hemisphere).

Usage

get_cortical_mesh(hemisphere = c("lh", "rh"), surface = .cortical_surfaces)

Arguments

hemisphere

"lh" or "rh"

surface

Surface type: "pial", "white", "midthickness", "semi-inflated", "sphere", "smoothwm", or "orig"

Value

A list with vertices (data.frame with x, y, z) and faces (data.frame with i, j, k, 1-based indices). Has attribute face_index_base = 1L.

Examples

mesh <- get_cortical_mesh("lh", "pial")
nrow(mesh$vertices)