Skip to main content
. Author manuscript; available in PMC: 2010 Dec 11.
Published in final edited form as: Neuroinformatics. 2009 Dec 11;7(4):213–232. doi: 10.1007/s12021-009-9057-y
for t = 1 to Number of erosion recursion
 Erosion(GMST)
 Push eroded vertices and edges {ei, vi} into a stack
end
Begin dilation operation
Mark all end vertices if their degrees are one
if the stack is not empty
 Pop a vertex and edge {ei, vi} from the stack
 if the vertex and edge extends from an end vertex of current graph
  Add the vertex and edge back to the graph
  Mark new end vertex
 else
  Discard the vertex and edge
 end
end
Obtain the backbone graph, Gbb