| set_positioning | R Documentation |
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.
set_positioning(p, positioning = c("anatomical", "centered"))
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. |
Only cortical hemisphere meshes are repositioned (those named '"<hemi> <surface>"', e.g. '"left inflated"'). Subcortical, cerebellar and glassbrain meshes are left untouched.
ggseg3d widget object with repositioned meshes
# 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.