Skip to content

webknossos.dataset.attachments

AgglomerateAttachment

AgglomerateAttachment(
    properties: AttachmentProperties, path: UPath
)

Bases: Attachment

data_format instance-attribute

data_format: Literal[Zarr3, HDF5]

name instance-attribute

name: str = name

path instance-attribute

path: UPath = path

from_path_and_name classmethod

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

Attachment

Attachment(properties: AttachmentProperties, path: UPath)

data_format instance-attribute

data_format: AttachmentDataFormat = data_format

name instance-attribute

name: str = name

path instance-attribute

path: UPath = path

from_path_and_name classmethod

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

Attachments

Attachments(
    layer: SegmentationLayer,
    properties: AttachmentsProperties,
)

agglomerates class-attribute instance-attribute

agglomerates: tuple[AgglomerateAttachment, ...] = ()

connectomes class-attribute instance-attribute

connectomes: tuple[ConnectomeAttachment, ...] = ()

cumsum class-attribute instance-attribute

cumsum: CumsumAttachment | None = None

is_empty property

is_empty: bool

meshes class-attribute instance-attribute

meshes: tuple[MeshAttachment, ...] = ()

segment_index class-attribute instance-attribute

segment_index: SegmentIndexAttachment | None = None

add_agglomerate

add_agglomerate(
    path: str | PathLike,
    *,
    name: str,
    data_format: AttachmentDataFormat
) -> None

add_attachment_as_copy

add_attachment_as_copy(attachment: Attachment) -> None

add_attachment_as_ref

add_attachment_as_ref(attachment: Attachment) -> None

add_attachments

add_attachments(*other: Attachment) -> None

add_connectome

add_connectome(
    path: str | PathLike,
    *,
    name: str,
    data_format: AttachmentDataFormat
) -> None

add_copy_attachments

add_copy_attachments(*other: Attachment) -> None

add_mesh

add_mesh(
    path: str | PathLike,
    *,
    name: str,
    data_format: AttachmentDataFormat
) -> None
add_symlink_attachments(
    *other: Attachment, make_relative: bool = False
) -> None

delete_attachment

delete_attachment(attachment: Attachment) -> None

detect_legacy_attachments

detect_legacy_attachments() -> None

Detects and adds legacy attachments. Legacy attachments are attachments that were stored in the folder hierarchy of the layer without explicit metadata.

set_cumsum

set_cumsum(
    path: str | PathLike,
    *,
    name: str,
    data_format: AttachmentDataFormat
) -> None

set_segment_index

set_segment_index(
    path: str | PathLike,
    *,
    name: str,
    data_format: AttachmentDataFormat
) -> None

ConnectomeAttachment

ConnectomeAttachment(
    properties: AttachmentProperties, path: UPath
)

Bases: Attachment

data_format instance-attribute

data_format: Literal[Zarr3, HDF5]

name instance-attribute

name: str = name

path instance-attribute

path: UPath = path

from_path_and_name classmethod

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

CumsumAttachment

CumsumAttachment(
    properties: AttachmentProperties, path: UPath
)

Bases: Attachment

data_format instance-attribute

data_format: Literal[Zarr3, JSON]

name instance-attribute

name: str = name

path instance-attribute

path: UPath = path

from_path_and_name classmethod

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

MeshAttachment

MeshAttachment(
    properties: AttachmentProperties, path: UPath
)

Bases: Attachment

data_format instance-attribute

data_format: Literal[Zarr3, HDF5]

name instance-attribute

name: str = name

path instance-attribute

path: UPath = path

from_path_and_name classmethod

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

SegmentIndexAttachment

SegmentIndexAttachment(
    properties: AttachmentProperties, path: UPath
)

Bases: Attachment

data_format instance-attribute

data_format: Literal[Zarr3, HDF5]

name instance-attribute

name: str = name

path instance-attribute

path: UPath = path

from_path_and_name classmethod

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