siibra.locations.location

Concpets that have primarily spatial meaning.

Classes

Location

Abstract base class for locations in a given reference space.

WholeBrain

Trivial location class for formally representing

Module Contents

class siibra.locations.location.Location(space)
Inheritance diagram of siibra.locations.location.Location

Abstract base class for locations in a given reference space.

abstract intersection(mask: nibabel.Nifti1Image) bool

All subclasses of Location must implement intersection, as it is required by SpatialFeature._test_mask()

abstract intersects(other: nibabel.Nifti1Image | Location) bool

Verifies wether this 3D location intersects the given mask.

NOTE: The affine matrix of the image must be set to warp voxels coordinates into the reference space of this Bounding Box.

abstract transform(affine: numpy.ndarray, space=None)

Returns a new location obtained by transforming the reference coordinates of this one with the given affine matrix.

Parameters:
  • affine (numpy 4x4 ndarray) – affine matrix

  • space (reference space (id, name, or Space)) – Target reference space which is reached after applying the transform. Note that the consistency of this cannot be checked and is up to the user.

abstract warp(space)

Generates a new location by warping the current one into another reference space.

BIGBRAIN_ID = 'minds/core/referencespace/v1.0.0/a1655b99-82f1-420f-a3c2-fe80fd4c8588'
SPACEWARP_IDS
SPACEWARP_SERVER = 'https://siibra-spatial-backend.apps.ebrains.eu/v1'
space = None
class siibra.locations.location.WholeBrain(space=None)
Inheritance diagram of siibra.locations.location.WholeBrain

Trivial location class for formally representing location in a particular reference space, which is not further specified.

intersection(mask: nibabel.Nifti1Image) bool

Required for abstract class Location

intersects(*_args, **_kwargs)

Always true for whole brain features

transform(affine: numpy.ndarray, space=None)

Does nothing.

warp(space)

Generates a new whole brain location in another reference space.