srecord noeq G22SkeletonWalker(IImageRegion region) is Steppable { // nodes by starting point (filled during exploration) new Map nodesByPt; // temporary data ItIt ptIterator; // region pixel iterator new LinkedList> queue; // incomplete nodes queue (with point to check) // each node is a path, at the end of which there is an optional // junction with multiple branches class Node { new PtBuffer path; L branches; // junction part (optional) Pt startingPt() { ret first(path); } } public bool step() { ping(); if (nempty(queue)) { Pt p = popFirst(queue); } if (ptIterator == null) ptIterator = region.pixelIterator(); fOr (A b : getChildren.get(a)) add(b, a); true; } }