siibra.volumes.providers.nifti

Module Contents

Classes

NiftiProvider

Helper class that provides a standard way to create an ABC using

ZipContainedNiftiProvider

Helper class that provides a standard way to create an ABC using

class siibra.volumes.providers.nifti.NiftiProvider(src: str | Dict[str, str] | nibabel.Nifti1Image | Tuple[numpy.ndarray, numpy.ndarray])
Inheritance diagram of siibra.volumes.providers.nifti.NiftiProvider

Helper class that provides a standard way to create an ABC using inheritance.

property fragments
fetch(fragment: str = None, voi: siibra.locations.boundingbox.BoundingBox = None, label: int = None)

Loads and returns a Nifti1Image object

Parameters:
  • fragment (str) – Optional name of a fragment volume to fetch, if any. For example, some volumes are split into left and right hemisphere fragments. see fragments()

  • voi (BoundingBox) – optional specification of a volume of interest to fetch.

  • label (int, default: None) – Optional: a label index can be provided. Then the mask of the 3D volume will be returned, where voxels matching this label are marked as “1”.

find_peaks(min_distance_mm=5)

Find peaks in the image data.

Parameters:
  • min_distance_mm (float) – Minimum distance between peaks in mm

  • Returns

  • --------

  • PointSet

get_boundingbox(clip=True, background=0, **fetch_kwargs) siibra.locations.boundingbox.BoundingBox

Return the bounding box in physical coordinates of the union of fragments in this nifti volume.

Parameters:
  • clip (bool, default: True) – Whether to clip the background of the volume.

  • background (float, default: 0.0) – The background value to clip. .. note:: To use it, clip must be True.

  • fetch_kwargs – Not used

get_shape(resolution_mm=None)
is_float()
class siibra.volumes.providers.nifti.ZipContainedNiftiProvider(src: str)
Inheritance diagram of siibra.volumes.providers.nifti.ZipContainedNiftiProvider

Helper class that provides a standard way to create an ABC using inheritance.