skeleton_branches3d — 3D medial op

• Data kinds: voxel → voxel

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

Usage

Cut a 3-D skeleton at its junctions into branches (segments). The 3-D version of the 2-D r2_split_skeleton_lines.

What remains after removing the branch-point voxels are the branches. If min_length > 0, fragments whose 26-connected component has fewer voxels than that are removed.

Procedure: convert to bool with _ensure_skeleton (if there is an interior voxel, thin with skeletonize_vol) → remove voxels with 26-neighbourhood degree >= 3 (branch points) → if min_length > 0, split into components with scipy.ndimage.label (3x3x3 all-1 structure = 26-connected) and drop components with fewer voxels than min_length.

Returns: a bool array of the same shape as the input (branch voxel = True). Per-branch labels are not returned — to handle branches individually, pass the return value through vol_label(branches, 26) (number of components = number of branches). The branch-point voxels themselves are not included in the result, so both ends of a branch end 1 voxel short of the branch point.

Arguments and validation: min_length is a number of voxels (truncated with int(); 0 removes nothing). Input that is not 3-D, empty, or NaN/Inf gives ValueError. If thinning is needed and scikit-image is missing, ImportError. All False if there is no foreground.

Note: the 26-neighbourhood degree easily reaches 3 or more through diagonal adjacency at branches, and branch points are removed as clumps of several voxels, so branches can come out shorter than they really are. A skeleton consisting only of closed loops has no branch points, and the whole remains as 1 branch.

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)

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

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


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