pycroglia.core.slimskel3d.tests.unit package
Submodules
- pycroglia.core.slimskel3d.tests.unit.test_graph2skel.test_graph2skel()[source]
Test Graph2Skel3D correctly reconstructs skeleton from graph.
- Asserts:
Converting a skeleton volume to graph (skel2graph) and back to a voxel skeleton (graph2skel) matches the original volume except for 9 known mismatched voxels.
The number of mismatches is exactly 9.
The mismatched voxel coordinates match the expected set.
- pycroglia.core.slimskel3d.tests.unit.test_skel2graph.test_skel2graph()[source]
Test Skel2Graph3D correctly converts a skeleton volume to a graph.
- Asserts:
The number of detected nodes equals 88.
The number of detected links equals 97.
The computed adjacency matrix matches the expected adjacency matrix (loaded from file) element-wise.
- pycroglia.core.slimskel3d.tests.unit.test_slimskel3d.test_slimskel3d()[source]
Test that slimskel3d prunes short spurs while preserving main branches.
- This test constructs a synthetic 10×10×10 volume containing:
A main vertical skeleton branch along the z-axis at coordinates (y=5, x=5).
A short 2-voxel spur branching in the +x direction at z=5.
- Assertions:
The number of voxels after slimming is strictly less than before, ensuring spur pruning occurred.
The set of remaining voxel coordinates matches the expected slimmed skeleton:
- [[2, 5, 5],
[3, 5, 5], [4, 5, 5], [6, 5, 5], [7, 5, 5],