Combines two brain atlases into a single unified atlas object, preserving all region information and adjusting region IDs to prevent conflicts. This is useful for creating composite atlases that combine different parcellation schemes.
Value
A new atlas object containing:
- name
Combined names of input atlases (atlas1::atlas2)
- atlas
Combined
ClusteredNeuroVolobject- cmap
Combined colormap for all regions
- ids
Adjusted vector of all region IDs
- labels
Combined vector of region labels
- orig_labels
Original labels from both atlases
- hemi
Combined hemisphere designations
- network
Combined network assignments, when either parent has them (e.g. Schaefer); regions from a parent without networks are
NA
Other per-region attributes reported by roi_metadata for
either parent are carried over in the same way, so
roi_metadata() and query_point on the merged atlas
report them for the regions that had them.
Details
The merging process:
Verifies that both atlases have the same dimensions
Adjusts region IDs in the second atlas to avoid overlap
Combines color maps, labels, hemisphere information, and other per-region metadata such as Schaefer network assignments
Creates a new ClusteredNeuroVol object for the merged atlas
Examples
if (FALSE) { # \dontrun{
# Load two atlases
atlas1 <- get_aseg_atlas()
atlas2 <- get_aseg_atlas()
# Merge the atlases
merged <- merge_atlases(atlas1, atlas2)
# Check the combined regions
print(merged)
} # }