rle_region op• 데이터 종류: voxel → rle_region
• 호출: import fullseye as fs; fs.ledger.vol_rle_encode(vol_binary) -> 'VolRLE'(구현을 직접 호출하려면 import volregion; volregion.vol_rle_encode(vol_binary) -> 'VolRLE', 원장에서 가져오려면 ops3d.get("vol_rle_encode"))
이진 볼륨을 x 방향 run 으로 부호화(3-D 의 HALCON region 표현).
> 아래 상세 설명은 원문입니다 —— 요약과 제목은 번역되어 있습니다.
A non-`{0, 1} input is thresholded at > 0.5 (the :mod:volops`
convention). NaN / Inf are rejected. An empty mask encodes to zero runs —
a valid region that decodes back to all-background.
Memory: proportional to the number of runs (~surface complexity per plane
row), not to the voxel count — measured 1/145 of the dense bool mask on a
realistic 384**3 part.
何を作るか: `(D, H, W)` のバイナリ volume を、x 軸(最終軸)方向の連続前景区間
(run)の列に変換する。`VolRLE は rows(平面行 id z*H + y`、int32、昇順)、
`starts / ends(run の x 範囲 [start, end)、end は排他的)、shape`
(元の `(D, H, W))を持つ frozen dataclass。run i` は
`vol[z, y, starts[i]:ends[i]]` を表す。
引数と検証(fail-closed):
• `vol_binary`: 3-D 配列。bool ならそのまま、それ以外は float64 に変換して
NaN/Inf があれば `ValueError、> 0.5` で二値化する。
• 3-D でない、または voxel 数が `MAX_VOXELS(1 << 27` ≈ 1.34 億)を超えると
`ValueError`。
• 空マスクは run 数 0 の `VolRLE` になる(エラーではない)。
注意: 軸順は `[z, y, x]`(depth, row, col)。run は x 方向にしか走らないので、
x 方向に細かく途切れる形状(縞・ノイズ)ほど run 数が増え、圧縮の利点は減る。
`vol_rle_volume / vol_rle_bbox / vol_rle_centroid` は decode せずに
run 上で答える。集合演算は `vol_rle_union / vol_rle_intersect` /
`vol_rle_difference、密配列へ戻すのは vol_rle_decode`。
• 샘플 데이터 카탈로그(DL URL / 라이선스) —— 2-D 는 skimage.data(BSD/public)+ 합성, 3-D 는 실데이터 소스(Stanford/PDS 등)의 DL URL.
• 연산자의 내력·참고문헌 —— 이 연산자 족의 바탕이 된 연구/기법의 출처.
• rle_region_efficiency — py -3.11 examples_3d/rle_region_efficiency.py
rle_region 를 입력으로 받는 것)vol_rle_decode · vol_rle_volume · vol_rle_bbox · vol_rle_centroid · vol_rle_union · vol_rle_intersect · vol_rle_difference · fuse_to_voxel
rle_region)vol_rle_decode · vol_rle_volume · vol_rle_bbox · vol_rle_centroid · vol_rle_union · vol_rle_intersect · vol_rle_difference · vol_rle_components
*Provenance: volregion.py — 3D 연산자 레지스트리. 이 op 노트는 tools/opdocs.py md 가 자동 생성합니다(직접 편집하지 마세요).*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.