morph_dilate3d — 3D morphology op

• Data kinds: voxel → voxel

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

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

Usage

3-D greyscale dilation (the local max over a structuring element of radius r). Expands the bright regions.

se="cube" (default, GPU possible via the torch path) / "ball" (isotropic SE, scipy path).

The SE is a cube with side length 2r+1 (cube) or a ball z²+y²+x² <= r² (ball). r=0 is the identity. Outside the border is treated as −∞ (the max is taken over in-image values only; torch's max_pool3d implicit padding and scipy's cval=-inf give the same result). cube uses max_pool3d if torch is available (device effective); ball, or no torch, uses scipy.ndimage.grey_dilation (device is ignored). The input is converted to float32; returns (D,H,W) float32 numpy. ValueError if se is anything other than those 2. A 2-valued volume (0/1) gives a 2-valued dilation as is. se="ball" is slow for large r because of the footprint scan.

Downstream: paired with morph_erode3d for morph_open3d / morph_close3d / morph_gradient3d.

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_erode3d · 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.