[Insight-developers] itkImageConstIteratorWithIndex.h
Mark Foskey
mark_foskey@unc.edu
Thu, 24 Apr 2003 13:50:00 -0400
But still, people have gone to some effort to support reverse
iteration, in two inconsistent ways. We need to establish a consistent
semantics.
Luis Ibanez wrote:
>
> 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.
>>
>
--
Mark Foskey (919) 843-5436 Computer-Aided Diagnosis and Display Lab
mark_foskey@unc.edu Department of Radiology, CB 7515, UNC
http://www.cs.unc.edu/~foskey Chapel Hill, NC 27599-7515