vol_label_overlay — VOLCOLOR colorize op

• Data kinds: voxel × labels → rgbvolume

• Call: import fullseye as fs; fs.ledger.vol_label_overlay(vol, labels, seed: 'int' = 0, alpha: 'float' = 0.5, vmin=None, vmax=None, mode: 'str' = 'fill') (to call the implementation directly, import volcolor; volcolor.vol_label_overlay(vol, labels, seed: 'int' = 0, alpha: 'float' = 0.5, vmin=None, vmax=None, mode: 'str' = 'fill'); from the registry, opsvolcolor.get("vol_label_overlay"))

Usage

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

The form actually used in medical CT / industrial CT -- a "segmentation-only picture" does not show where it was cut out, and an "original-image-only picture" does not show what was measured.

*vol* is (D, H, W). The display window is given explicitly with vmin / vmax (None means the min / max of vol). The window is not decided implicitly because with a different window the same tissue appears at a different brightness -- the same reason as CT window/level.

*alpha* goes from 0 (original image unchanged) to 1 (filled with colour). *mode* is "fill" (paint the whole component) or "boundary" (paint only voxels whose 6-neighbour is a different label = contour display; the structure underneath stays fully visible).

There is no background argument. This op puts no colour at all on voxels of label 0 (they are the original image itself) and never reads palette row 0. An argument that is accepted and does nothing becomes a silent lie of the form "I specified a background colour but it has no effect".

Measured ((24, 48, 48), 16 components, noisy grey body, seed=0, mode="fill"):

the mean absolute difference from the original image over foreground voxels is 0.0000 at alpha=0.00, 0.0679 at 0.25, 0.1359 at 0.50, 0.2038 at 0.75, 0.2718 at 1.00 -- linear in alpha (confirming that the compositing is linear). Background voxels are 0.0000 regardless of alpha (colour lands only on the foreground).

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_color — py -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.