vol_select_labels — VOLCOLOR select op

Data kinds: labelslabels

Call: import volcolor; volcolor.vol_select_labels(labels, props=None, spacing=None, relabel: 'bool' = False, exclude_border: 'bool' = False, keep=None, **criteria) (or opsvolcolor.get("vol_select_labels"))

Usage

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

> The detailed description below is the original text — the summary and the headings are translated.

`(labels_out, kept_ids)` を返す。落ちた成分のボクセルは 0(背景)になる。

*props* は :func:vol_label_shape_stats か :func:volops.vol_region_props

返り値。`None なら :func:vol_label_shape_stats` をその場で呼ぶ。

条件(すべて省略可・与えたものは AND):`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`。加えて

`exclude_border=True` でボリューム端に接する成分を落とす(CT の視野で

切れている粒子を計測から外す標準手順)、`keep=[...]` で残す id を直接指定。

必要なキーが props に無ければ ValueError。たとえば `min_sphericity` を

:func:vol_label_shape_stats の結果に対して指定すると、`sphericity` は

そちらが出さない量なので拒否する ―― 欠けたキーを既定値で埋めると「条件を

書いたのに一件も落ちない」フィルタが黙って出来上がる。

`relabel`:

• `False`(既定)―― 元の id をそのまま残す。ゆえに

:func:vol_colorize_labels を前後で呼んでも残った成分の色は変わらない

「ふるいにかけて色が残っていく」図が成立するのはこの既定のおかげである。

• `True ―― 残った成分を 1..k` へ振り直す。色は総取り替えになる

(ラベル番号がパレットの行番号だから)。下流が連番を要求する場合だけ使う。

この 1 引数がこの族の売りを壊せる唯一の場所なので、明示的にした。

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_colorpy -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.