Note

This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the user guide for the big picture.

nilearn.surface.load_surf_mesh

nilearn.surface.load_surf_mesh(surf_mesh)[source]

Load a surface mesh geometry.

Parameters:
surf_meshstr, pathlib.Path, or numpy.ndarray or Mesh

Either a file containing surface mesh geometry (valid formats are .gii .gii.gz or Freesurfer specific files such as .orig, .pial, .sphere, .white, .inflated) or two Numpy arrays organized in a list, tuple or a namedtuple with the fields “coordinates” and “faces”, or a Mesh object with “coordinates” and “faces” attributes.

Returns:
meshMesh

With the fields “coordinates” and “faces”, each containing a numpy.ndarray

Examples using nilearn.surface.load_surf_mesh

Loading and plotting of a cortical surface atlas

Loading and plotting of a cortical surface atlas

Cortical surface-based searchlight decoding

Cortical surface-based searchlight decoding

Loading and plotting of a cortical surface atlas

Loading and plotting of a cortical surface atlas