filter_by_volume — 3D regionprops op

• 数据种类:voxel → voxel

• 调用: import fullseye as fs; fs.ledger.filter_by_volume(vol, min_voxels: 'int', connectivity: 'int' = 26) -> 'np.ndarray'(要直接调用实现,import regionprops3d; regionprops3d.filter_by_volume(vol, min_voxels: 'int', connectivity: 'int' = 26) -> 'np.ndarray';从台账取用则 ops3d.get("filter_by_volume"))

用法

返回去除了小于 min_voxels 的连通成分后的 bool 掩码。

Parameters

vol : array_like

bool 或 0/1 的 3D 数组。

min_voxels : int

去掉"小于"此阈值(< min_voxels)的分量。"大于等于"阈值的保留。

connectivity : int

6 / 18 / 26。

Returns

ndarray(bool)

仅满足条件的分量为 True。没有前景或全部分量被去除时为全 False。

补充:

• min_voxels 先用 int() 取整再比较。1 以下时所有分量都保留。

• 内部为 label_components → bincount → 保留 counts >= min_voxels 的标签。不重新编号,只返回 bool 掩模,因此需要编号时将结果再次传给 label_components。

• 输入以 0 以外为前景转为 bool(NaN 也是前景)。轴顺序 (z, y, x)。

• 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

类型可衔接的下一个算子(可接受 voxel 作为输入)

voxel_to_mips · voxel_to_mesh · signed_distance_field · to_points · sobel3d · hessian3d · curvature_maps · edt_jfa

同类别(regionprops)

label_components · region_props · largest_component · 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.