neu_proc.ops.measure¶
Readings over a label array: voxel counts, component counts.
Label 0 is background, always, and is never reported (neu-vol convert --background
normalises a source’s background to 0, and cc3d treats 0 as background regardless). The
background count is arr.size - sum(sizes(arr).values()).
Functions¶
|
|
|
Every component size in the volume, pooled across labels. |
|
|
Module Contents¶
- neu_proc.ops.measure.component_sizes(arr, connectivity=26, *, sort: bool = False, descending=True) dict[int, numpy.ndarray]¶
{label: sizes of its connected components, largest first}, excluding label 0.Each component lies inside one label, so a single scatter of
arrinto a table indexed by component id finds every component’s label; the cost does not grow with the number of labels.
- neu_proc.ops.measure.flat_component_sizes(arr, connectivity=26, *, sort: bool = False, descending=True) numpy.ndarray¶
Every component size in the volume, pooled across labels.
- neu_proc.ops.measure.sizes(arr, *, exclude_margin: int = 0, sort: bool = False, descending=True, skip_relabel: bool = False) dict[int, int]¶
{label: voxel count}for every label present except 0.exclude_marginreports only labels present in the interior,exclude_marginvoxels in from every face, with their full counts.skip_relabelskips thefastremap.renumberstep, for arrays whose labels are already small integers.