distance_ridge — 3D medial op

• Data kinds: voxel → voxel

• Call: import fullseye as fs; fs.ledger.distance_ridge(vol, min_radius=0.0) (to call the implementation directly, import medial; medial.distance_ridge(vol, min_radius=0.0); from the registry, ops3d.get("distance_ridge"))

• Return value through the ledger: fullseye.ledger.distance_ridge(...) returns only the declared out type voxel (the underlying function also returns auxiliary values). When you need what was dropped, use fullseye.ledger.distance_ridge.raw(...) or call medial.distance_ridge directly.

• Underlying return: (ridge, dist)

Usage

Extract the ridge of the EDT (the local maxima of the distance field) as the medial axis. Returns (ridge_mask, edt).

Computes the EDT of each foreground voxel and treats local maxima over the 26-neighbourhood (own EDT at least the maximum of the surrounding 26 voxels) as medial. This criterion naturally yields a dimension that follows the local dimensionality of the object:

blob (sphere) -> EDT unimodal -> point-like medial (1 centre point).

tube (cylinder)-> flat along the axis, unimodal radially -> line-like medial (axis line).

plate (slab)-> flat in-plane, unimodal across the thickness -> surface-like medial (mid-surface).

A boundary voxel always has a larger inner neighbour, so it is never a maximum and the outer shell drops out naturally. Flat ridges (axis/plane) remain as continuous lines/surfaces because equal-valued neighbours are allowed (>=).

Args:

vol: binary voxels (bool / 0-1 3D).

min_radius: threshold that discards weak ridges with EDT at or below this value (default 0 = discard none). For noise suppression.

Returns:

ridge_mask (bool 3D): medial voxels.

edt (float64 3D): Euclidean distance from each voxel to the background (= local radius).

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)

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

skeletonize_vol · medial_axis_points · topology_signature · medial_match · skeleton_junctions3d · skeleton_endpoints3d · skeleton_prune3d · skeleton_branches3d


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