Note

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

nilearn.surface.FileMesh

class nilearn.surface.FileMesh(file_path)[source]

A surface mesh stored in a Gifti or Freesurfer file.

Added in version 0.11.0.

Parameters:
file_pathstr or pathlib.Path

Filename to read mesh from.

__init__(file_path)[source]
file_path
n_vertices
property coordinates

Get x, y, z, values for each mesh vertex.

Returns:
numpy.ndarray
property faces

Get array of adjacent vertices.

Returns:
numpy.ndarray
loaded()[source]

Load surface mesh into memory.

Returns:
nilearn.surface.InMemoryMesh
to_gifti(gifti_file)[source]

Write surface mesh to a Gifti file on disk.

Parameters:
gifti_filestr or pathlib.Path

Filename to save the mesh to.

Examples using nilearn.surface.FileMesh

Seed-based connectivity on the surface

Seed-based connectivity on the surface