[Insight-developers] iterator without index efficiency problem

Gaetan Lehmann gaetan.lehmann at jouy.inra.fr
Mon Feb 20 11:14:58 EST 2006


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

> Gaetan,
>
> I was just looking through the projection code. It looks like the code  
> is iterating
> over regions which are one pixel wide/tall/deep depending on the  
> projection direction.
> Do you have a sense for whether the timings of the iterators are  
> different for all the projection directions?

I haven't try to have the timing result for the different projection  
dimensions.

>
> The overhead in the ImageRegionIterator is in the wrapping from row to
> row in the region.  For long rows, the overhead is essentially  
> amortorized,
> adding little overhead to each pixel. But if the region is only walking a
> row of length 1, the overhead of row wrapping is applied to very pixel.
>

ok, I'll try to run the timing test with differents projection dimension  
to see if we have better results with the other dimensions, and perhap's  
worth results with the iterator with index.

> 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 10:22 AM
> To: Miller, James V (GE, Research); insight-developers at itk.org
> Subject: Re: [Insight-developers] iterator without index efficiency
> problem
>
>
>
> I forgot to say that the timing test should be run with the command line
>
> ./perf ../images/ESCells.img
>
> and that the result were very similar before switching to iterator with
> index.
>
> 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