[Insight-developers] iterator without index efficiency problem

Gaetan Lehmann gaetan.lehmann at jouy.inra.fr
Mon Feb 20 10:02:37 EST 2006


ProjectionImageFilter use iterators with index, while the  
AccumulateImageFilter use an iterator without index.
Here are the timing results:

SumProjectionImageFilter     0.0872 s
MeanProjectionImageFilter    0.0828 s
AccumulateImageFilter, sum   0.465 s
AccumulateImageFilter, mean  0.465 s

A quite important difference of efficiency

I'll look at using ImageLinearConstIteratorWithIndex - thanks for the  
advice :-)

Gaetan

On Mon, 20 Feb 2006 15:16:07 +0100, Miller, James V (GE, Research)  
<millerjv at crd.ge.com> wrote:

> Gaetan,
>
> Where are your timing comparisons between the iterator types?
>
> We have studied the performance of the iterators several times.  The last
> in depth study was a several years ago.  Maybe something has changed.
>
> In previous studies, we ran both sets of iterators over a common task.
> While the program did report a difference in iterator timings, if we
> switched which iterator performed the task first, the timings would
> flip, leading to a different conclusion.
>
> To accumulate over different dimensions, you might want to consider the
> ImageLinearConstIteratorWithIndex.  Depending on how you are accumulating
> the information along a direction, this iterator may be more effecient  
> than
> a ImageRegionIterator or a ImageRegionIteratorWithIndex.
>
> I'll out together a test on the iterator performance so that we can
> benchmark the iterators.
>
> Jim
>
> -----Original Message-----
> From: insight-developers-bounces+millerjv=crd.ge.com at itk.org
> [mailto:insight-developers-bounces+millerjv=crd.ge.com at itk.org]On Behalf
> Of Gaetan Lehmann
> Sent: Monday, February 20, 2006 7:57 AM
> To: insight-developers at itk.org
> Subject: [Insight-developers] iterator without index efficiency problem
>
>
>
> Hi,
>
> I have noted a huge difference fo efficiency between the iterator with or
> without index: the iterator with index is more efficient than the one
> without index.
> Is it a known problem ?
> I'm using ITK2.4.1. Is is still valid in ITK cvs ? If yes, it should be
> fixed before the 2.6 release.
> I have noticed that while working of projections. Timing test can be ran
> to reproduce that.
> http://insight-journal.org/view_reviews.php?back=index.php&pubid=71
>
> Reagards,
>
> Gaetan
>



-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr


More information about the Insight-developers mailing list