mne.read_surface

mne.read_surface(fname, read_metadata=False, return_dict=False, verbose=None)[source]

Load a Freesurfer surface mesh in triangular format.

Parameters:

fname : str

The name of the file containing the surface.

read_metadata : bool

Read metadata as key-value pairs. Valid keys:

  • ‘head’ : array of int
  • ‘valid’ : str
  • ‘filename’ : str
  • ‘volume’ : array of int, shape (3,)
  • ‘voxelsize’ : array of float, shape (3,)
  • ‘xras’ : array of float, shape (3,)
  • ‘yras’ : array of float, shape (3,)
  • ‘zras’ : array of float, shape (3,)
  • ‘cras’ : array of float, shape (3,)

New in version 0.13.0.

return_dict : bool

If True, a dictionary with surface parameters is returned.

verbose : bool, str, int, or None

If not None, override default verbose level (see mne.verbose() and Logging documentation for more).

Returns:

rr : array, shape=(n_vertices, 3)

Coordinate points.

tris : int array, shape=(n_faces, 3)

Triangulation (each line contains indices for three points which together form a face).

volume_info : dict-like

If read_metadata is true, key-value pairs found in the geometry file.

surf : dict

The surface parameters. Only returned if read_dict is True.