Validates and registers a NIfTI label map and optional metadata table as a
boldR_atlas object. The schema is intentionally minimal: any parcellation
that provides a 3D integer label image and a label-to-name mapping can be
registered and passed to parcellate(). Bundled atlas helpers (Schaefer,
AAL, Glasser) use this same interface.
Arguments
- labels_img
A
niftiImage(3D integer) or a file path to a NIfTI label map. Voxels containing0are treated as background.- metadata
A data frame with at minimum two columns:
labelInteger. The integer value in
labels_img.nameCharacter. Human-readable ROI name.
Additional columns (hemisphere, network, x/y/z centroid, colour, etc.) are stored and carried through to output.
- name
Character. A short identifier for this atlas (e.g.
"Schaefer200","AAL3","custom").- space
Character. The standard space this atlas is defined in. Default
"MNI152NLin2009cAsym". Must match the space used inread_fmriprep()/parcellate().
Value
A list of class boldR_atlas with components:
- labels_img
niftiImage. The 3D integer label map.- metadata
Data frame. ROI metadata.
- name
Character. Atlas identifier.
- space
Character. Standard space.
- n_rois
Integer. Number of unique non-zero labels.
Examples
if (FALSE) { # \dontrun{
atlas <- register_atlas(
labels_img = "atlases/Schaefer2018_200Parcels_7Networks_MNI.nii.gz",
metadata = read.csv("atlases/Schaefer2018_200Parcels_labels.csv"),
name = "Schaefer200",
space = "MNI152NLin2009cAsym"
)
atlas
} # }