rle_region op• Data kinds: rle_region → position
• Call: import fullseye as fs; fs.ledger.vol_rle_centroid(region, spacing=None) (to call the implementation directly, import volregion; volregion.vol_rle_centroid(region, spacing=None); from the registry, ops3d.get("vol_rle_centroid"))
Centroid (z, y, x) of the region, computed on the runs (no decode).
Each run contributes n voxels at its row's (z, y) and mean x (start + end - 1) / 2 — the exact arithmetic mean of the member voxel indices, so it matches the dense centroid to floating-point accuracy. Pass *spacing* (sz, sy, sx) for physical coordinates. An empty region raises ValueError.
Returns: 3 float values (z, y, x) (in depth, row, col order). Without spacing they are in voxel index units (the arithmetic mean of the indices itself); passing spacing multiplies each component by (sz, sy, sx) to give physical coordinates (mm etc., the same unit as spacing). spacing is either positive finite values of length 3, or a volio.VolumeMeta with a spacing_mm attribute.
Validation (ValueError): VolRLE consistency check / 0 runs / spacing not of length 3, non-positive, or non-finite.
Note: this is not the centre of mass but the geometric centroid of the voxels (all voxels equally weighted). If you want a centroid weighted by gray values, vol_rle_decode and compute it yourself.
• 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.
• rle_region_efficiency — py -3.11 examples_3d/rle_region_efficiency.py
position as input)refine_peak_newton · refine_translation_lk · refine_lm · fuse_to_voxel
rle_region)vol_rle_encode · vol_rle_decode · vol_rle_volume · vol_rle_bbox · vol_rle_union · vol_rle_intersect · vol_rle_difference · vol_rle_components
*Provenance: volregion.py — 3D 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.