[Insight-users] Speed
Gaëtan Lehmann
gaetan.lehmann at jouy.inra.fr
Wed Feb 9 05:55:34 EST 2011
Le 9 févr. 11 à 11:47, Dan Mueller a écrit :
> Did you compile in Release mode?
>
> On 9 February 2011 10:33, Gib Bogle <g.bogle at auckland.ac.nz> wrote:
>> I have encountered something that surprises me, and I'd like to
>> hear any
>> comments. I'm not being critical, it's just interesting. I was
>> using
>> MeanImageFilter, and was surprised at how slowly it ran on my
>> image. Since
>> the filter function is very simple, I decided to code up my own
>> version, to
>> see if I could get it done faster. I'm not really a competent C++
>> programmer, so I've just implemented an efficient algorithm in C.
>>
>> I'm testing with a greyscale image 955x963x100, on a Core i7 W7
>> machine (4
>> cores, 8 threads). Setting each filter radius to 5, the
>> MeanImageFilter
>> processing takes 1184 sec, using all 8 threads (100% CPU usage).
>> My own
>> averaging code takes 105 sec, using only a single thread (12.5% CPU
>> usage).
>>
>> Why the big difference?
Hi,
As suggested by Dan, building in Release mode can make a huge
difference.
But implementing an efficient algorithm, as you did, can also explain
that difference.
Have you tried a more efficient implementation like the
BoxMeanImageFilter? IIRC, it is running a lot faster.
Regards,
Gaëtan
--
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 http://www.itk.org
http://www.mandriva.org http://www.bepo.fr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 203 bytes
Desc: Ceci est une signature ?lectronique PGP
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110209/2f9098ef/attachment.pgp>
More information about the Insight-users
mailing list