<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hello,<div><br></div><div>The ScalarImageToHistogramGenerator is derived from Object not a ProcessObject so it's actually not a filter per-se.</div><div><br></div><div>The ImageToHistogramFilter is the filter version of this algorithm which is multi-threaded on a per image basis. This improve performance with larger image. However this does not help much with improving doing a large number of images at the same time.</div><div><br></div><div>There many potential issue with getting good performance in converting so many images into histograms. Such as IO bottle necks. And depending on what you want to do with the histograms afterwards and how to efficiently would help guide the choice.</div><div><br></div><div>Here are some option that come to mind:</div><div><br></div><div>1) Just write a program which reads an image an writes a histogram to disk. Then just run this program concurrently on your OS to get multi-process parallelization.</div><div>2) You could use a multi-threading library such as OpenMP or Threading building blocks to parallelize a for loop so that you are running multiple Histogram Generators concurrently.</div><div>3) Use ITK's DomainThreader or MultiThreader to spawn some threads and divide up the work.</div><div><br></div><div><br></div><div><br><div><div>On Jun 7, 2014, at 4:28 AM, 冯婷婷 <<a href="mailto:fttfzzx227@126.com">fttfzzx227@126.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><div style="line-height: 1.7; font-size: 14px; font-family: Arial;"><div>Hi,</div><div> I used itkScalarImageToHistogramGenerator to calculate the histogram of about 8000 2D images .But the speed is very slow ,I learned that ITK can support multithreaded programming. Then I have three questions :1) Only filters that have the function <span style="color: rgb(51, 51, 51); font-family: verdana, Arial, Helvetica, sans-serif; line-height: 25.200000762939453px;">ThreadedGenerateData() defined can support multithreaded programming? 2) If filters doesn't have this function,such as </span><span style="line-height: 1.7;"> itkScalarImageToHistogramGenerator,can I just write one for it ?3) If can't ,then what can I do to increase the speed of the calculation of the </span><span style="line-height: 1.7;">histograms of </span><span style="line-height: 1.7;"> a large number of images?</span></div><div><span style="line-height: 1.7;"><br></span></div><div><span style="line-height: 1.7;"> Any help would be appreciated ,thanks!</span></div><div><span style="line-height: 1.7;"><br></span></div><div><span style="line-height: 1.7;">Best regards!</span></div><div><span style="line-height: 1.7;"><br></span></div><div>Tina</div><div><br></div></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>_____________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:<br>http://www.kitware.com/products/protraining.php<br><br>Please keep messages on-topic and check the ITK FAQ at:<br>http://www.itk.org/Wiki/ITK_FAQ<br><br>Follow this link to subscribe/unsubscribe:<br>http://www.itk.org/mailman/listinfo/insight-users<br></blockquote></div><br></div></body></html>