vol_select_labels — VOLCOLOR select op

• Data kinds: labels → labels

• Call: import fullseye as fs; fs.ledger.vol_select_labels(labels, props=None, spacing=None, relabel: 'bool' = False, exclude_border: 'bool' = False, keep=None, **criteria) (to call the implementation directly, import volcolor; volcolor.vol_select_labels(labels, props=None, spacing=None, relabel: 'bool' = False, exclude_border: 'bool' = False, keep=None, **criteria); from the registry, opsvolcolor.get("vol_select_labels"))

• Return value through the ledger: fullseye.ledger.vol_select_labels(...) returns only the declared out type labels (the underlying function also returns auxiliary values). When you need what was dropped, use fullseye.ledger.vol_select_labels.raw(...) or call volcolor.vol_select_labels directly.

Usage

Sieve components by 3-D features (the 3-D counterpart of 2-D blob selection).

Returns (labels_out, kept_ids). Voxels of dropped components become 0 (background).

*props* is the return value of vol_label_shape_stats or of volops.vol_region_props. If None, vol_label_shape_stats is called on the spot.

Criteria (all optional, those given are ANDed): min_volume max_volume min_voxels max_voxels min_sphericity max_sphericity min_elongation max_elongation min_isotropy max_isotropy min_equivalent_diameter max_equivalent_diameter. In addition, exclude_border=True drops components touching the volume edge (the standard procedure for excluding particles cut off by the CT field of view from measurement), and keep=[...] specifies the ids to keep directly.

If a required key is missing from props, ValueError. For example, specifying min_sphericity against the result of vol_label_shape_stats is rejected, because sphericity is a quantity that one does not produce -- filling a missing key with a default value would silently create a filter that "drops not a single item even though a criterion was written".

relabel:

• False (default) -- keeps the original ids as they are. Hence even when vol_colorize_labels is called before and after, the colours of the remaining components do not change. The "colours remain as you sieve" figure works thanks to this default.

• True -- renumbers the remaining components to 1..k. The colours are all replaced (because the label number is the palette row number). Use it only when downstream requires consecutive numbers. This 1 argument is the only place that can break the selling point of this family, so it was made explicit.

Returns (labels_out int32 (D, H, W), kept_ids np.ndarray int64). Raises ValueError for an unknown criterion, a criterion whose key is absent from *props*, a *props* that does not cover the labels present, or a *keep* containing a label that is not in the volume.

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• voxel_labels_color — py -3.11 examples/voxel_labels_color.py

Ops the type connects to (they accept labels as input)

vol_colorize_labels · vol_label_overlay · vol_label_shape_stats · vol_label_legend · vol_labels_to_meshes · vol_label_volume_render

Same category (select)

—


*Provenance: volcolor.py — VOLCOLOR operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.