volume_downsample — 3D preprocess op

数据种类:voxelvoxel

调用: import fullseye as fs; fs.ledger.volume_downsample(vol, factor, mode='mean')(要直接调用实现,import volops; volops.volume_downsample(vol, factor, mode='mean');从台账取用则 ops3d.get("volume_downsample"))

用法

按每轴整数 *factor* 对 `(D, H, W)` 体做块池化(数据抽稀)。

> 以下的详细说明为原文 —— 摘要与标题已翻译。

Large CT / laminography / simulation volumes must be thinned before the

heavier 3-D operators (Frangi/Sato are capped at ~256**3 voxels, see

`MAX_EIGEN_VOXELS`). This is the volume analogue of the point-cloud

`voxel_grid_downsample and the mesh decimate_qem` — the third leg of

Fullseye's *間引き* (decimation) family, one per 3-D data sort.

Parameters

----------

vol : array_like, shape (D, H, W)

Input volume (coerced to float64; NaN/Inf rejected).

factor : int or (fz, fy, fx)

Block size per axis, each `>= 1`. The output shape is

`(D//fz, H//fy, W//fx)`; a trailing partial block that cannot fill a

full factor is dropped (deterministic, no edge bias).

mode : {'mean', 'max', 'stride'}

• `'mean'` — average-pool. Band-limits before subsampling (the

anti-aliasing choice); the right default for grey CT / MRI.

• `'max'` — max-pool. Preserves thin bright structures (bone, vessel,

defect voxels) that averaging would wash out.

• `'stride' — plain subsample vol[::fz, ::fy, ::fx]` (fastest,

but aliases — no pre-filter).

Returns

-------

ndarray, shape (D//fz, H//fy, W//fx), float64

The downsampled volume. Spacing scales by the same factor: an input

spacing `(sz, sy, sx) mm becomes (sz*fz, sy*fy, sx*fx)` mm.

Raises

------

ValueError

Non-3-D input, a factor component `< 1` or larger than its axis, or an

unknown *mode* (fail-closed).

背景知识指南(该算子背后的物理与约定)

depth_sensors — 深度センサの知識 — 測距原理・実機の値・欠測の出方

参考(示例数据・文献)

• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。

• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。

可运行的示例(实际调用该算子并已验证的样例)

volume_downsamplingpy -3.11 examples_3d/volume_downsampling.py

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

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

同类别(preprocess)

statistical_outlier_removal · radius_outlier_removal · voxel_grid_downsample · mls_smooth


*Provenance: volops.py — 3D 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.