regionprops op• 資料種類:voxel → table
• 呼叫: import fullseye as fs; fs.ledger.region_props(vol, connectivity: 'int' = 26) -> 'list[dict]'(要直接呼叫實作,import regionprops3d; regionprops3d.region_props(vol, connectivity: 'int' = 26) -> 'list[dict]';從台帳取用則 ops3d.get("region_props"))
回傳各連通成分的區域屬性列表。
vol : array_like
bool 或 0/1 的 3D 陣列。
connectivity : int
6 / 18 / 26。
list[dict]
每個元件一個 dict。鍵:
• label : 標籤編號 (int)
• volume : 體素數 (int)
• centroid : 質心 (z, y, x) 的 tuple(float)
• bbox : (z0, y0, x0, z1, y1, x1)。z1/y1/x1 為排他性上端(stop)
• extent : volume / bbox 體積(填充率,0..1)
• principal_axes : (3,3) 主軸向量(按列,特徵值降序)
• principal_lengths: (3,) 主軸長 = 座標共變異數特徵值的平方根(降序)
• equivalent_radius: 等效球半徑 (3V/4π)^(1/3)
• surface_area : 暴露面計數近似(以體素面為單位)
• sphericity : 等體積球表面積 / 實際表面積(球接近 1,因離散化而 <1)
沒有前景體素(或輸入為空)時為空串列。
補充:
• 所有量皆以體素為單位(無間距校正)。需要實際尺寸時,volume 乘以體素體積,centroid / bbox / principal_lengths 乘以各軸的間距(非等向時主軸方向會畸變)。
• principal_lengths 是座標母體共變異數(除以 N)特徵值的平方根,不是元件的半徑而是座標的標準差。1 個體素的元件,principal_axes 為單位矩陣,principal_lengths 全為 0。
• surface_area 也計入與陣列邊緣接觸的面(零 padding)。由於離散化,sphericity 即使是球上限也約為 0.66(參見模組 docstring)。
• 標籤依 1..n 的順序(與 label_components 相同的 scipy 掃描順序),而非體積順序。排序由呼叫方進行。
• 輸入以 0 以外為前景轉為 bool(NaN 也是前景)。Raises ValueError:非 3 維輸入,connectivity 不是 6/18/26。
• measurement_uncertainty — 量測不確定度與校正知識 —— 為了能主張「量得準」
• 範例資料目錄(下載 URL / 授權) —— 2-D 用 skimage.data(BSD/公有領域)加合成圖,3-D 給出真實資料源(Stanford/PDS 等)的下載 URL。
• 運算子來歷與參考文獻 —— 該運算子族所依據的研究/方法出處。
• region_props_3d — py -3.11 examples_3d/region_props_3d.py
table 作為輸入)fuse_to_voxel · mesh_select_lod
regionprops)label_components · largest_component · filter_by_volume · inner_box3 · vol_label · vol_region_props
*Provenance: regionprops3d.py — 3D 運算子登記表。本條目由 tools/opdocs.py md 自動產生(請勿手動編輯)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.