vol_select_labels — VOLCOLOR select op

Datenarten: labelslabels

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

Verwendung

Siebt Komponenten nach 3-D-Merkmalen (das 3-D-Gegenstück zur 2-D-Blob-Auswahl).

> Die ausführliche Beschreibung unten ist der Originaltext — Zusammenfassung und Überschriften sind übersetzt.

`(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.

Referenzen (Beispieldaten, Literatur)

• Katalog der Beispieldaten (Download-URLs / Lizenzen) — 2-D nutzt skimage.data (BSD/Public Domain) plus synthetische Bilder, 3-D nennt Download-URLs echter Datenquellen (Stanford, PDS, …).

• Herkunft und Literatur der Operatoren — die Quellen der Forschung/Verfahren, auf denen diese Operatorfamilie beruht.

• Der kanonische Algorithmus (Autor, Jahr) und seine Anwendungen stehen im Familienleitfaden oben.

Ausführbare Beispiele (verifizierte Samples, die diesen Operator wirklich aufrufen)

voxel_labels_colorpy -3.11 examples/voxel_labels_color.py

Typkompatible Folge-Operatoren (nehmen labels als Eingabe)

vol_colorize_labels · vol_label_overlay · vol_label_shape_stats · vol_label_legend · vol_labels_to_meshes · vol_label_volume_render

Gleiche Kategorie (select)


*Provenance: volcolor.py — VOLCOLOR Operator-Registry. Diese Notiz wird von tools/opdocs.py md erzeugt (nicht von Hand bearbeiten).*

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