Skip to content

webknossos.dataset

RemoteLayer

RemoteLayer(
    dataset: RemoteDataset,
    properties: LayerProperties,
    read_only: bool,
)

Bases: AbstractLayer

bounding_box property writable

bounding_box: NDBoundingBox

Gets the bounding box encompassing this layer's data.

Returns:

  • NDBoundingBox ( NDBoundingBox ) –

    Bounding box with layer dimensions

category property

category: LayerCategoryType

Gets the category type of this layer.

Returns:

  • LayerCategoryType ( LayerCategoryType ) –

    Layer category (e.g. COLOR_CATEGORY)

data_format property

data_format: DataFormat

Gets the data storage format used by this layer.

Returns:

  • DataFormat ( DataFormat ) –

    Format used to store data

Raises:

  • AssertionError

    If data_format is not set in properties

dataset property

dataset: RemoteDataset

default_view_configuration property writable

default_view_configuration: LayerViewConfiguration | None

Gets the default view configuration for this layer.

Returns:

dtype_per_channel property

dtype_per_channel: dtype

Gets the data type used per channel.

Returns:

  • dtype

    np.dtype: NumPy data type for individual channels

dtype_per_layer property

dtype_per_layer: str

Deprecated, use dtype_per_channel instead. Gets the data type used for the entire layer.

Returns:

  • str ( str ) –

    Data type string (e.g. "uint8")

mags property

mags: Mapping[Mag, MagView]

Getter for dictionary containing all mags.

name property

name: str

Gets the name identifier of this layer.

Returns:

  • str ( str ) –

    Layer name

num_channels property

num_channels: int

Gets the number of channels in this layer.

Returns:

  • int ( int ) –

    Number of channels

Raises:

  • AssertionError

    If num_channels is not set in properties

read_only property

read_only: bool

Whether this layer is read-only.

Returns:

  • bool ( bool ) –

    True if layer is read-only, False if writable

as_segmentation_layer

as_segmentation_layer() -> RemoteSegmentationLayer

Casts into SegmentationLayer.

get_finest_mag

get_finest_mag() -> MagView[RemoteLayer]

get_mag

get_mag(mag: MagLike) -> MagView[RemoteLayer]