volume_downsample — 3D preprocess op

Data kinds: voxelvoxel

Call: import fullseye as fs; fs.ledger.volume_downsample(vol, factor, mode='mean') (to call the implementation directly, import volops; volops.volume_downsample(vol, factor, mode='mean'); from the registry, ops3d.get("volume_downsample"))

Usage

Block-pool a `(D, H, W)` volume by an integer *factor* per axis (data decimation).

> The detailed description below is the original text — the summary and the headings are translated.

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).

Background guides (the physics and conventions behind this op)

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

References (sample data, literature)

• 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.

Runnable examples (verified samples that actually call this op)

volume_downsamplingpy -3.11 examples_3d/volume_downsampling.py

Ops the type connects to (they accept voxel as input)

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

Same category (preprocess)

statistical_outlier_removal · radius_outlier_removal · voxel_grid_downsample · mls_smooth


*Provenance: volops.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.