resolve_brain_mesh: Resolve brain surface mesh

View source: R/brain-mesh.R

resolve_brain_meshR Documentation

Resolve brain surface mesh

Description

Resolves and prepares a brain surface mesh for rendering. Delegates to [ggseg.formats::get_brain_mesh()] for inflated surfaces and to [ggseg.meshes::get_cortical_mesh()] for pial, white, semi-inflated, and other surfaces. Corrects 0-based face indices and centers inflated/semi-inflated meshes on pial centroids.

Usage

resolve_brain_mesh(
  hemisphere = c("lh", "rh"),
  surface = c("inflated", "semi-inflated", "white", "pial", "sphere", "smoothwm", "orig"),
  brain_meshes = NULL
)

Arguments

hemisphere

'"lh"' or '"rh"'

surface

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

brain_meshes

Optional user-supplied mesh data. Passed through to [ggseg.formats::get_brain_mesh()] for format details.

Value

list with vertices (data.frame with x, y, z) and faces (data.frame with i, j, k), or NULL if mesh not found

Examples

## Not run: 
resolve_brain_mesh("lh", "inflated")

## End(Not run)


ggseg3d documentation built on April 9, 2026, 5:07 p.m.