mne.read_label#
- mne.read_label(filename, subject=None, color=None, *, verbose=None)[source]#
Read FreeSurfer Label file.
- Parameters:
- filename
str
Path to label file.
- subject
str
|None
Subject which this label belongs to. Should only be specified if it is not specified in the label. It is good practice to set this attribute to avoid combining incompatible labels and SourceEstimates (e.g., ones from other subjects). Note that due to file specification limitations, the subject name isn’t saved to or loaded from files written to disk.
- color
None
| matplotlib color Default label color and alpha (e.g.,
(1., 0., 0., 1.)
for red). Note that due to file specification limitations, the color isn’t saved to or loaded from files written to disk.- verbose
bool
|str
|int
|None
Control verbosity of the logging output. If
None
, use the default verbosity level. See the logging documentation andmne.verbose()
for details. Should only be passed as a keyword argument.
- filename
- Returns:
- label
Label
Instance of Label object with attributes:
comment
: comment from the first line of the label filevertices
: vertex indices (0 based, column 1)pos
: locations in meters (columns 2 - 4 divided by 1000)values
: values at the vertices (column 5)
- label
Examples using mne.read_label
#
Generate simulated evoked data
Compute Power Spectral Density of inverse solution from single epochs
Compute power and phase lock in label of the source space
Compute source power spectral density (PSD) in a label
Compute MNE-dSPM inverse solution on single epochs
Compute sLORETA inverse solution on raw data
Extracting time course from source_estimate object
Extracting the time series of activations in a label