Skip to content

webknossos.dataset

AgglomerateAttachment

AgglomerateAttachment(
    properties: AttachmentProperties, path: UPath
)

Bases: Attachment

container_name class-attribute instance-attribute

container_name = 'agglomerates'

data_format instance-attribute

data_format: Literal[Zarr3, HDF5]

name instance-attribute

name: str = name

path instance-attribute

path: UPath = path

type_name class-attribute instance-attribute

type_name = 'agglomerate'

from_path_and_name classmethod

from_path_and_name(
    path: str | PathLike | UPath,
    name: str,
    *,
    data_format: AttachmentDataFormat,
    dataset_path: str | PathLike | UPath | None = None
) -> Self

Attachment

Attachment(properties: AttachmentProperties, path: UPath)

container_name instance-attribute

container_name: Literal[
    "agglomerates",
    "meshes",
    "segment_index",
    "cumsum",
    "connectomes",
]

The container names are also used to derive the folder names to put the attachments. The container names are converted to camelCase to get the folder names.

data_format instance-attribute

data_format: AttachmentDataFormat = data_format

name instance-attribute

name: str = name

path instance-attribute

path: UPath = path

type_name instance-attribute

type_name: Literal[
    "mesh",
    "agglomerate",
    "segmentIndex",
    "connectome",
    "cumsum",
]

The type names are used to communicate to WEBKNOSSOS which attachment type we want to e.g. upload.

from_path_and_name classmethod

from_path_and_name(
    path: str | PathLike | UPath,
    name: str,
    *,
    data_format: AttachmentDataFormat,
    dataset_path: str | PathLike | UPath | None = None
) -> Self

ConnectomeAttachment

ConnectomeAttachment(
    properties: AttachmentProperties, path: UPath
)

Bases: Attachment

container_name class-attribute instance-attribute

container_name = 'connectomes'

data_format instance-attribute

data_format: Literal[Zarr3, HDF5]

name instance-attribute

name: str = name

path instance-attribute

path: UPath = path

type_name class-attribute instance-attribute

type_name = 'connectome'

from_path_and_name classmethod

from_path_and_name(
    path: str | PathLike | UPath,
    name: str,
    *,
    data_format: AttachmentDataFormat,
    dataset_path: str | PathLike | UPath | None = None
) -> Self

CumsumAttachment

CumsumAttachment(
    properties: AttachmentProperties, path: UPath
)

Bases: Attachment

container_name class-attribute instance-attribute

container_name = 'cumsum'

data_format instance-attribute

data_format: Literal[Zarr3, JSON]

name instance-attribute

name: str = name

path instance-attribute

path: UPath = path

type_name class-attribute instance-attribute

type_name = 'cumsum'

from_path_and_name classmethod

from_path_and_name(
    path: str | PathLike | UPath,
    name: str,
    *,
    data_format: AttachmentDataFormat,
    dataset_path: str | PathLike | UPath | None = None
) -> Self

MeshAttachment

MeshAttachment(
    properties: AttachmentProperties, path: UPath
)

Bases: Attachment

container_name class-attribute instance-attribute

container_name = 'meshes'

data_format instance-attribute

data_format: Literal[Zarr3, HDF5]

name instance-attribute

name: str = name

path instance-attribute

path: UPath = path

type_name class-attribute instance-attribute

type_name = 'mesh'

from_path_and_name classmethod

from_path_and_name(
    path: str | PathLike | UPath,
    name: str,
    *,
    data_format: AttachmentDataFormat,
    dataset_path: str | PathLike | UPath | None = None
) -> Self

SegmentIndexAttachment

SegmentIndexAttachment(
    properties: AttachmentProperties, path: UPath
)

Bases: Attachment

container_name class-attribute instance-attribute

container_name = 'segment_index'

data_format instance-attribute

data_format: Literal[Zarr3, HDF5]

name instance-attribute

name: str = name

path instance-attribute

path: UPath = path

type_name class-attribute instance-attribute

type_name = 'segmentIndex'

from_path_and_name classmethod

from_path_and_name(
    path: str | PathLike | UPath,
    name: str,
    *,
    data_format: AttachmentDataFormat,
    dataset_path: str | PathLike | UPath | None = None
) -> Self