Skip to content

webknossos.geometry.bounding_box

#   class BoundingBoxNamedTuple(builtins.tuple):

BoundingBoxNamedTuple(topleft, size)

#   BoundingBoxNamedTuple(topleft: Tuple[int, int, int], size: Tuple[int, int, int])

Create new instance of BoundingBoxNamedTuple(topleft, size)

#   topleft: Tuple[int, int, int]

Alias for field number 0

#   size: Tuple[int, int, int]

Alias for field number 1

Inherited Members
builtins.tuple
index
count
#   class BoundingBox:
#   BoundingBox( topleft: Union[int, Union[webknossos.geometry.vec3_int.Vec3Int, Tuple[int, int, int], Tuple[int, ...], numpy.ndarray, List[int], Iterable[int]]], size: Union[int, Union[webknossos.geometry.vec3_int.Vec3Int, Tuple[int, int, int], Tuple[int, ...], numpy.ndarray, List[int], Iterable[int]]] )

Method generated by attrs for class BoundingBox.

#   topleft: webknossos.geometry.vec3_int.Vec3Int = <member 'topleft' of 'BoundingBox' objects>
#   size: webknossos.geometry.vec3_int.Vec3Int = <member 'size' of 'BoundingBox' objects>
#   def with_topleft( self, new_topleft: Union[webknossos.geometry.vec3_int.Vec3Int, Tuple[int, int, int], Tuple[int, ...], numpy.ndarray, List[int], Iterable[int]] ) -> webknossos.geometry.bounding_box.BoundingBox:
#   def with_size( self, new_size: Union[webknossos.geometry.vec3_int.Vec3Int, Tuple[int, int, int], Tuple[int, ...], numpy.ndarray, List[int], Iterable[int]] ) -> webknossos.geometry.bounding_box.BoundingBox:
#   def with_bounds_x( self, new_topleft_x: Union[int, NoneType] = None, new_size_x: Union[int, NoneType] = None ) -> webknossos.geometry.bounding_box.BoundingBox:

Returns a copy of the bounding box with topleft.x optionally replaced and size.x optionally replaced.

#   def with_bounds_y( self, new_topleft_y: Union[int, NoneType] = None, new_size_y: Union[int, NoneType] = None ) -> webknossos.geometry.bounding_box.BoundingBox:

Returns a copy of the bounding box with topleft.y optionally replaced and size.y optionally replaced.

#   def with_bounds_z( self, new_topleft_z: Union[int, NoneType] = None, new_size_z: Union[int, NoneType] = None ) -> webknossos.geometry.bounding_box.BoundingBox:

Returns a copy of the bounding box with topleft.z optionally replaced and size.z optionally replaced.

#  
@staticmethod
def from_wkw_dict(bbox: Dict) -> webknossos.geometry.bounding_box.BoundingBox:
#  
@staticmethod
def from_config_dict(bbox: Dict) -> webknossos.geometry.bounding_box.BoundingBox:
#  
@staticmethod
def from_tuple6( tuple6: Tuple[int, int, int, int, int, int] ) -> webknossos.geometry.bounding_box.BoundingBox:
#  
@staticmethod
def from_tuple2( tuple2: Tuple[Union[webknossos.geometry.vec3_int.Vec3Int, Tuple[int, int, int], Tuple[int, ...], numpy.ndarray, List[int], Iterable[int]], Union[webknossos.geometry.vec3_int.Vec3Int, Tuple[int, int, int], Tuple[int, ...], numpy.ndarray, List[int], Iterable[int]]] ) -> webknossos.geometry.bounding_box.BoundingBox:
#  
@staticmethod
def from_points( points: Iterable[Union[webknossos.geometry.vec3_int.Vec3Int, Tuple[int, int, int], Tuple[int, ...], numpy.ndarray, List[int], Iterable[int]]] ) -> webknossos.geometry.bounding_box.BoundingBox:

Returns a bounding box exactly containing all points.

#  
@staticmethod
def from_checkpoint_name(checkpoint_name: str) -> webknossos.geometry.bounding_box.BoundingBox:

This function extracts a bounding box in the format x_y_z_sx_sy_xz which is contained in a string.

#  
@staticmethod
def from_csv(csv_bbox: str) -> webknossos.geometry.bounding_box.BoundingBox:
#   def to_wkw_dict(self) -> dict:
#   def to_config_dict(self) -> dict:
#   def to_checkpoint_name(self) -> str:
#   def to_tuple6(self) -> Tuple[int, int, int, int, int, int]:
#   def to_csv(self) -> str:
#   def padded_with_margins( self, margins_left: Union[webknossos.geometry.vec3_int.Vec3Int, Tuple[int, int, int], Tuple[int, ...], numpy.ndarray, List[int], Iterable[int]], margins_right: Union[webknossos.geometry.vec3_int.Vec3Int, Tuple[int, int, int], Tuple[int, ...], numpy.ndarray, List[int], Iterable[int], NoneType] = None ) -> webknossos.geometry.bounding_box.BoundingBox:
#   def intersected_with( self, other: webknossos.geometry.bounding_box.BoundingBox, dont_assert: bool = False ) -> webknossos.geometry.bounding_box.BoundingBox:

If dont_assert is set to False, this method may return empty bounding boxes (size == (0, 0, 0))

#   def is_empty(self) -> bool:
#   def align_with_mag( self, mag: webknossos.geometry.mag.Mag, ceil: bool = False ) -> webknossos.geometry.bounding_box.BoundingBox:

Rounds the bounding box, so that both topleft and bottomright are divisible by mag.

:argument ceil: If true, the bounding box is enlarged when necessary. If false, it's shrinked when necessary.

#   def contains( self, coord: Union[webknossos.geometry.vec3_int.Vec3Int, Tuple[int, int, int], Tuple[int, ...], numpy.ndarray, List[int], Iterable[int]] ) -> bool:
#   def contains_bbox( self, inner_bbox: webknossos.geometry.bounding_box.BoundingBox ) -> bool:
#   def chunk( self, chunk_size: Union[webknossos.geometry.vec3_int.Vec3Int, Tuple[int, int, int], Tuple[int, ...], numpy.ndarray, List[int], Iterable[int]], chunk_border_alignments: Union[List[int], NoneType] = None ) -> collections.abc.Generator[webknossos.geometry.bounding_box.BoundingBox, NoneType, NoneType]:

Decompose the bounding box into smaller chunks of size chunk_size.

Chunks at the border of the bounding box might be smaller than chunk_size. If chunk_border_alignment is set, all border coordinates between two chunks will be divisible by that value.

#   def volume(self) -> int:
#   def slice_array(self, array: numpy.ndarray) -> numpy.ndarray:
#   def to_slices(self) -> Tuple[slice, slice, slice]:
#   def offset( self, vector: Union[webknossos.geometry.vec3_int.Vec3Int, Tuple[int, int, int], Tuple[int, ...], numpy.ndarray, List[int], Iterable[int]] ) -> webknossos.geometry.bounding_box.BoundingBox:
Back to top