<html>
<head>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi all,<br>
<br>
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:<br>
<br>
"""<br>
<p>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. </p>
The <a class="el"
href="http://www.itk.org/Doxygen/html/classitk_1_1ImageScanlineConstIterator.html"
title="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. ">itk::ImageScanlineConstIterator</a> is
optimized for iteration speed and is the first choice for pixel-wise
operations on an image<br>
"""<br>
<br>
And this is what the documentation of the ImageRegionIterator
claims:<br>
<br>
"""<br>
The <a class="el"
href="http://www.itk.org/Doxygen/html/classitk_1_1ImageRegionIterator.html"
title="A multi-dimensional iterator templated over image type that
walks a region of pixels. ">itk::ImageRegionIterator</a> is
optimized for iteration speed and is the first choice for iterative,
pixel-wise operations on an image<br>
"""<br>
<br>
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?<br>
<br>
After googling for a while, I found a little additional info in the
commit: <a class="moz-txt-link-freetext"
href="https://github.com/Kitware/ITK/commit/ab29cc59095d7448a1dbf1e09f96947036d2b118">https://github.com/Kitware/ITK/commit/ab29cc59095d7448a1dbf1e09f96947036d2b118</a>
, but it's still too sparse to understand without hunting in the
source of the library.<br>
<br>
If I get good answers, I'm willing to add them to the documentation,
which should at the very least answer the following questions:<br>
<br>
* Why is the new class needed?<br>
* How does it work, how does it differ from the existing iterators?<br>
* When should you use it and when should you not use it?<br>
<br>
Thanks,<br>
<br>
joel<br>
<br>
</body>
</html>