API for label sparse volume data type (github.com/janelia-flyem/dvid/datatype/labelvol) ======================================================================================= Note: UUIDs referenced below are strings that may either be a unique prefix of a hexadecimal UUID string (e.g., 3FA22) or a branch leaf specification that adds a colon (":") followed by the case-dependent branch name. In the case of a branch leaf specification, the unique UUID prefix just identifies the repo of the branch, and the UUID referenced is really the leaf of the branch name. For example, if we have a DAG with root A -> B -> C where C is the current HEAD or leaf of the "master" (default) branch, then asking for "B:master" is the same as asking for "C". If we add another version so A -> B -> C -> D, then references to "B:master" now return the data from "D". ----- Denormalizations like sparse volumes are *not* performed for the "0" label, which is considered a special label useful for designating background. This allows users to define sparse labeled structures in a large volume without requiring processing of entire volume. Command-line: $ dvid repo new labelvol Adds newly named data of the 'type name' to repo with specified UUID. Example: $ dvid repo 3f8c new labelvol sparsevols Arguments: UUID Hexadecimal string with enough characters to uniquely identify a version node. data name Name of data to create, e.g., "sparsevols" settings Configuration settings in "key=value" format separated by spaces. Configuration Settings (case-insensitive keys) BlockSize Size in pixels (default: %!s(MISSING)) VoxelSize Resolution of voxels (default: 8.0, 8.0, 8.0) VoxelUnits Resolution units (default: "nanometers") $ dvid node dump Dumps files, one per 512^3 voxel subvolume, for all block RLEs for each label within the subvolume. File names will be formatted as subvols-X_Y_Z.dat, where (X,Y,Z) is the subvolume index; for example, the file subvols-0_1_2.dat has all label block RLEs for the subvolume with smallest voxel coordinate at (0, 512, 1024). The encoding has the following format where integers are little endian and the order of data is exactly as specified below: uint64 Label ID uint32 # Spans Repeating unit of: int32 Coordinate of run start (dimension 0) int32 Coordinate of run start (dimension 1) int32 Coordinate of run start (dimension 2) int32 Length of run ... This is similar to the voxel RLEs returned by the sparsevol endpoint, except the initial 8 byte header is replaced with a label identifier. Spans are always in X direction. ------------------ HTTP API (Level 2 REST): GET /node///help Returns data-specific help message. GET /node///info POST /node///info Retrieves or puts DVID-specific data properties for these voxels. Example: GET /node/3f8c/bodies/info Returns JSON with configuration settings that include location in DVID space and min/max block indices. Arguments: UUID Hexadecimal string with enough characters to uniquely identify a version node. data name Name of labelvol data. POST /node///sync? Establishes labelblk data instances with which the annotations are synced. Expects JSON to be POSTed with the following format: { "sync": "labels" } To delete syncs, pass an empty string of names with query string "replace=true": { "sync": "" } The "sync" property should be followed by a comma-delimited list of data instances that MUST already exist. Currently, syncs should be created before any annotations are pushed to the server. If annotations already exist, these are currently not synced. The labelvol data type only accepts syncs to labelblk data instances. GET Query-string Options: replace Set to "true" if you want passed syncs to replace and not be appended to current syncs. Default operation is false. GET /node///sparsevol/