siibra.locations.pointset

A set of coordinates on a reference space.

Classes

PointSet

A set of 3D points in the same reference space,

Module Contents

class siibra.locations.pointset.PointSet(coordinates, space=None, sigma_mm=0)
Inheritance diagram of siibra.locations.pointset.PointSet

A set of 3D points in the same reference space, defined by a list of coordinates.

as_list()

Return the point set as a list of 3D tuples.

intersection(other: siibra.locations.location.Location | nibabel.Nifti1Image)

Return the subset of points that are inside 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.

intersects(other: siibra.locations.location.Location | nibabel.Nifti1Image)

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.

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

Returns a new PointSet obtained by transforming the 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.

warp(space, chunksize=1000)

Creates a new point set by warping its points to another space

property boundingbox

Return the bounding box of these points.

property centroid
property has_constant_sigma
property homogeneous

Access the list of 3D point as an Nx4 array of homogeneous coorindates.

property sigma
property volume