[Insight-developers] ImageRegionIterator performance

Luis Ibanez ibanez at cs.unc.edu
Mon Nov 13 16:44:39 EST 2000


Hi Jim,

This is just great !

Now, we can then get rid of  ImageIteratorWithIndex
and ImageRegionSimpleIterator that were just trying
to provide better performance. (at the price of creating
confusion).


To follow the hierarchy,    ImageLinearIterator and
ImageSliceIterator should now derive from ImageIterator
as you suggest.


BTW,
I broke the API of some iterators to get ImageAdaptors  work.
The basic change was to parametrize iterators over the ImageType
instead of PixelType  and Dimension.  Do you think that we could
make this change on the rest of iterators to make things uniform ?


Thanks

Luis

---------


Jim Miller wrote:
> My test created a 200x200x200 unsigned short image and walked a
190x190x190 region setting each pixel
> to a constant value.  I compared the access of raw pointers running
through a contiguous block of
> memory (equivalent in size to 190x190x190) to the ImageRegionIterator
before and after my
> optimizations.
>
> Raw Pointer      Original RegionIterator     New RegionIterator
>  7 seconds              63 seconds               8 seconds


--------




More information about the Insight-developers mailing list