neu_vol.ops.wk_mappings¶
Fetch a webknossos layer’s agglomerate views as lookup tables, and describe each view.
One supervoxel volume plus one table per view replaces one volume per view: a table is
table[supervoxel] = agglomerate for every supervoxel id, a few MB, fetched in about
half a minute, and the view is table[volume] — read on the fly through a descriptor
(neu_vol/mapped.py) or converted once chosen. The tables are also data in their own
right: which supervoxels a view merges is exactly what separates an agglomeration error
from a supervoxel error.
Writes, into out (a local directory or an object-store prefix):
<view>.npy— the dense uint64 table, index = supervoxel id;<view>.json— a descriptor overvolume, when a supervoxel volume is given;mappings.json— what was fetched, from which dataset, and per-view counts.
Resumable: a view whose table exists is skipped unless overwrite.
Attributes¶
Functions¶
|
Fetch tables for |
Module Contents¶
- neu_vol.ops.wk_mappings.fetch_mapping_tables(src: str, out: str, *, volume: str | None = None, mappings: Sequence[str] | None = None, overwrite: bool = False, max_id: int | None = None, threads: int = 4, progress=None) dict¶
Fetch tables for
mappings(default: every agglomerate view) ofsrc.srciswk://DATASET/LAYER.volumeis the supervoxel volume the descriptors should read — normally aconvertof the samesrcwith no mapping.max_idoverrides the layer’s recordedlargestSegmentIdas the highest supervoxel id.threadsviews are fetched at once.progress(name, seconds, n_agglomerates)is called after each view, in the calling thread.
- neu_vol.ops.wk_mappings.INDEX = 'mappings.json'¶
- neu_vol.ops.wk_mappings.logger¶