morph_erode3d — 3D morphology op

• Data kinds: voxel → voxel

• Call: import fullseye as fs; fs.ledger.morph_erode3d(vol, r=1, device='cpu', se='cube') (to call the implementation directly, import match3d; match3d.morph_erode3d(vol, r=1, device='cpu', se='cube'); from the registry, ops3d.get("morph_erode3d"))

• GPU: this op has a GPU path (device="cuda")

Usage

3-D greyscale erosion (the local min over the structuring element). Shrinks the bright regions. se is the same as for dilate.

Takes the minimum within a cube of side length 2r+1 or a ball of radius r. Outside the border is treated as +∞ (min over in-image values only; the torch path is -max_pool3d(-v), the scipy path cval=+inf), so the edges never drop to 0. r=0 is the identity. ValueError if se is not "cube"/"ball". device only takes effect for cube+torch. Returns (D,H,W) float32 numpy. On a 2-valued volume it "keeps only voxels where the SE fits entirely" = removal of thin structures and thin shells.

Downstream: paired with morph_dilate3d for opening/closing; vol − erosion gives the inner boundary.

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)

• morphology_3d — py -3.11 examples_3d/morphology_3d.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 (morphology)

morph_dilate3d · morph_open3d · morph_close3d · morph_gradient3d · morph_tophat3d · morph_blackhat3d


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