vol_label_legend — VOLCOLOR measure op

資料種類:labelstable

呼叫:import volcolor; volcolor.vol_label_legend(labels, props=None, seed: 'int' = 0, spacing=None, measure: 'str' = 'volume', top=None)(或 opsvolcolor.get("vol_label_legend"))

用法

圖例表:哪個顏色對應哪個成分,以及它的測量值。

> 以下的詳細說明為原文 —— 摘要與標題已翻譯。

色だけを出して意味の読めない図を作らないための op。返りは `list[dict]`:

`label · rgb (r, g, b) float [0, 1] · hex "#rrggbb"` ·

`voxel_count · volume · measure` 並べ替えに使った量の名前 ·

`value その値 · rank 1 始まりの順位 · share` 全成分の

*measure* 合計に対する割合。

*measure* は props に載っている数値キーなら何でもよい(`"volume"`

`"voxel_count" "equivalent_diameter"volops.vol_region_props` を

渡したなら `"sphericity"` も)。降順に並べ、同点はラベル番号の昇順で割る

(決定的)。*top* を与えると上位 N 件だけ返す。

実在するラベルは `np.bincount の非ゼロから取る。labels.max()` を成分数と

見なさないので、番号に欠番があっても件数も順位も狂わない

(`tests/test_volcolor.py::test_stats_do_not_invent_the_component_count_from_max`)。

Raises `ValueError` when *measure* is not a numeric key of *props*, when

*props* does not cover the labels present, or on a bad *top*.

參考(範例資料・文獻)

• 範例資料目錄(下載 URL / 授權) —— 2-D 用 skimage.data(BSD/公有領域)加合成圖,3-D 給出真實資料源(Stanford/PDS 等)的下載 URL。

• 運算子來歷與參考文獻 —— 該運算子族所依據的研究/方法出處。

• 演算法的正典(作者・年份)與用途見上面的族使用指南

可執行的範例(實際呼叫該運算子並已驗證的樣例)

voxel_labels_colorpy -3.11 examples/voxel_labels_color.py

型別可銜接的下一個運算子(可接受 table 作為輸入)

同類別(measure)

vol_label_shape_stats


*Provenance: volcolor.py — VOLCOLOR 運算子登記表。本條目由 tools/opdocs.py md 自動產生(請勿手動編輯)。*

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