Graph and levelset based surface construction.
The animation shows a graph curve on the left that is coloured towards a desired local radius. Such a curve could stem from an image segmentation such as the centre line for a blood vessel. The local radius would then represent the local blood vessel radius. On the right a slice through a corresponding "levelset image" is shown. The level set image is a signed distance for the vessel surface but normalised by this radius, so a distance of 1.0 means we are 1 local radius value away from the desired surface. An intensity level of 0.0 means we are on the desired surface, negative levels mean are for the inside, and positive levels are for the outside. Once the levelset image is established the surface can be constructed by drawing the isosurface for the level 0.0. Just to test the algorithm, in this animation, I am creating a sinusoidal variation of the radial data. By increasing the frequency there are more and more bumps in the surface. Critically, when features on the surface become too curved or thin with respect to the voxel size, the surface may become too noisy as the coarse voxelisation starts to fail to capture the detail in the geometry.
This is the new #Julialang implementation but my old MATLAB implementation was used here:
https://doi.org/10.1016/j.jbiomech.2021.110896 (open access version: https://doi.org/10.31224/osf.io/qaujs)
and here:
https://doi.org/10.1098/rsos.242025