fsbrain (version 0.0.2)

group.annot: Load annotations for a group of subjects.

Description

Load a brain surface annotation, i.e., a cortical parcellation based on an atlas, for a group of subjects.

Usage

group.annot(subjects_dir, subjects_list, hemi, atlas)

Arguments

subjects_dir,

string. The FreeSurfer SUBJECTS_DIR, i.e., a directory containing the data for all your subjects, each in a subdir named after the subject identifier.

subjects_list,

vector of strings. The subject identifiers.

hemi,

string, one of 'lh' or 'rh'. The hemisphere name. Used to construct the names of the annotation and morphometry data files to be loaded.

atlas,

string. The atlas name. E.g., "aparc", "aparc.2009s", or "aparc.DKTatlas". Used to construct the name of the annotation file to be loaded.

Value

list of annotations, as returned by freesurferformats::read.fs.annot(). If hemi is 'both', the annotations are the results of merging over the hemispheres for each subject.

See Also

Other atlas functions: get.atlas.region.names, group.agg.atlas.native, group.agg.atlas.standard, regions.to.ignore, spread.values.over.annot, spread.values.over.hemi, spread.values.over.subject, subject.annot, subject.atlas.agg

Examples

Run this code
# NOT RUN {
   fsbrain::download_optional_data();
   subjects_dir = fsbrain::get_optional_data_filepath("subjects_dir");
   subjects_list = c("subject1", "subject2");
   annotations = group.annot(subjects_dir, subjects_list, "lh", "aparc");
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace