- Blur raw data to smooth out high freuency noise -> leads to better thresholding results
- Threshold image to convert grayscale image(s) into binary format in relation to the threshold value.
- Skeletonize image (using Lee94 algorithm):
- Distance Transform (2D or 3D) - labels each pixel/voxel of the image with the distance to the nearest background/void.
- Extract Nodes and Branches
- Export data as CSVs
The gif below showcases z axis slices - from left: thresholded data, 3D distance transform (distances mapped as pixel values), branch pixels, node pixels.The 3D skeleton might look bizare when viewed one slice at a time, but makes much more sense when viewed in 3D. This skeleton data would later be used to run mechanical simulations.