render op• 데이터 종류: labels → table
• 호출: import volcolor; volcolor.vol_labels_to_meshes(labels, ids=None, spacing=None, seed: 'int' = 0, level: 'float' = 0.5, axes: 'str' = 'xyz')(또는 opsvolcolor.get("vol_labels_to_meshes"))
성분마다 marching cubes 를 걸어 색이 입혀진 메시의 집합으로 만듭니다.
> 아래 상세 설명은 원문입니다 —— 요약과 제목은 번역되어 있습니다.
返りは `list[dict]、各要素が `{"label", "vertices" (nv, 3) float64,
"faces" (nf, 3) int64, "color" (r, g, b)}``。色は
:func:vol_colorize_labels と同じパレットなので、**断面図と 3-D 表示で同じ
部品が同じ色**になる。
成分ごとに bbox を 1 ボクセル分パディングした部分体だけを切り出して
marching cubes を回す(全ボリュームを成分数だけ舐めない)。パディングは
ボリューム端に接する成分の面を閉じるためで、これをしないと端の成分だけ
穴の開いたメッシュになる。
`axes`:
• `"xyz"(既定)―― 頂点を (x, y, z) で返す。:mod:render3d` /
:mod:mesh の頂点順がこれで、`render3d.render_mesh` へ直接渡せる。
• `"zyx" ―― ボリュームの添字順のまま返す。:func:vol_label_shape_stats`
の `centroid` と同じ並びになる。
黙って取り違えると例外は出ない ―― 出るのは上下と前後が入れ替わった、
それらしい絵である。`tests/test_volcolor.py::test_mesh_axes_order_is_explicit` が
両方の重心を stats の重心と突き合わせて固定している。
*spacing* を渡すと頂点は物理座標(mm)になる。*ids* で成分を絞れる
(`None なら実在する全ラベル、ただし :data:MAX_MESHES` 件まで)。
Raises `ImportError (with the pip install scikit-image` message) when
marching cubes is unavailable, and `ValueError` for a bad *axes*, a *level*
outside `(0, 1)`, an *ids* naming an absent label, or more than
:data:MAX_MESHES components.
• 샘플 데이터 카탈로그(DL URL / 라이선스) —— 2-D 는 skimage.data(BSD/public)+ 합성, 3-D 는 실데이터 소스(Stanford/PDS 등)의 DL URL.
• 연산자의 내력·참고문헌 —— 이 연산자 족의 바탕이 된 연구/기법의 출처.
• 알고리즘의 정전(저자·연도)과 용도는 위의 패밀리 사용 가이드에 적혀 있습니다.
• voxel_labels_color — py -3.11 examples/voxel_labels_color.py
table 를 입력으로 받는 것)—
render)*Provenance: volcolor.py — VOLCOLOR 연산자 레지스트리. 이 op 노트는 tools/opdocs.py md 가 자동 생성합니다(직접 편집하지 마세요).*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.