API reference¶
Every module of every package, with its classes, functions and docstrings.
This is parsed from the source, never imported, which is worth knowing because it is what makes the reference complete. Half of this suite cannot be installed from PyPI at all — tensorstore, vol2mesh, dvidutils, kimimaro and neuclease are conda-only, and neu-draw needs a GPU stack the documentation build has no use for. An importing reference would have to either stub all of that out or quietly omit whatever failed to import; this one reads the files.
What it is not
A curated public API. Everything is here, private helpers and all, because these packages are read as often as they are called — the reason a function does what it does is usually in its docstring, and that is the thing worth coming here for. For the surface that is meant to be called, start from each package’s README, or from the table below.
The one deliberate omission is the cli modules. Those are documented by the CLI reference, rendered from the real ArgumentParser objects, which is a better page than an API listing of argparse plumbing.
The packages, in dependency order¶
Nothing lower may import from anything higher, and packages at the same tier do not import each other.
The vocabulary every tier shares. numpy and nothing else.
Start at BBox, Frame, Mesh, Skeleton, ScaleInfo, align_box, skeleton_tube
The dask/SLURM substrate. Knows nothing about electron microscopy.
Start at block_map, iter_blocks, Manifest, start_dask
Volume I/O: tensorstore backends, storage profiles, the conversion ops, source metadata.
Start at convert, open_backend, scale_spec, read_scales, describe, location, readback
Per-body meshes, published into the volume, and measurement of meshes and skeletons.
Start at pipeline, measure, precomputed, occupancy
DVID annotations into tables, and on into neuroglancer.
Start at notebook, tables, explore, rule, segprops, annsource
Everything a remote viewer consumes: states, layers, links, shaders.
Start at state.build_state, layers, shaders, sources, movie
Array processing: filters, label tools and distance transforms. Only the pure array-in-array-out half so far.
Start at dilate, dust, ops.kernels, ops.backend
Comparing a segmentation against a reference labeling: the metrics, and where the two disagree.
Start at contingency, compare, voxel, assign, disagree, adjudicate
Local 3D rendering in a notebook, on pygfx.
Start at show, build_scene, Scene, sources, Legend
Where to start, by what you are doing¶
you want to |
reach for |
|---|---|
do box or grid arithmetic |
neu_lib.grid — |
turn voxels into nanometres |
neu_lib.frame — |
run something per block, resumably |
blockrun.engine — |
open a volume and read a region |
neu_vol.backends — |
ask what a volume is |
|
read or write a store, local or |
|
convert or copy a source |
|
read published meshes and skeletons back |
|
measure morphology of published output |
|
pull DVID annotations into DataFrames |
|
inspect and parse neuron names |
|
build a neuroglancer state or layer |
|
render an animation through a real viewer |
|
draw meshes and skeletons in a notebook |
neu_draw.scene — |
Two conventions that run through all of it¶
Both fail silently when broken, so they are worth knowing before reading any signature:
zyx in memory, xyz on disk. Every region argument,
Mesh.vertices_zyxand kimimaro’s vertices are zyx. Both precomputed formats store xyz, and the flip happens at the boundary. Getting it wrong mirrors output through the z=x diagonal.One model space: physical nanometres, via each level’s real voxel size — never an assumed
2 ** levelfactor, because real pyramids are anisotropic.
Looking for a module by name? The module index lists every one alphabetically, and the search box knows every docstring.