If I use a flood fill iterator (an example: <a href="http://www.itk.org/Wiki/ITK/Examples/WishList/Iterators/FloodFillIterator">http://www.itk.org/Wiki/ITK/Examples/WishList/Iterators/FloodFillIterator</a>), I get the order that the pixels are visited, but I don't see a way to learn the connectivity. That is, If there is a square of pixels:<div>
<br></div><div>1 2 3</div><div>4 5 6</div><div>7 8 9</div><div><br></div><div>I want to know that 1 is connected to 2 and 4, 2 is connected to 3 and 5, etc. (a breadth first search on the connected pixels). </div><div><br>
</div><div>Is there a better way to do this than subclassing the FloodFilledFunctionConditionalConstIterator and reimplementing DoFloodStep() ?<br><br>Thanks,<br><br>David</div>