This is the MATLAB code used to produce all data plots in the paper "The small world of osteocytes: connectomics of the osteocyte lacuno-canalicular network" (New J. Phys. 19 073019, https://doi.org/10.1088/1367-2630/aa764b) from the raw confocal image data.
The following external dependencies need to be in your MATLAB path:
- Skeleton3D (https://github.com/phi-max/skeleton3d-matlab)
- Skel2Graph3D (https://github.com/phi-max/skel2graph3d-matlab)
- MatlabBGL by David Gleich (https://github.com/dgleich/matlab-bgl/)
The data for the paper are available on Zenodo:
Two scripts need to be called to generate the plots. All other .m
files and external dependencies (see above) must be on your MATLAB path. The data should be located in the current working directory.
OCY_analyze_all.m
: main script to analyze data, using parallel pool if available.OCY_generate_figures.m
: collects analyzed data from subfolders and generates the plots.
Data structures are saved as .mat
files of the same name as the variable in each folder.
- bin_thr: Binary image volume after smoothing and thresholding.
- bin: Binary image volume after morphological filtering.
- cell: Binary volume containing only the cells.
- skel_ini: Initial result of 3D thinning.
- skel: Final result of 3D thinning after filtering and cleaning.
- dist: Distance transform of the complete network.
- celldist: Distance transform of the cells only.
- didx: Index of the closest canalicular voxel.
- node: Struct containing all nodes with their properties.
- link: Struct containing all links with their properties.
- cell: Struct containing all cells with their properties.
- A: Connectivity matrix, where Aij ist the length of a link between nodes i and j.
- n: Struct containing the results of the topological analysis.