[Insight-users] An informal comparison between itk::BinaryDilateImageFilter and Matlab's imdilate()

Ramón Casero Cañas rcasero at gmail.com
Mon Aug 15 06:46:40 EDT 2011


Hi all,

After writing a program to run filters derived from 
itk::ImageToImageFilter in Matlab [1], I though to make an informal 
comparison between ITK and Matlab's 3D binary dilation.

I run both on a 574x532x1024 uint8 binary image with 3.8% of voxels == 
1, a couple of times, on linux 64-bit, with a 3-voxel radius.


itk::BinaryDilateImageFilter (from ITK v3.20) took between 87 and 88 sec.

Matlab's imdilate()  (from Matlab R2010b) took between 76 and 79 sec.



My program uses itk::ImportImageFilter to run the filter directly on the 
Matlab buffer, and also uses a Matlab buffer for the filter output 
(using mummification).

The Matlab function invokes a MEX file, so in both cases we are running 
C++ compiled code on the same data.


So, the conclusion of this informal comparison would be that Matlab's 
implementation of binary dilation seems 12% faster than ITK's.



[1] 
http://code.google.com/p/gerardus/source/browse/tags/release-0.6.0/matlab/ItkToolbox/ItkImFilter.cpp



Best regards,

Ramon.

-- 
Dr. Ramón Casero Cañas

Computational Biology
Department of Computer Science
University of Oxford
Wolfson Building, Parks Rd
Oxford OX1 3QD

tlf     +44 (0) 1865 610737
web     http://web.comlab.ox.ac.uk/people/Ramon.CaseroCanas
photos  http://www.flickr.com/photos/rcasero/


More information about the Insight-users mailing list