[Insight-developers] Non-global comparisons in FloodFill iterators

David Doria daviddoria at gmail.com
Mon Jun 6 17:24:14 EDT 2011


Currently the FloodFill iterators call a IsPixelIncluded(index) which
calls m_Function->EvaluateAtIndex(index) to determine if a pixel is
suitable for inclusion. This only allows a "global" value test. There
are cases when you might want to keep flooding if the pixel is similar
to its neighbors, or keep going if the next pixels meets a criterion
of a statistic on the current region. For this, it seems the call
would need to be more like IsPixelIncluded(currentIndex,
otherArguments) or at least IsPixelIncluded(currentIndex, testIndex).

It would be easy to make a new class like
itkFloodFilledImageFunctionConditionalConstIterator with the modified
call to EvaluateAtIndex. However, the call to IsPixelIncluded is in
the logic of itkFloodFilledFunctionConditionalConstIterator. Is the
only way to do this to copy a big portion of the code from
itkFloodFilledFunctionConditionalConstIterator into a new class called
something like itkFloodFilledFunctionBoundaryConditionalConstIterator
or similar?

Any thoughts or suggestions?

David


More information about the Insight-developers mailing list