Skip to content

webknossos.dataset._array

# &nbsp class ArrayException(builtins.Exception):

Common base class for all non-exit exceptions.

Inherited Members
builtins.Exception
Exception
builtins.BaseException
with_traceback
args
# &nbsp class DataFormat(enum.Enum):

An enumeration.

# &nbsp WKW = <DataFormat.WKW: 'wkw'>
# &nbsp Zarr = <DataFormat.Zarr: 'zarr'>
Inherited Members
enum.Enum
name
value
# &nbsp class ArrayInfo:

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)

# &nbsp 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 )
# &nbsp compression_mode: bool = False
# &nbsp class BaseArray(abc.ABC):

Helper class that provides a standard way to create an ABC using inheritance.

# &nbsp data_format = <DataFormat.WKW: 'wkw'>
# &nbsp
@classmethod
@abstractmethod
def open(_cls, path: pathlib.Path) -> webknossos.dataset._array.BaseArray:
# &nbsp
@classmethod
@abstractmethod
def create( cls, path: pathlib.Path, array_info: webknossos.dataset._array.ArrayInfo ) -> webknossos.dataset._array.BaseArray:
# &nbsp
@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:
# &nbsp
@abstractmethod
def write( self, offset: Union[webknossos.geometry.vec3_int.Vec3Int, Tuple[int, int, int], numpy.ndarray, Iterable[int]], data: numpy.ndarray ) -> None:
# &nbsp
@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:
# &nbsp
@abstractmethod
def list_bounding_boxes(self) -> Iterator[webknossos.geometry.bounding_box.BoundingBox]:

The bounding boxes are measured in voxels of the current mag.

# &nbsp
@abstractmethod
def close(self) -> None:
# &nbsp
@staticmethod
def get_class( data_format: webknossos.dataset._array.DataFormat ) -> type[webknossos.dataset._array.BaseArray]:
# &nbsp class WKWArray(BaseArray):

Helper class that provides a standard way to create an ABC using inheritance.

# &nbsp WKWArray(path: pathlib.Path)
# &nbsp data_format = <DataFormat.WKW: 'wkw'>
# &nbsp
@classmethod
def open(cls, path: pathlib.Path) -> webknossos.dataset._array.WKWArray:
# &nbsp
@classmethod
def create( cls, path: pathlib.Path, array_info: webknossos.dataset._array.ArrayInfo ) -> webknossos.dataset._array.WKWArray:
# &nbsp 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:
# &nbsp def write( self, offset: Union[webknossos.geometry.vec3_int.Vec3Int, Tuple[int, int, int], numpy.ndarray, Iterable[int]], data: numpy.ndarray ) -> None:
# &nbsp 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:
# &nbsp def list_bounding_boxes(self) -> Iterator[webknossos.geometry.bounding_box.BoundingBox]:

The bounding boxes are measured in voxels of the current mag.

# &nbsp def close(self) -> None:
Inherited Members
# &nbsp class ZarrArray(BaseArray):

Helper class that provides a standard way to create an ABC using inheritance.

# &nbsp ZarrArray(path: pathlib.Path)
# &nbsp data_format = <DataFormat.Zarr: 'zarr'>
# &nbsp
@classmethod
def open(cls, path: pathlib.Path) -> webknossos.dataset._array.ZarrArray:
# &nbsp
@classmethod
def create( cls, path: pathlib.Path, array_info: webknossos.dataset._array.ArrayInfo ) -> webknossos.dataset._array.ZarrArray:
# &nbsp 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:
# &nbsp 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:
# &nbsp def write( self, offset: Union[webknossos.geometry.vec3_int.Vec3Int, Tuple[int, int, int], numpy.ndarray, Iterable[int]], data: numpy.ndarray ) -> None:
# &nbsp def list_bounding_boxes(self) -> Iterator[webknossos.geometry.bounding_box.BoundingBox]:

The bounding boxes are measured in voxels of the current mag.

# &nbsp def close(self) -> None:
Inherited Members