neu_vol.backends.dvid¶
Read-only backend over a DVID labelmap instance.
Addressed by server/uuid/instance rather than a path (neu_vol.dvid.parse_url);
addressing and version resolution are in neu_vol/dvid.py, and this module is the
labelmap geometry and array view.
DVID omits blocks that hold no labels, so an empty region costs a round trip and no
bandwidth, and no occupancy prefilter is needed. Reads request ?compression=blocks
(DVID’s stored form) and inflate here with libdvid, on the dask worker. DVID is typically a
shared service and answers overload with 503, which retry treats as transient.
Read-only: segmentation is never written back to DVID.
Attributes¶
Classes¶
Read-only |
Functions¶
|
Shape / chunks / voxel size / max scale, all zyx, from DVID's |
|
Shape at a DVID downres level. |
|
What this labelmap pull came from — the shared node record plus label facts. |
Module Contents¶
- class neu_vol.backends.dvid.DVIDBackend(spec: Mapping[str, Any])¶
Read-only
(z, y, x)view over one scale of a DVID labelmap instance.- classmethod open(spec: Mapping[str, Any]) DVIDBackend¶
- read_region(region: neu_vol.backends.base.Region) numpy.ndarray¶
- to_spec() dict[str, Any]¶
- write_region(region: neu_vol.backends.base.Region, data: numpy.ndarray) None¶
- property chunks: tuple[int, ...]¶
- property dtype: numpy.dtype¶
- property shape: tuple[int, ...]¶
- voxel_size¶
- neu_vol.backends.dvid.geometry(info: Mapping[str, Any], spec: Mapping[str, Any]) dict¶
Shape / chunks / voxel size / max scale, all zyx, from DVID’s
/info.Presented origin-anchored: shape is
MaxPoint + 1, so a voxel index means the same as in DVID. The empty margin belowMinPointcosts a quick round trip per task and nothing on disk.
- neu_vol.backends.dvid.level_shape(shape0, scale: int) tuple[int, ...]¶
Shape at a DVID downres level.
DVID halves every axis per level, so here, unlike a general pyramid, the factor really is
2**scale. Do not copy this to another backend.
- neu_vol.backends.dvid.provenance(spec: Mapping[str, Any], node: Mapping[str, Any]) dict¶
What this labelmap pull came from — the shared node record plus label facts.
maxlabeladvances as proofreading creates bodies, so with the node it characterises the snapshot; DVID’s mutation id and lastmod are per body, so not usable here.
- neu_vol.backends.dvid.TAG = 'dvid'¶