siibra.locations.point
Singular coordinate defined on a space, possibly with an uncertainty.
Classes
A single 3D point in reference space. |
Module Contents
- class siibra.locations.point.Point(coordinatespec, space=None, sigma_mm: float = 0.0, label: int | float | tuple = None)
A single 3D point in reference space.
- __add__(other)
Add the coordinates of two points to get a new point representing.
- __eq__(other: Point)
Required to provide comparison and making the object hashable
- __ge__(other)
- __getitem__(index)
Index access to the coefficients of this point.
- __gt__(other)
- __hash__()
- __iter__()
Return an iterator over the location, so the Point can be easily cast to list or tuple.
- __le__(other)
- __len__()
- __lt__(other)
- __mul__(number: float)
Return a new point with multiplied coordinates in the same space.
- __repr__()
- __setitem__(index, value)
Write access to the coefficients of this point.
- __sub__(other)
Subtract the coordinates of two points to get a new point representing the offset vector. Alternatively, subtract an integer from the all coordinates of this point to create a new one. TODO this needs to maintain sigma
- __truediv__(number: float)
Return a new point with divided coordinates in the same space.
- bigbrain_section()
Estimate the histological section number of BigBrain which corresponds to this point. If the point is given in another space, a warping to BigBrain space will be tried.
- get_enclosing_cube(width_mm)
Create a bounding box centered around this point with the given width. TODO this should respect sigma (in addition or instead of the offset)
- intersection(other: siibra.locations.location.Location) Point
Return the intersection of two BrainStructures, ie. the other BrainStructure filtered by this BrainStructure.
- static parse(spec, unit='mm') Tuple[float, float, float]
Converts a 3D coordinate specification into a 3D tuple of floats.
- transform(affine: numpy.ndarray, space=None)
Returns a new Point obtained by transforming the coordinate of this one with the given affine matrix. TODO this needs to maintain sigma
- warp(space)
Creates a new point by warping this point to another space TODO this needs to maintain the sigma parameter!
- property boundingbox
- coordinate
- property homogeneous
The homogeneous coordinate of this point as a 4-tuple, obtained by appending ‘1’ to the original 3-tuple.
- property id: str
- label = None
- sigma = 0.0
- property volume
The volume of a point can be nonzero if it has a location uncertainty.