Did you compile ITK with a BUILD_TYPE Release?<br><br><div class="gmail_quote">2011/8/15 Ramón Casero Cañas <span dir="ltr"><<a href="mailto:rcasero@gmail.com">rcasero@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
Hi all,<br>
<br>
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.<br>
<br>
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.<br>
<br>
<br>
itk::BinaryDilateImageFilter (from ITK v3.20) took between 87 and 88 sec.<br>
<br>
Matlab's imdilate() (from Matlab R2010b) took between 76 and 79 sec.<br>
<br>
<br>
<br>
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).<br>
<br>
The Matlab function invokes a MEX file, so in both cases we are running C++ compiled code on the same data.<br>
<br>
<br>
So, the conclusion of this informal comparison would be that Matlab's implementation of binary dilation seems 12% faster than ITK's.<br>
<br>
<br>
<br>
[1] <a href="http://code.google.com/p/gerardus/source/browse/tags/release-0.6.0/matlab/ItkToolbox/ItkImFilter.cpp" target="_blank">http://code.google.com/p/<u></u>gerardus/source/browse/tags/<u></u>release-0.6.0/matlab/<u></u>ItkToolbox/ItkImFilter.cpp</a><br>
<br>
<br>
<br>
Best regards,<br>
<br>
Ramon.<br>
<br>
-- <br>
Dr. Ramón Casero Cañas<br>
<br>
Computational Biology<br>
Department of Computer Science<br>
University of Oxford<br>
Wolfson Building, Parks Rd<br>
Oxford OX1 3QD<br>
<br>
tlf <a href="tel:%2B44%20%280%29%201865%20610737" value="+441865610737" target="_blank">+44 (0) 1865 610737</a><br>
web <a href="http://web.comlab.ox.ac.uk/people/Ramon.CaseroCanas" target="_blank">http://web.comlab.ox.ac.uk/<u></u>people/Ramon.CaseroCanas</a><br>
photos <a href="http://www.flickr.com/photos/rcasero/" target="_blank">http://www.flickr.com/photos/<u></u>rcasero/</a><br>
______________________________<u></u>_______<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<u></u>opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/<u></u>products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_<u></u>FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-use</a><br>
</blockquote></div>