mne.read_labels_from_annot¶
-
mne.
read_labels_from_annot
(subject, parc='aparc', hemi='both', surf_name='white', annot_fname=None, regexp=None, subjects_dir=None, verbose=None)[source]¶ Read labels from a FreeSurfer annotation file.
Note: Only cortical labels will be returned.
- Parameters
- subject
str
The subject for which to read the parcellation.
- parc
str
The parcellation to use, e.g., ‘aparc’ or ‘aparc.a2009s’.
- hemi
str
The hemisphere from which to read the parcellation, can be ‘lh’, ‘rh’, or ‘both’.
- surf_name
str
Surface used to obtain vertex locations, e.g., ‘white’, ‘pial’
- annot_fname
str
orNone
Filename of the .annot file. If not None, only this file is read and ‘parc’ and ‘hemi’ are ignored.
- regexp
str
Regular expression or substring to select particular labels from the parcellation. E.g. ‘superior’ will return all labels in which this substring is contained.
- subjects_dir
str
, orNone
Path to SUBJECTS_DIR if it is not set in the environment.
- verbosebool,
str
,int
, orNone
If not None, override default verbose level (see
mne.verbose()
and Logging documentation for more).
- subject
- Returns