Create cerebellar atlas from FreeSurfer annotation
Source:R/atlas_cerebellar.R
create_cerebellar_from_annotation.RdReads FreeSurfer annotation files (.annot) on the SUIT cerebellar surface
and projects them onto the SUIT flatmap for 2D polygon geometry.
Usage
create_cerebellar_from_annotation(
input_annot,
volume = NULL,
atlas_name = NULL,
output_dir = NULL,
decimate = 0.5,
tolerance = NULL,
smooth_refinements = NULL,
cleanup = NULL,
verbose = get_verbose(),
skip_existing = NULL
)Arguments
- input_annot
Character vector of paths to annotation files on the SUIT cerebellar surface.
- volume
Optional path to a cerebellar segmentation volume (NIfTI) for 3D mesh generation.
- atlas_name
Name for the atlas. If NULL, derived from the input filename.
- output_dir
Directory to store intermediate files (screenshots, masks, contours). Defaults to
tempdir().- decimate
Mesh decimation factor between 0 and 1. Reduces the number of faces in 3D meshes using quadric edge decimation (via
Rvcg::vcgQEdecim()). A value of 0.5 reduces faces by 50%. Set to NULL to skip decimation. Requires the Rvcg package. Default is 0.5.- tolerance
sf simplification is no longer applied during atlas creation. Use
atlas_smooth()on the returned atlas instead. Supplying a value emits a lifecycle warning and is otherwise ignored.- smooth_refinements
sf-side smoothing is no longer applied during atlas creation. Use
atlas_smooth()on the returned atlas instead. Supplying a value emits a lifecycle warning and is otherwise ignored.- cleanup
Remove intermediate files after atlas creation. If not specified, uses
options("ggseg.extra.cleanup")or theGGSEG_EXTRA_CLEANUPenvironment variable. Default is TRUE.- verbose
Verbosity level:
0(silent),1(standard progress, default), or2(debug, includes FreeSurfer output). Logical values are accepted (TRUE= 1,FALSE= 0). If not specified, uses the value fromoptions("ggseg.extra.verbose")or theGGSEG_EXTRA_VERBOSEenvironment variable.- skip_existing
Skip generating output files that already exist, allowing interrupted atlas creation to resume. If not specified, uses
options("ggseg.extra.skip_existing")or theGGSEG_EXTRA_SKIP_EXISTINGenvironment variable. Default is TRUE.