skeleton_endpoints3d — 3D medial op

• Data kinds: voxel → voxel

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

उपयोग

3D skeleton के end points (26-neighbourhood में 1 या कम skeleton voxel) को voxel mask के रूप में लौटाता है।

isolated voxel (degree 0) भी endpoint में गिने जाते हैं। 2D के r2_endpoints_skeleton का 3D संस्करण।

Procedure: _ensure_skeleton से input को bool बनाया जाता है, और अगर 6-neighbourhood पूरी तरह foreground वाला interior voxel हो तो skeletonize_vol से thin किया जाता है; फिर सभी 1 वाले 3x3x3 kernel (centre 0, mode="constant" से बाहर 0) के convolution से हर voxel के 26-neighbourhood में skeleton voxel की संख्या (degree) गिनी जाती है, और skel & (degree <= 1) लौटाया जाता है। volume के किनारे पर स्थित skeleton voxel, बाहर को 0 माने जाने के कारण, अगर branch वहीं कट जाए तो endpoint बन जाता है।

Returns: input के समान shape का bool array (endpoint = True)। foreground न हो तो पूरा False। np.argwhere से (z, y, x) coordinate, और .sum() से endpoint की संख्या मिलती है।

Validation (ValueError): 3-D न हो, खाली array हो, या float में NaN/Inf वाला input। thinning ज़रूरी हो और scikit-image न हो तो ImportError।

ध्यान दें:

• endpoint हर branch के सिरे पर सटीक हैं, पर spur (thinning से बनी छोटी branch) के सिरे भी endpoint गिने जाते हैं। केवल संरचना के सिरे चाहिए तो पहले skeleton_prune3d से काटें।

• केवल closed loop वाले skeleton (ring) में endpoint 0 होते हैं।

• केवल संख्या चाहिए तो topology_signature endpoints / isolated को अलग-अलग लौटाता है।

संदर्भ (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 · skeletonize_vol · medial_axis_points · topology_signature · medial_match · skeleton_junctions3d · 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.