[Insight-developers] itkImageConstIteratorWithIndex.h

Luis Ibanez luis.ibanez@kitware.com
Thu, 24 Apr 2003 10:41:50 -0400


Hi Mark,

We considered to support reverse iteration in the early days
of the toolkit. However, as algorithms were implemented, it
simply happened that you rarely need reverse iteration for
performing image processing.

The only close case was the DanielssonDistance map filter, and
a special iterator was created for taking care of this case.
(this is the Reflective Iterator).

Apart from that, we probably don't have any other instances of
reverse iteration in the toolkit.


   Luis


--------------------------------------
Mark Foskey wrote:
> Ah, my ignorance of the details of ITK iterators becomes more apparent.
> 
> Most iterator types don't currently have Reverse versions.  It seems to 
> me that they all should, except for those where a strong case can be 
> made that one isn't necessary.  But doing that would increast the number 
> of iterator classes greatly.
> 
> On the other hand, the design should be consistent.  If you buy that, 
> and you still don't want to write a bunch more reverse iterators, and 
> you also want graceful reverse iteration, then they should all work 
> something like itkImageConstIteratorWithIndex, perhaps with a 
> PixelsRemaining() method.
>