webknossos.dataset._array
Common base class for all non-exit exceptions.
Inherited Members
- builtins.Exception
- Exception
- builtins.BaseException
- with_traceback
- args
An enumeration.
Inherited Members
- enum.Enum
- name
- value
ArrayInfo(data_format: webknossos.dataset._array.DataFormat, num_channels: int, voxel_type: numpy.dtype, chunk_shape: webknossos.geometry.vec3_int.Vec3Int, chunks_per_shard: webknossos.geometry.vec3_int.Vec3Int, compression_mode: bool = False)
#  
ArrayInfo(
data_format: webknossos.dataset._array.DataFormat,
num_channels: int,
voxel_type: numpy.dtype,
chunk_shape: webknossos.geometry.vec3_int.Vec3Int,
chunks_per_shard: webknossos.geometry.vec3_int.Vec3Int,
compression_mode: bool = False
)
Helper class that provides a standard way to create an ABC using inheritance.
#  
@classmethod
@abstractmethod
def
open(_cls, path: pathlib.Path) -> webknossos.dataset._array.BaseArray:
#  
@classmethod
@abstractmethod
def
create(
cls,
path: pathlib.Path,
array_info: webknossos.dataset._array.ArrayInfo
) -> webknossos.dataset._array.BaseArray:
#  
@abstractmethod
def
read(
self,
offset: Union[webknossos.geometry.vec3_int.Vec3Int, Tuple[int, int, int], numpy.ndarray, Iterable[int]],
shape: Union[webknossos.geometry.vec3_int.Vec3Int, Tuple[int, int, int], numpy.ndarray, Iterable[int]]
) -> numpy.ndarray:
#  
@abstractmethod
def
write(
self,
offset: Union[webknossos.geometry.vec3_int.Vec3Int, Tuple[int, int, int], numpy.ndarray, Iterable[int]],
data: numpy.ndarray
) -> None:
#  
@abstractmethod
def
ensure_size(
self,
new_shape: Union[webknossos.geometry.vec3_int.Vec3Int, Tuple[int, int, int], numpy.ndarray, Iterable[int]],
align_with_shards: bool = True,
warn: bool = False
) -> None:
#  
@abstractmethod
def
list_bounding_boxes(self) -> Iterator[webknossos.geometry.bounding_box.BoundingBox]:
The bounding boxes are measured in voxels of the current mag.
#  
@staticmethod
def
get_class(
data_format: webknossos.dataset._array.DataFormat
) -> type[webknossos.dataset._array.BaseArray]:
Helper class that provides a standard way to create an ABC using inheritance.
#  
@classmethod
def
create(
cls,
path: pathlib.Path,
array_info: webknossos.dataset._array.ArrayInfo
) -> webknossos.dataset._array.WKWArray:
#  
def
read(
self,
offset: Union[webknossos.geometry.vec3_int.Vec3Int, Tuple[int, int, int], numpy.ndarray, Iterable[int]],
shape: Union[webknossos.geometry.vec3_int.Vec3Int, Tuple[int, int, int], numpy.ndarray, Iterable[int]]
) -> numpy.ndarray:
#  
def
write(
self,
offset: Union[webknossos.geometry.vec3_int.Vec3Int, Tuple[int, int, int], numpy.ndarray, Iterable[int]],
data: numpy.ndarray
) -> None:
#  
def
ensure_size(
self,
new_shape: Union[webknossos.geometry.vec3_int.Vec3Int, Tuple[int, int, int], numpy.ndarray, Iterable[int]],
align_with_shards: bool = True,
warn: bool = False
) -> None:
The bounding boxes are measured in voxels of the current mag.
Helper class that provides a standard way to create an ABC using inheritance.
#  
@classmethod
def
create(
cls,
path: pathlib.Path,
array_info: webknossos.dataset._array.ArrayInfo
) -> webknossos.dataset._array.ZarrArray:
#  
def
read(
self,
offset: Union[webknossos.geometry.vec3_int.Vec3Int, Tuple[int, int, int], numpy.ndarray, Iterable[int]],
shape: Union[webknossos.geometry.vec3_int.Vec3Int, Tuple[int, int, int], numpy.ndarray, Iterable[int]]
) -> numpy.ndarray:
#  
def
ensure_size(
self,
new_shape: Union[webknossos.geometry.vec3_int.Vec3Int, Tuple[int, int, int], numpy.ndarray, Iterable[int]],
align_with_shards: bool = True,
warn: bool = False
) -> None:
#  
def
write(
self,
offset: Union[webknossos.geometry.vec3_int.Vec3Int, Tuple[int, int, int], numpy.ndarray, Iterable[int]],
data: numpy.ndarray
) -> None:
The bounding boxes are measured in voxels of the current mag.