siibra.volumes.providers.gifti

Handles reading and preparing gii files.

Module Contents

Classes

GiftiMesh

One or more surface mesh fragments in Gifti format.

GiftiSurfaceLabeling

A mesh labeling, specified by a gifti file.

class siibra.volumes.providers.gifti.GiftiMesh(url: str | Dict[str, str], volume=None)
Inheritance diagram of siibra.volumes.providers.gifti.GiftiMesh

One or more surface mesh fragments in Gifti format.

property fragments
property variants
fetch(fragment: str = None, **kwargs)

Returns the mesh as a dictionary with two numpy arrays.

Parameters:

fragment (str, default: None) –

A fragment name can be specified to choose from multiple fragments.

Note

If not specified, multiple fragments will be merged into one mesh. In such a case, the verts and faces arrays of different fragments are appended to one another.

Returns:

  • ‘verts’: An Nx3 array of vertex coordinates,

  • ’faces’: an Mx3 array of face definitions using row indices of the vertex array

Return type:

dict

fetch_iter()

Iterator returning all submeshes

Returns:

  • ‘verts’: An Nx3 array of vertex coordinates,

  • ’faces’: an Mx3 array of face definitions using row indices of the vertex array

  • ’name’: Name of the of the mesh variant

Return type:

dict

abstract get_boundingbox(clip=False, background=0.0, **fetch_kwargs) siibra.locations.boundingbox.BoundingBox

Bounding box calculation is not yet implemented for meshes.

class siibra.volumes.providers.gifti.GiftiSurfaceLabeling(url: str | dict)
Inheritance diagram of siibra.volumes.providers.gifti.GiftiSurfaceLabeling

A mesh labeling, specified by a gifti file.

fetch(fragment: str = None, label: int = None, **kwargs)

Returns a 1D numpy array of label indices.

abstract get_boundingbox(clip=False, background=0.0) siibra.locations.boundingbox.BoundingBox