This documentation is for development version 0.18.dev0.

mne.read_label

mne.read_label(filename, subject=None, color=None)[source]

Read FreeSurfer Label file.

Parameters:
filename : string

Path to label file.

subject : str | None

Name of the subject the data are defined for. 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.

Returns:
label : Label

Instance of Label object with attributes:

  • comment: comment from the first line of the label file
  • vertices: vertex indices (0 based, column 1)
  • pos: locations in meters (columns 2 - 4 divided by 1000)
  • values: values at the vertices (column 5)