fsleyes.data

The fsleyes.data module contains FSLeyes overlay data types and some data-related utilities.

Most FSLeyes overlay data types are defined in the fslpy library (e.g. fsl.data.image.Image, fsl.data.mesh.Mesh). This sub-package provides some additional overlay types that can be displayed with FSLeyes:

Tractogram

The Tractogram class is a thin wrapper around a nibabel.streamlines.Tractogram object, with a few methods for managing per-vertex and per-streamline data.

fsleyes.data.guessType(path)[source]

Wrapper around the fsl.data.utils.guessType() function from the fslpy library, augmented to support additional data types supported by FSLeyes.

Parameters:

path – Path to a file to be loaded

Returns:

Tuple containing:

  • A data type which can be used to load the file, or None if the file is not recognised.

  • A suitable value for the Display.overlayType() for the file, or None if the file type is not recognised.

  • The file path, possibly modified (e.g. made absolute).

fsleyes.data.overlayName(overlay)[source]

Returns a default name for the given overlay.