vol_label_overlay — VOLCOLOR colorize op

Data kinds: voxel × labelsrgbvolume

Call: import volcolor; volcolor.vol_label_overlay(vol, labels, seed: 'int' = 0, alpha: 'float' = 0.5, vmin=None, vmax=None, mode: 'str' = 'fill') (or opsvolcolor.get("vol_label_overlay"))

Usage

The original grey volume with coloured labels laid over it, as `(D, H, W, 3)`.

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

医用 CT / 産業 CT で実際に使う形 ―― 「セグメンテーションだけの絵」は

どこを切り出したのかが分からず、「元画像だけの絵」は何を測ったのかが分からない。

*vol* は `(D, H, W)。表示窓は vmin / vmax` で明示する

(`None なら vol` の最小 / 最大)。窓を暗黙に決めないのは、窓が違えば

同じ組織が別の明るさで出るからで、CT の window/level と同じ理由である。

*alpha* は `0(元画像のまま)から 1`(色で塗り潰す)。*mode* は

`"fill"(成分全体を塗る)か "boundary"`(6 近傍で隣が別ラベルの

ボクセルだけを塗る = 輪郭表示、下の構造が完全に見える)。

**`background` 引数は無い**。この op はラベル 0 のボクセルに一切色を置かず

(そこは元画像そのもの)、パレット行 0 を一度も引かない。受け取っておいて

何もしない引数は「背景色を指定したのに効かない」という形の静かな嘘になる。

実測(`(24, 48, 48)・16 成分・ノイズ入りグレー体、seed=0、mode="fill"`):

前景ボクセルにおける元画像との平均絶対差は alpha=0.00 で 0.0000、

0.25 で 0.0679、0.50 で 0.1359、0.75 で 0.2038、1.00 で 0.2718 ――

alpha に対して直線(合成が線形であることの確認)。**背景ボクセルは

alpha に依らず 0.0000**(色は前景にしか乗らない)。

Raises `ValueError` when *vol* and *labels* differ in shape, on a non-finite

*vol*, on `vmin >= vmax`, on an *alpha* outside [0, 1], or on an unknown *mode*.

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 rgbvolume as input)

vol_label_slice_rgb · vol_label_mpr_rgb

Same category (colorize)

vol_colorize_labels


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