- The 'skeleton' variable is a binary 3D matrix representing the initial edge-connected skeleton.
- 'bwconncomp' is used to label connected components in the skeleton using 26-connectivity.
- 'imdilate' and 'imerode' are used with a 3x3x3 structuring element to enforce face connectivity. This ensures that each voxel is connected to its 6 face neighbors.
- 'isosurface' is used to visualize the original and face-connected skeletons.
- bwconncomp: https://www.mathworks.com/help/images/ref/bwconncomp.html
- strel: https://www.mathworks.com/help/images/ref/strel.html