skeletonize_vol — 3D medial op

• Data kinds: voxel → voxel

• Call: import fullseye as fs; fs.ledger.skeletonize_vol(vol) (implementation को सीधे call करना हो तो import medial; medial.skeletonize_vol(vol), registry से लेना हो तो ops3d.get("skeletonize_vol"))

उपयोग

3D binary voxel को पतला करके 1 voxel चौड़ा skeleton बनाता है। skimage की Lee (1994) method का wrapper।

method='lee' 3D को support करने वाला topology-preserving thinning है। blob को भी line जैसे skeleton में बदल देता है (medial *surface* चाहिए तो distance_ridge का उपयोग करें)। return value input के समान shape का bool array है।

Args:

vol: binary voxel (bool / 0-1 का 3D)।

Returns:

skeleton (bool 3D): skeleton voxel।

Input का handling: _as_binary_volume 3-D array को bool में normalise करता है (non-zero = foreground)। 3-D न हो, खाली array हो, या float में NaN/Inf हो तो ValueError। axis order (z, y, x) है, distance और मोटाई voxel unit में हैं, और isotropic sampling मानी जाती है (anisotropic voxel ही रहें तो thinning का परिणाम हर axis पर झुका होता है। पहले vol_resize से isotropic बनाएँ)।

Behaviour:

• foreground न हो तो उसी shape का पूरा False array लौटता है (skimage call नहीं होता)।

• skimage.morphology.skeletonize(mask, method="lee") lazy import होता है। scikit-image न होने वाले environment में यहीं ImportError होता है।

• Lee method topology बनाए रखता है (connected component की संख्या, hole, cavity नहीं बदलते), पर मोटा blob कई branch में सिमट जाता है, और surface के उभार के अनुसार spur (छोटी branch) बनते हैं। spur को skeleton_prune3d से काटें।

कहाँ उपयोग करें: topology_signature (endpoint और branch की संख्या), skeleton_junctions3d / skeleton_endpoints3d / skeleton_branches3d का input। skeleton voxel का local radius चाहिए तो skeleton की positions पर distance_ridge का edt देखें।

संदर्भ (sample data, साहित्य)

• Sample data catalog (DL URL / license) — 2-D के लिए skimage.data (BSD/public) + synthetic, 3-D के लिए real data sources (Stanford/PDS आदि) के DL URL।

• Operators का स्रोत और संदर्भ — इस op family के मूल research/methods के स्रोत।

चलाए जा सकने वाले उदाहरण (verified samples जो सच में यह op call करते हैं)

• medial_topology — py -3.11 examples_3d/medial_topology.py

वे अगले ops जिनसे type जुड़ता है (voxel को input के रूप में लेते हैं)

voxel_to_mips · voxel_to_mesh · signed_distance_field · to_points · sobel3d · hessian3d · curvature_maps · edt_jfa

इसी category के (medial)

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


*Provenance: medial.py — 3D operator registry. यह per-op note tools/opdocs.py md से अपने-आप generate होता है (हाथ से edit न करें)।*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.