<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"Segoe UI Symbol";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Sprechblasentext Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.msolistparagraphcxspfirst, li.msolistparagraphcxspfirst, div.msolistparagraphcxspfirst
        {mso-style-name:msolistparagraphcxspfirst;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        line-height:115%;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.msolistparagraphcxspmiddle, li.msolistparagraphcxspmiddle, div.msolistparagraphcxspmiddle
        {mso-style-name:msolistparagraphcxspmiddle;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        line-height:115%;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.msolistparagraphcxsplast, li.msolistparagraphcxsplast, div.msolistparagraphcxsplast
        {mso-style-name:msolistparagraphcxsplast;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        line-height:115%;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.SprechblasentextZchn
        {mso-style-name:"Sprechblasentext Zchn";
        mso-style-priority:99;
        mso-style-link:Sprechblasentext;
        font-family:"Tahoma","sans-serif";}
span.e-mailformatvorlage17
        {mso-style-name:e-mailformatvorlage17;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.sprechblasentextzchn0
        {mso-style-name:sprechblasentextzchn;
        font-family:"Tahoma","sans-serif";}
span.E-MailFormatvorlage25
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DE link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-size:12.0pt'>Thanks for the quick response.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:12.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:12.0pt'>This is done in release mode. Like this:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:12.0pt'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:blue'>int</span> nTimeStart = GetMilliCount();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> imageAccumulate->Update();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>int</span><span style='font-size:9.5pt;font-family:Consolas'> nTimeElapsed = GetMilliSpan( nTimeStart );<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> …<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas'> </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'> nTimeStart2 = GetMilliCount();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> imageToHistogramFilter->Update();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> <span style='color:blue'>int</span> nTimeElapsed2 = GetMilliSpan( nTimeStart2 );<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'> …<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas'> </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'> nTimeStart3 = GetMilliCount();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> scalarImageToHistogramGenerator->Compute();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span lang=EN-US style='font-size:9.5pt;font-family:Consolas'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>int</span><span style='font-size:9.5pt;font-family:Consolas'> nTimeElapsed3 = GetMilliSpan( nTimeStart3 );<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Von:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> David Cole [mailto:dlrdave@aol.com] <br><b>Gesendet:</b> Mittwoch, 15. Mai 2013 17:31<br><b>An:</b> insight-users@itk.org; Arikan Mustafa<br><b>Betreff:</b> Re: [Insight-users] Histogram calculation performance between ScalarImageToHistogramGenerator, ImageToHistogramFilter and vtkImageAccumulate<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal><span style='font-size:12.0pt'>Is this on Windows, with a Debug build using the Microsoft compiler?<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt'> <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt'>If so, re-do the timings with a Release build.<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt'> <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt'>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></p></div><div><p class=MsoNormal><span style='font-size:12.0pt'> <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt'>If this is not MS Debug build on Windows, then just delete this message... </span><span style='font-size:12.0pt;font-family:"Segoe UI Symbol","sans-serif"'>😊</span><span style='font-size:12.0pt'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt'> <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt'> <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt'>D<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt'> <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:12.0pt;color:#1F497D'><o:p> </o:p></span></p></div></div></div></body></html>