morph_tophat3d — 3D morphology op

• Data kinds: voxel → voxel

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

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

Usage

3-D white top-hat = vol − opening. Extracts the bright structures smaller than the structuring element (keypoint pre-processing).

vol(float32) − morph_open3d(vol, r, ...). The value is 0 or more: only bright protrusions, grains and thin lines that do not fit into the SE (a cube of side length 2r+1 or a ball of radius r) remain, at their height, while larger bright regions and the smooth background become 0. It also removes gentle background brightness variations, so it suits preprocessing before thresholding. Choose r larger than "the radius of the structures you want to keep". se is "cube"/"ball" (anything else: ValueError), device is effective only for cube+torch. Returns (D,H,W) float32 numpy. For dark structures use morph_blackhat3d.

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)

• diff_features — py -3.11 examples_3d/diff_features.py

• 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_erode3d · morph_open3d · morph_close3d · morph_gradient3d · 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.