<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=iso-8859-1"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><base href="x-msg://77/"><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","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
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.apple-style-span
        {mso-style-name:apple-style-span;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle22
        {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-AT link=blue vlink=purple style='word-wrap: break-word;-webkit-nbsp-mode: space;-webkit-line-break: after-white-space'><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi Brad,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thank you for your reply. As recommended by you, I will use the itkHessianImageFilter to calculate the hessian. I see the filter is multithreaded which<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Was not available before, so i think it will be faster than before. On the other hand the itkHessianImageFilter calculates an output image, which i think<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Will drastically increase the use of RAM compared to the itkDiscreteHessianGaussianImagefunction.h. Am i right?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>However, I will have to test for the speed and for the memory usage.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thank you for the filter.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Regards,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Kana <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</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 lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Bradley Lowekamp [mailto:blowekamp@mail.nih.gov] <br><b>Sent:</b> 29 March 2011 06:42<br><b>To:</b> Arunachalam Kana<br><b>Cc:</b> insight-users@itk.org<br><b>Subject:</b> Re: [Insight-users] Memory management<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Hello Kana,<o:p></o:p></p><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>Sorry for the delay in getting this out there. I have placed what I have been working on github:<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal><a href="https://github.com/blowekamp/itkLocalDiscreteHessian">https://github.com/blowekamp/itkLocalDiscreteHessian</a><o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>The itkHessianDiscreteGaussianimageFilter is not yet implemented, and I still need to migrate more testing over to the github module.&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>I would recommend just coping over itkHessianImageFilter into your project, writing some test to make yourself confident that it's computing the correctly, then keep an eye on the github repository.&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>Good luck,<o:p></o:p></p></div><div><p class=MsoNormal>Brad<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><div><p class=MsoNormal>On Mar 21, 2011, at 12:20 PM, Arunachalam Kana wrote:<o:p></o:p></p></div><p class=MsoNormal><br><br><o:p></o:p></p><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi Brad,</span><o:p></o:p></p></div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thank you for the reply.</span><o:p></o:p></p></div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>In brief : My goal is to calculate the eigen vectors using eigenanalysisfunction.</span><o:p></o:p></p></div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Calculation of hessian with recursivegaussian occupy 12times more memory. discretegaussian is 30 times slower and not multithreaded.</span><o:p></o:p></p></div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>My image is 10Gb and my ram is 64Gb too.</span><o:p></o:p></p></div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;</span><o:p></o:p></p></div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thank you for the advice and for the information that you are already working on it. I will wait for the code.</span><o:p></o:p></p></div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thank you,</span><o:p></o:p></p></div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Regards,</span><o:p></o:p></p></div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Kana</span><o:p></o:p></p></div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;</span><o:p></o:p></p></div><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm;border-width:initial;border-color:initial'><div><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span class=apple-converted-space><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>&nbsp;</span></span><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Bradley Lowekamp [mailto:blowekamp@mail.nih.gov]<span class=apple-converted-space>&nbsp;</span><br><b>Sent:</b><span class=apple-converted-space>&nbsp;</span>21 March 2011 17:03<br><b>To:</b><span class=apple-converted-space>&nbsp;</span>Arunachalam Kana<br><b>Cc:</b><span class=apple-converted-space>&nbsp;</span><a href="mailto:insight-users@itk.org">insight-users@itk.org</a><br><b>Subject:</b><span class=apple-converted-space>&nbsp;</span>Re: [Insight-users] Memory management</span><o:p></o:p></p></div></div></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>Hello Kana,<o:p></o:p></p></div><div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div></div><div><div><p class=MsoNormal>I would strongly not recommend not taking this approach. It is rather inefficient, and version 3.20 has a bug related to this method.<o:p></o:p></p></div></div><div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div></div><div><div><p class=MsoNormal>I have an alternative implementation with exploits the separability of the convolution by a derivative. Simply, I implemented a discrete Hessian filter where a Gaussian convolution can occur as a prior filter. I hopefully will be able to get this to a sharable state this week.<o:p></o:p></p></div></div><div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div></div><div><div><p class=MsoNormal>Brad<o:p></o:p></p></div></div><div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div></div><div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div></div><div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><div><div><p class=MsoNormal>On Mar 21, 2011, at 10:35 AM, Arunachalam Kana wrote:<o:p></o:p></p></div></div><div><p class=MsoNormal><br><br><br><o:p></o:p></p></div><div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi Vera,</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thank you for the information that the recursive Gaussian cannot be streamed.</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi Masslawi,</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I have not tried the release version , i will surely try it.</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I decided to use discretehessiancalculation for calculation of hessian matrix. I thought of increasing the speed by multithreading in my own filter.</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>My filter takes 1 input image and gives 1 output image. So i calculate the hessian for each voxel.</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>The problem: My program breaks due to the following error.</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>ERROR MESSAGE:</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>Windows has triggered a breakpoint in iAnalyseGUI.exe.</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>This may be due to a corruption of the heap, which indicates a bug in iAnalyseGUI.exe or any of the DLLs it has loaded.</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>This may also be due to the user pressing F12 while iAnalyseGUI.exe has focus.</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>The output window may have more diagnostic information.</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>The breakage happens when the 3rd thread starts, and in DiscreteHessianGaussianImageFunction.txx line 116.</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:red'>I need some help in solving the heap problem.</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>And finally the question comes to whether is it possible to multithread the DiscreteHessianGaussianImageFunction.txx ?????</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>As i have to work with large size data, i really need it, so if i can find the code somewhere please direct me or i would need some help to</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Multithread the DiscreteHessianGaussianImageFunction.txx.</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>//code</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>template&lt;class TInputImageType, &nbsp;class TOutputImageType&gt;</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>void MYFilter&lt;TInputImageType,&nbsp; &nbsp;&nbsp;&nbsp;TOutputImageType&gt;</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>::ThreadedGenerateData(const OutputImageRegionType&amp; outputRegionForThread, int threadId)</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>{</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='text-indent:35.4pt'><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>&nbsp; typename OutputImageType::Pointer output = this-&gt;GetOutput();</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='text-indent:35.4pt'><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>&nbsp; typename InputImageType::ConstPointer input = this-&gt;GetInput();</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>&nbsp;</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //set hessian function</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal style='text-indent:35.4pt'><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>m_HessianFunction = HessianFunctionType::New();</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_HessianFunction-&gt;SetInputImage(m_GradientMagnitudeImage );</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_HessianFunction-&gt;SetSigma( 1 );</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_HessianFunction-&gt;SetMaximumError( 0.01 );</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_HessianFunction-&gt;SetMaximumKernelWidth( 32 );</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_HessianFunction-&gt;SetNormalizeAcrossScale( 1 );</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_HessianFunction-&gt;SetUseImageSpacing( false );</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_HessianFunction-&gt;Initialize( );</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //initiate iamge iterators</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InputImageRegionIteratorType inIter(m_InputImage, outputRegionForThread);</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OutputImageRegionIteratorType outIter(m_OutputImage, outputRegionForThread);</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>&nbsp;</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; inIter.GoToBegin();</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while ( !inIter.IsAtEnd() )</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InputIndexType currentindex =inIter.GetIndex();</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InputPixelType currentpixel = inIter.Get();</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //initialise the variables</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HessianFunctionType::TensorType&nbsp;&nbsp; hess_matrix;</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hess_matrix = m_HessianFunction-&gt;EvaluateAtIndex( currentindex );</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ++inIter;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }//while</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>}</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thank you,</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Regards,</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Kana</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;</span><o:p></o:p></p></div></div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;</span><o:p></o:p></p></div></div><div style='border:none;border-top:solid windowtext 3.0pt;padding:3.0pt 0cm 0cm 0cm;border-width:initial;border-color:initial;border-width:initial;border-color:initial'><div><div><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span class=apple-converted-space><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>&nbsp;</span></span><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Dawood Masslawi [mailto:davoud_zzz@yahoo.com]<span class=apple-converted-space>&nbsp;</span><br><b>Sent:</b><span class=apple-converted-space>&nbsp;</span>19 March 2011 14:48<br><b>To:</b><span class=apple-converted-space>&nbsp;</span>Arunachalam Kana<br><b>Cc:</b><span class=apple-converted-space>&nbsp;</span><a href="mailto:insight-users@itk.org">insight-users@itk.org</a><br><b>Subject:</b><span class=apple-converted-space>&nbsp;</span>RE: Memory management</span><o:p></o:p></p></div></div></div><div><div><p class=MsoNormal><span lang=EN-GB>&nbsp;</span><o:p></o:p></p></div></div><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0><tr><td valign=top style='padding:0cm 0cm 0cm 0cm'><div><div><p class=MsoNormal>Hi Kana,<o:p></o:p></p></div></div><div><div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div></div></div><div><div><div><p class=MsoNormal>Have you tried to build in release mode? It can make a big difference.<o:p></o:p></p></div></div></div><div><div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div></div></div><div><div><div><p class=MsoNormal>Good luck,<o:p></o:p></p></div></div></div><div><div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div></div></div><div><div><div><p class=MsoNormal>Dawood<o:p></o:p></p></div></div></div><div><div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div></div></div><div><div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div></div></div><div><div><div><p class=MsoNormal>&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&nbsp;<o:p></o:p></p></div></div></div><div><div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div></div></div><div><div><div><p class=MsoNormal>&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&nbsp;<o:p></o:p></p></div></div></div><div><div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div></div></div><div><pre>&gt;<i> Hi ITK Users,</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i> I need some advice on memory management and speed.</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i> My system details: 64 bit windowsXP system and 4Gb RAM.</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i> My goal: To obtain eigen vectors for 100Mb unsigned short image. Eigen</i><o:p></o:p></pre><pre>&gt;<i> vectors not for the whole image but for certain regions (approx occupies 40%</i><o:p></o:p></pre><pre>&gt;<i> of image).</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i> I have to do some preprocessing too.</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i> The pipeline is :</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i> Original image -&gt; discretegaussian -&gt; gradientmagnitude -&gt;</i><o:p></o:p></pre><pre>&gt;<i> HessianRecursiveGaussianImageFilter-&gt;symmetric eigenvalue analysis -&gt;</i><o:p></o:p></pre><pre>&gt;<i> finally 3 vector image</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i> For the above pipeline for a 100Mb image, i am running out of RAM.</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i> After reading itkmails, i decided to use streamfilter to stream part of the</i><o:p></o:p></pre><pre>&gt;<i> image so that the RAM usage is low. I only tested half way and the RAM was</i><o:p></o:p></pre><pre>&gt;<i> overloaded.</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i> I am using streamimagefilter to reduce the memory usage. After calculation</i><o:p></o:p></pre><pre>&gt;<i> of gradientmagnitude i have used 1.08Gb RAM. After this i need 1.2Gb RAM</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i> For hessianimageoutput, so by using streamfilter i thought i would be</i><o:p></o:p></pre><pre>&gt;<i> reaching 2.5Gm RAM but i reach approx 6Gb(virtual memory is used).</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i> 1.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Am i doing something wrong with the stream filter ? (code given</i><o:p></o:p></pre><pre>&gt;<i> below)</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i> 2.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I tried another option: As i do not need hessian for the whole</i><o:p></o:p></pre><pre>&gt;<i> image, I used discretehessianfunction for hessian calculation but it is 30</i><o:p></o:p></pre><pre>&gt;<i> times slower that the recursivehessian. Is discretegaussianimagefunction</i><o:p></o:p></pre><pre>&gt;<i> multithreaded?</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i> 3.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Is there any other way to achieve speed vs RAM compromised</i><o:p></o:p></pre><pre>&gt;<i> solution?</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i> 4.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The 100Mb data set is test data. The real data is 10Gb for which</i><o:p></o:p></pre><pre>&gt;<i> i will use 64 bit linux system (opensuse 11.2) . will the pipeline be</i><o:p></o:p></pre><pre>&gt;<i> executed in linux too?</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i> Below is my code and after application of filter show the RAM usage:</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; char *infilename = &quot;StreamTest.mhd&quot;;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; typedef itk::CovariantVector&lt;float,3&gt; VectorPixelType;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; typedef itk::Vector&lt; VectorPixelType, 3 &gt; EV_PixelType;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; //Image type</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; typedef itk::Image&lt;unsigned short, 3&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InputImageType;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; typedef itk::Image&lt;float, 3&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FloatImageType;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; typedef</i><o:p></o:p></pre><pre>&gt;<i> itk::Image&lt;EV_PixelType,3&gt;</i><o:p></o:p></pre><pre>&gt;<i> EVImageType;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i> **** RAM usage = 674Mb****</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; //reader initialisation and reading file</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; typedef itk::ImageFileReader&lt;InputImageType&gt;</i><o:p></o:p></pre><pre>&gt;<i> ReaderType;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; ReaderType::Pointer reader = ReaderType::New();</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; reader-&gt;SetFileName( infilename );</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; reader-&gt;Update();</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; InputImageType::Pointer inImage = reader-&gt;GetOutput();</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i> **** RAM usage = 783Mb****</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; typedef itk::DiscreteGaussianImageFilter&lt;InputImageType, FloatImageType&gt;</i><o:p></o:p></pre><pre>&gt;<i> RGIFType;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; RGIFType::Pointer gaussfilter = RGIFType::New();</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; gaussfilter-&gt;SetInput(inImage);</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; gaussfilter-&gt;SetVariance(4.0);</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; gaussfilter-&gt;SetMaximumError(0.01);</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; typedef itk::CastImageFilter&lt;FloatImageType,InputImageType&gt; CIFType;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; CIFType::Pointer castfilter = CIFType::New();</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; castfilter-&gt;SetInput(gaussfilter-&gt;GetOutput());</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; typedef itk::GradientMagnitudeImageFilter&lt;InputImageType,FloatImageType&gt;</i><o:p></o:p></pre><pre>&gt;<i> GMIFType;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; GMIFType::Pointer gmfilter = GMIFType::New();</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; gmfilter-&gt;SetInput(castfilter-&gt;GetOutput());</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; gmfilter-&gt;Update();</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; FloatImageType::Pointer gmImage = gmfilter-&gt;GetOutput();</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i> **** RAM usage = 1290Mb****</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i> &nbsp;&nbsp;gaussfilter-&gt;UnRegister();</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; castfilter-&gt;UnRegister();</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; **** RAM usage = 1080Mb****</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; typedef itk::HessianRecursiveGaussianImageFilter&lt;FloatImageType&gt;</i><o:p></o:p></pre><pre>&gt;<i> HessianRecursiveGaussianFilterType;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; typedef HessianRecursiveGaussianFilterType::OutputImageType</i><o:p></o:p></pre><pre>&gt;<i> HessianImageType;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; HessianRecursiveGaussianFilterType::Pointer hessianfilter =</i><o:p></o:p></pre><pre>&gt;<i> HessianRecursiveGaussianFilterType::New();</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; hessianfilter-&gt;SetInput(gmImage);</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; hessianfilter-&gt;SetSigma(1);</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; typedef itk::StreamingImageFilter&lt;HessianImageType,HessianImageType&gt;</i><o:p></o:p></pre><pre>&gt;<i> StreamerType;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; StreamerType::Pointer streamer = StreamerType::New();</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; streamer-&gt;SetInput( hessianfilter-&gt;GetOutput() );</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;&nbsp; streamer-&gt;SetNumberOfStreamDivisions( 20 );</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp; &nbsp;streamer-&gt;Update();</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i> **** RAM usage = 3600Mb**** after few seconds it came to **** RAM usage =</i><o:p></o:p></pre><pre>&gt;<i> 6120Mb****</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i> Thank you in advance.</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i> Regards,</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i> Kana Arunachalam Kannappan</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i> Research Associate</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i> FH OÖ Forschungs &amp; Entwicklungs GmbH</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i> Stelzhamer Strasse 23,</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i> 4600 Wels,</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i> Austria.</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i> Phone: +43 (0)7242 72811 -4420</i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i> <a href="http://www.itk.org/mailman/listinfo/insight-users">kana.arunachalam at fh-wels.at</a></i><o:p></o:p></pre><pre>&gt;<i>&nbsp;</i><o:p></o:p></pre><pre>&gt;<i> <a href="http://www.fh-ooe.at">www.fh-ooe.at</a>; <a href="http://www.3dct.at">www.3dct.at</a></i><o:p></o:p></pre></div></td></tr></table><div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Calibri","sans-serif"'>&nbsp;</span><o:p></o:p></p></div></div><div><p class=MsoNormal><span style='font-size:13.5pt;font-family:"Helvetica","sans-serif"'>&lt;ATT00001..txt&gt;</span><o:p></o:p></p></div></div></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><div><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif";color:black'>========================================================</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif";color:black'>Bradley Lowekamp<span class=apple-converted-space>&nbsp;&nbsp;</span></span><o:p></o:p></p></div><div><p class=MsoNormal><span class=apple-style-span><span style='font-size:9.0pt;font-family:"Arial","sans-serif";color:black'>Lockheed Martin&nbsp;</span></span><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif";color:black'>Contractor for</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif";color:black'>Office of High Performance Computing and Communications</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif";color:black'>National Library of Medicine<span class=apple-converted-space>&nbsp;</span></span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif";color:black'><a href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</a></span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif";color:black'><br><br><br></span><o:p></o:p></p></div></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div></div></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><div><p style='margin:0cm;margin-bottom:.0001pt'><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif";color:black'>========================================================<o:p></o:p></span></p><p style='margin:0cm;margin-bottom:.0001pt'><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif";color:black'>Bradley Lowekamp<span class=apple-converted-space>&nbsp;&nbsp;</span><o:p></o:p></span></p><p style='margin:0cm;margin-bottom:.0001pt'><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif";color:black'>Lockheed Martin Contractor for<o:p></o:p></span></p><p style='margin:0cm;margin-bottom:.0001pt'><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif";color:black'>Office of High Performance Computing and Communications<o:p></o:p></span></p><p style='margin:0cm;margin-bottom:.0001pt'><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif";color:black'>National Library of Medicine<span class=apple-converted-space>&nbsp;</span><o:p></o:p></span></p><p style='margin:0cm;margin-bottom:.0001pt'><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif";color:black'><a href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</a><o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></body></html>