Skip to contents

Repositions cortical hemisphere meshes in a ggseg3d widget. Meshes are produced with anatomical positioning by default (medial edges at x = 0). Use this to centre each hemisphere at the origin for atlas-creation snapshots, or to reapply anatomical positioning after manual edits.

Usage

set_positioning(p, positioning = c("anatomical", "centered"))

Arguments

p

ggseg3d widget object

positioning

How to position hemispheres: - "anatomical": Medial surfaces adjacent at midline. Left at negative x, right at positive x. Default for displaying both hemispheres together. - "centered": Centre each hemisphere at the origin. Best for single-hemisphere snapshots where consistent sizing is needed.

Value

ggseg3d widget object with repositioned meshes

Details

Only cortical hemisphere meshes are repositioned (those named `"<hemi> <surface>"`, e.g. `"left inflated"`). Subcortical, cerebellar and glassbrain meshes are left untouched.

Examples

# View both hemispheres anatomically positioned (default)
ggseg3d(hemisphere = c("left", "right")) |>
  pan_camera("left lateral")
# Atlas creation: centered for consistent sizing ggseg3d(hemisphere = "left") |> set_positioning("centered") |> set_orthographic() |> pan_camera("left lateral")