View source: R/atlas_convert.R
| convert_legacy_brain_atlas | R Documentation |
Convert old-style ggseg (2D) and ggseg3d (3D) atlases into the new
ggseg_atlas format. This is a bridge function for working with existing
atlases during the transition period.
For new atlases, use ggsegExtra::create_cortical_atlas() or
ggsegExtra::create_subcortical_atlas()
instead - they produce better results with proper vertex indices.
The function handles three scenarios:
Both 2D and 3D: Merges geometry with vertex data
3D only: Extracts vertices, infers indices from mesh coordinates
2D only: Keeps geometry, 3D rendering unavailable
If the 3D atlas already contains vertex indices (newer ggseg3d atlases), those are preserved. Otherwise, vertex indices are inferred from mesh coordinates using hash-based matching (no FreeSurfer needed).
convert_legacy_brain_atlas(
atlas_2d = NULL,
atlas_3d = NULL,
atlas_name = NULL,
type = NULL,
surface = "inflated",
brain_meshes = NULL
)
unify_legacy_atlases(
atlas_2d = NULL,
atlas_3d = NULL,
atlas_name = NULL,
type = NULL,
surface = "inflated",
brain_meshes = NULL
)
atlas_2d |
A |
atlas_3d |
A |
atlas_name |
Name for the output atlas. If NULL, derived from input. |
type |
Atlas type: |
surface |
Which surface to match against when inferring vertices
(e.g., |
brain_meshes |
Optional user-supplied brain meshes for vertex inference. |
A ggseg_atlas object.
new_atlas <- convert_legacy_brain_atlas(atlas_2d = dk())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.