<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"><base href="x-msg://1269/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello,<div><br></div><div>Are you manually setting the MinMax for the ImageToHistogramFilter?</div><div><br></div><div>Have you looked at threading?</div><div><br></div><div>How do these methods scale as the number of threads increase? You can just set the environment variable ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS for ITK. I am wondering if there is a concurrency issue in </div><div>ITK.</div><div><br></div><div><br></div><div>Brad</div><div><br><div><div>On May 15, 2013, at 12:50 PM, Arikan Mustafa <<a href="mailto:Mustafa.Arikan@fh-wels.at">Mustafa.Arikan@fh-wels.at</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div lang="DE" link="blue" vlink="purple" style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="WordSection1" style="page: WordSection1; "><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-US" style="font-size: 12pt; ">Thanks for the quick response.<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-US" style="font-size: 12pt; "> </span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-US" style="font-size: 12pt; ">This is done in release mode. Like this:<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-US" style="font-size: 12pt; "> </span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-US" style="font-size: 9.5pt; font-family: Consolas; "> <span class="Apple-converted-space"> </span><span style="color: blue; ">int</span><span class="Apple-converted-space"> </span>nTimeStart = GetMilliCount();<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-US" style="font-size: 9.5pt; font-family: Consolas; "> imageAccumulate->Update();<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-US" style="font-size: 9.5pt; font-family: Consolas; "> <span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; ">int</span><span style="font-size: 9.5pt; font-family: Consolas; "><span class="Apple-converted-space"> </span>nTimeElapsed = GetMilliSpan( nTimeStart );<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-US" style="color: rgb(31, 73, 125); "> …<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 9.5pt; font-family: Consolas; "> <span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 9.5pt; font-family: Consolas; color: blue; ">int</span><span lang="EN-US" style="font-size: 9.5pt; font-family: Consolas; "><span class="Apple-converted-space"> </span>nTimeStart2 = GetMilliCount();<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-US" style="font-size: 9.5pt; font-family: Consolas; "> imageToHistogramFilter->Update();<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-US" style="font-size: 9.5pt; font-family: Consolas; "> <span class="Apple-converted-space"> </span><span style="color: blue; ">int</span><span class="Apple-converted-space"> </span>nTimeElapsed2 = GetMilliSpan( nTimeStart2 );<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-US" style="color: rgb(31, 73, 125); "> …<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 9.5pt; font-family: Consolas; "> <span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 9.5pt; font-family: Consolas; color: blue; ">int</span><span lang="EN-US" style="font-size: 9.5pt; font-family: Consolas; "><span class="Apple-converted-space"> </span>nTimeStart3 = GetMilliCount();<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-US" style="font-size: 9.5pt; font-family: Consolas; "> scalarImageToHistogramGenerator->Compute();<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-US" style="font-size: 9.5pt; font-family: Consolas; "> <span class="Apple-converted-space"> </span></span><span style="font-size: 9.5pt; font-family: Consolas; color: blue; ">int</span><span style="font-size: 9.5pt; font-family: Consolas; "><span class="Apple-converted-space"> </span>nTimeElapsed3 = GetMilliSpan( nTimeStart3 );<o:p></o:p></span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-US" style="color: rgb(31, 73, 125); "> </span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-US" style="color: rgb(31, 73, 125); "> </span></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span lang="EN-US" style="color: rgb(31, 73, 125); "> </span></div><div><div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(181, 196, 223); padding: 3pt 0cm 0cm; "><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><b><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">Von:</span></b><span style="font-size: 10pt; font-family: Tahoma, sans-serif; "><span class="Apple-converted-space"> </span>David Cole [mailto:dlrdave@<a href="http://aol.com" style="color: purple; text-decoration: underline; ">aol.com</a>]<span class="Apple-converted-space"> </span><br><b>Gesendet:</b><span class="Apple-converted-space"> </span>Mittwoch, 15. Mai 2013 17:31<br><b>An:</b><span class="Apple-converted-space"> </span><a href="mailto:insight-users@itk.org" style="color: purple; text-decoration: underline; ">insight-users@itk.org</a>; Arikan Mustafa<br><b>Betreff:</b><span class="Apple-converted-space"> </span>Re: [Insight-users] Histogram calculation performance between ScalarImageToHistogramGenerator, ImageToHistogramFilter and vtkImageAccumulate<o:p></o:p></span></div></div></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div><div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 12pt; ">Is this on Windows, with a Debug build using the Microsoft compiler?<o:p></o:p></span></div></div><div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 12pt; "> <o:p></o:p></span></div></div><div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 12pt; ">If so, re-do the timings with a Release build.<o:p></o:p></span></div></div><div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 12pt; "> <o:p></o:p></span></div></div><div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 12pt; ">The Debug memory allocator has serious performance issues because of the tracking of allocations that they do in the runtime. Release builds are frequently 100x faster in scenarios with lots of small allocations.<o:p></o:p></span></div></div><div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 12pt; "> <o:p></o:p></span></div></div><div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 12pt; ">If this is not MS Debug build on Windows, then just delete this message...<span class="Apple-converted-space"> </span></span><span style="font-size: 12pt; font-family: 'Segoe UI Symbol', sans-serif; ">😊</span><span style="font-size: 12pt; "><o:p></o:p></span></div></div><div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 12pt; "> <o:p></o:p></span></div></div><div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 12pt; "> <o:p></o:p></span></div></div><div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 12pt; ">D<o:p></o:p></span></div></div><div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 12pt; "> <o:p></o:p></span></div></div><div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-size: 12pt; color: rgb(31, 73, 125); "> </span></div></div></div></div>_____________________________________<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</div></blockquote></div><br></div></body></html>