Read labels from a FreeSurfer annotation file.
Note: Only cortical labels will be returned.
The FreeSurfer subject name.
The parcellation to use, e.g., ‘aparc’ or ‘aparc.a2009s’.
The hemisphere from which to read the parcellation, can be ‘lh’, ‘rh’, or ‘both’.
Surface used to obtain vertex locations, e.g., ‘white’, ‘pial’.
Filename of the .annot file. If not None, only this file is read and ‘parc’ and ‘hemi’ are ignored.
Regular expression or substring to select particular labels from the parcellation. E.g. ‘superior’ will return all labels in which this substring is contained.
The path to the directory containing the FreeSurfer subjects
None, defaults to the
If true, labels will be sorted by name before being returned.
New in version 0.21.0.