[ITK] [ITK-users] Scan line iterators, region iterators and indexes

Bradley Lowekamp blowekamp at mail.nih.gov
Fri Apr 17 10:20:12 EDT 2015


On Apr 17, 2015, at 10:05 AM, Matt McCormick <matt.mccormick at kitware.com> wrote:

>> 
>> 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.
> 
> Bradley may know offhand whether this would be possible.

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 ).

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.

HTH,
Brad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20150417/fe4a8b21/attachment.html>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list