[Insight-developers] ConditionalConstIterator Error?

John M. Galeotti jgaleotti@cmu.edu
Tue, 15 Apr 2003 21:43:26 -0400


Hello, I am working on an iterator to walk through an image following 
any type of path.  Since most paths will not cover all image indices, 
it would be logical for this iterator to descend from 
ConditionalConstIterator, but there is one small problem.  
ConditionalConstIterator includes the pure virtual function 
IsPixelIncluded(), which would be almost useless and prohibitively 
expensive to calculate for some types of paths (paths are almost always 
traveled linearly), and so I really do not want to implement the 
exhaustive search required for it.  The documentation in 
ConditionalConstIterator states that this function is used to "Compute 
whether the index of interest should be included in the flood."  
Therefore, it seems that this pure virtual function should be 
introduced into the ITK class hierarchy in its child 
FloodFilledFunctionConditionalConstIterator, not in 
ConditionalConstIterator.  A quick look at the ConditionalConstIterator 
inheritance diagram seems to indicate that this would not be a problem, 
and FloodFilledFunctionConditionalConstIterator.h would not even have 
to be modified.

Could someone please remove the IsPixelIncluded() function from 
ConditionalConstIterator.h?

Thank you,
John Galeotti
jgaleotti@cmu.edu