<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Apr 17, 2015, at 10:05 AM, Matt McCormick <<a href="mailto:matt.mccormick@kitware.com">matt.mccormick@kitware.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class="Apple-interchange-newline">Then, there is no scan line iterator with index. Is that something that would be doable and if yes, is it something planned or not ? I have the feeling that If no the most efficient (in a filter with access to the index at each pixel), region iterator with index would be more efficient.<br></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">Bradley may know offhand whether this would be possible.</span></blockquote></div><br><div>As I recall I did some performance comparison between the ScanLine iterators and the LinearWithIndex iterators. And the LinearWithIndex held up very well. ( Sorry I don't have more specifics ).</div><div><br></div><div>The fundamental goal of the Scanline iterator was to create an inner loop that was auto-vectorizable if the loop block had no conditionals. This is true for a lot of basic unary and binary filters. With more complicated loops with conditionals like are frequent when an index is used the gains are not as significant. There is certainly no harm in switching to the Scanline iterator when you can, but I would not guarantee measurable gains in all cases.</div><div><br></div><div>HTH,</div><div>Brad</div></body></html>