[Insight-users] Unclear documentation for the new ImageScanlineIterator

Joël Schaerer joel.schaerer at gmail.com
Thu Aug 1 04:59:09 EDT 2013


Hi all,

I've just read in the Kitware source about the new ImageScanlineIterator 
which supposedly has better performance than the usual region iterators. 
Excited, I rush to the documentation to understand what this is about 
... Unfortunately, this is all I get:

"""

A multi-dimensional iterator templated over image type that walks a 
region of pixels, scanline by scanline or in the direction of the 
fastest axis.

The itk::ImageScanlineConstIterator 
<http://www.itk.org/Doxygen/html/classitk_1_1ImageScanlineConstIterator.html> 
is optimized for iteration speed and is the first choice for pixel-wise 
operations on an image
"""

And this is what the documentation of the ImageRegionIterator claims:

"""
The itk::ImageRegionIterator 
<http://www.itk.org/Doxygen/html/classitk_1_1ImageRegionIterator.html> 
is optimized for iteration speed and is the first choice for iterative, 
pixel-wise operations on an image
"""

So which is it? What are the limitations of the new iterator? When 
should you use one or the other? Why is it faster than the normal 
iterators, and why wasn't this change not applicable directly to the 
normal iterators?

After googling for a while, I found a little additional info in the 
commit: 
https://github.com/Kitware/ITK/commit/ab29cc59095d7448a1dbf1e09f96947036d2b118 
, but it's still too sparse to understand without hunting in the source 
of the library.

If I get good answers, I'm willing to add them to the documentation, 
which should at the very least answer the following questions:

* Why is the new class needed?
* How does it work, how does it differ from the existing iterators?
* When should you use it and when should you not use it?

Thanks,

joel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20130801/6584b736/attachment.htm>


More information about the Insight-users mailing list