Calculate the network graph of a 3D voxel skeleton.

Version 1.0.0 (270 KB) by Haim Ezer
Convert a 3D skeleton binary matrix created with bwskel(D) to a MATLAB Graph, in a fast and efficient manner (no loops)
19 Downloads
Updated 13 Sep 2023

View License

Convert a 3D skeleton binary matrix created with bwskel(D) to a
MATLAB Graph, in a fast and efficient manner (no loops) similar to Skel2graph3D:
https://www.mathworks.com/matlabcentral/fileexchange/43527-skel2graph-3d?s_tid=ta_fx_results
In about one tenth of the time.
Input: Binary skeleton (Like the included skel, view with isosurface(skel)
Output: G: A MATLAB 3d graph object - https://www.mathworks.com/help/matlab/ref/graph.html?s_tid=srchtitle_site_search_1_graph
A: The adjacency matrix - https://www.mathworks.com/help/matlab/ref/graph.adjacency.html?s_tid=doc_ta
P: 3D points coordinates
Z: The zscore of these (P) points location
Dependencies: dependencies.toolboxDependencyAnalysis('Skel2graph3D_fast.m'): {'MATLAB'} {'Statistics and Machine Learning Toolbox'}
MATLAB version: created with MATLAB version 2023a but should work with earlier
versions
to view the graph in 3D:
close all; p = plot(G); hold on
p.XData = P(:,1); p.YData = P(:,2); p.ZData = P(:,3);
rotate3d; view(3);

Cite As

Haim Ezer (2024). Calculate the network graph of a 3D voxel skeleton. (https://www.mathworks.com/matlabcentral/fileexchange/135281-calculate-the-network-graph-of-a-3d-voxel-skeleton), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2023a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired by: Skel2Graph 3D

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0