MATLAB files implementing the vascular geometry reconstruction algorithm in Bernabeu et al. "Computer simulations reveal complex distribution of haemodynamic forces in a mouse retina model of angiogenesis" J. R. Soc. Interface 2014.
SkelotonizeTiffPlexus.m computes the skeleton (and associated radii) of a binary image of a vascular plexus. It opens a dialog box to choose a .tif image and generates a .mat to be consumed by ReconstructSurfaceFromSkeleton.m. Note that the repository doesn't currently include any .tif image due to their size. The processed .mat have been included instead.
ReconstructSurfaceFromSkeleton.m takes computed skeleton and radii of a vascular plexus and reconstructs a 3D model of the luminal surface of the vessels
compile_VTP_writer.m compiles the MEX files needed to use certain VTK functionality from MATLAB in ReconstructSurfaceFromSkeleton.m
UsageExamples.m example of usage of previous scripts.
plexusImg is the mask for the plexus.
plexusBoundary is the edge of the mask, from the bwboundaries function in MATLAB
voronoiSkeleton is the skeleton produced by the voronoiSkel function
vertices is the xy data for the voronoi vertices from the voronoiSkel function
edges is the index data defining which vertices are connected by each edge (from voronoiSkel).
radii is the distance from each voronoi vertex to the edge of the plexus (i.e. the radius of the maximum inscribed circle at that point), calculated with knnsearch
radiiIndex is the index of the nearest point on plexusBoundary to the vertex (not sure if you need this), from knnsearch
skeleton is the skeleton produced by postprocessing voronoiSkeleton with MATLAB's bwmorph function
branchpoints is the data for the branchpoints of the plexus, produced with the bwmorph function