<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=us-ascii"><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;}
/* 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";}
span.apple-style-span
        {mso-style-name:apple-style-span;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle21
        {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> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>itkHessianImagefilter: the filter is 2 times faster than HessianRecurrsivegaussianimagefilter, when i run in release mode. Regarding memory: I did a small change, instead of outputpixel type realtype i changed to floattype for my<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'>local use. By doing this the RAM use is reduced by half. The final output result was similar to hessianrecurrsivegaussianimagefilter, so i am happy. Thank you for your efforts to write the new 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'><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'>Regarding streaming: i tried stream but it did not work, maybe i tried something wrong. I will try once again.<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'>Thank you for the tip.<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> </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><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 15:45<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> </o:p></p><p class=MsoNormal>Kana,<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>The RecursiveGaussianImageFilter is multithreaded, but not streamable. The linked HessianImageFilter is both multithreaded and streamable. It's not clear to me how you were going to use the image functions. If you were planning on computing the hessian on much of the image then the image function would be horrible inefficient. <o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Going back to your original e-mail you said your pipeline was as follows:<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Original image -> discretegaussian -> gradientmagnitude -> HessianRecursiveGaussianImageFilter->symmetric eigenvalue analysis -> finally 3 vector image<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>If you add the StreamingImageFilter to the end of the pipeline, I would expect the pipeline to stream and be relatively memory efficient.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </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> </o:p></p><div><div><p class=MsoNormal>On Mar 29, 2011, at 5:28 AM, Arunachalam Kana wrote:<o:p></o:p></p></div><p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p><div><div><p class=MsoNormal><span 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 style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </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 your reply. As recommended by you, I will use the itkHessianImageFilter to calculate the hessian. I see the filter is multithreaded which</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'>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</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'>Will drastically increase the use of RAM compared to the itkDiscreteHessianGaussianImagefunction.h. Am i right?</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'> </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'>However, I will have to test for the speed and for the memory usage.</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'> </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 filter.</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'> </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"'> </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> </span><br><b>Sent:</b><span class=apple-converted-space> </span>29 March 2011 06:42<br><b>To:</b><span class=apple-converted-space> </span>Arunachalam Kana<br><b>Cc:</b><span class=apple-converted-space> </span><a href="mailto:insight-users@itk.org">insight-users@itk.org</a><br><b>Subject:</b><span class=apple-converted-space> </span>Re: [Insight-users] Memory management</span><o:p></o:p></p></div></div></div><div><p class=MsoNormal> <o:p></o:p></p></div><div><p class=MsoNormal>Hello Kana,<o:p></o:p></p></div><div><div><p class=MsoNormal> <o:p></o:p></p></div></div><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><div><div><p class=MsoNormal> <o:p></o:p></p></div></div><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><div><div><p class=MsoNormal> <o:p></o:p></p></div></div><div><div><p class=MsoNormal>The itkHessianDiscreteGaussianimageFilter is not yet implemented, and I still need to migrate more testing over to the github module. <o:p></o:p></p></div></div><div><div><p class=MsoNormal> <o:p></o:p></p></div></div><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. <o:p></o:p></p></div></div><div><div><p class=MsoNormal> <o:p></o:p></p></div></div><div><div><p class=MsoNormal>Good luck,<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> <o:p></o:p></p></div></div><div><div><div><p class=MsoNormal>On Mar 21, 2011, at 12:20 PM, Arunachalam Kana wrote:<o:p></o:p></p></div></div><div><p class=MsoNormal style='margin-bottom:12.0pt'><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 Brad,</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 reply.</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'>In brief : My goal is to calculate the eigen vectors using eigenanalysisfunction.</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'>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><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><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </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 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><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'> </span><o:p></o:p></p></div></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"'> </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> </span><br><b>Sent:</b><span class=apple-converted-space> </span>21 March 2011 17:03<br><b>To:</b><span class=apple-converted-space> </span>Arunachalam Kana<br><b>Cc:</b><span class=apple-converted-space> </span><a href="mailto:insight-users@itk.org">insight-users@itk.org</a><br><b>Subject:</b><span class=apple-converted-space> </span>Re: [Insight-users] Memory management</span><o:p></o:p></p></div></div></div></div><div><div><p class=MsoNormal> <o:p></o:p></p></div></div><div><div><p class=MsoNormal>Hello Kana,<o:p></o:p></p></div></div><div><div><div><p class=MsoNormal> <o:p></o:p></p></div></div></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><div><div><p class=MsoNormal> <o:p></o:p></p></div></div></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><div><div><p class=MsoNormal> <o:p></o:p></p></div></div></div><div><div><div><p class=MsoNormal>Brad<o:p></o:p></p></div></div></div><div><div><div><p class=MsoNormal> <o:p></o:p></p></div></div></div><div><div><div><p class=MsoNormal> <o:p></o:p></p></div></div></div><div><div><div><p class=MsoNormal> <o:p></o:p></p></div></div><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><div><div><p class=MsoNormal style='margin-bottom:12.0pt'><br><br><br><o:p></o:p></p></div></div><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><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><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p></div></div></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><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><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p></div></div></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><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><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><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><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><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><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><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><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p></div></div></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><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><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p></div></div></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><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><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><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p></div></div></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><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'>template<class TInputImageType, class TOutputImageType></span><o:p></o:p></p></div></div></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<TInputImageType, TOutputImageType></span><o:p></o:p></p></div></div></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& outputRegionForThread, int threadId)</span><o:p></o:p></p></div></div></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><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'> typename OutputImageType::Pointer output = this->GetOutput();</span><o:p></o:p></p></div></div></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'> typename InputImageType::ConstPointer input = this->GetInput();</span><o:p></o:p></p></div></div></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><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'> //set hessian function</span><o:p></o:p></p></div></div></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><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'> m_HessianFunction->SetInputImage(m_GradientMagnitudeImage );</span><o:p></o:p></p></div></div></div><div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'> m_HessianFunction->SetSigma( 1 );</span><o:p></o:p></p></div></div></div><div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'> m_HessianFunction->SetMaximumError( 0.01 );</span><o:p></o:p></p></div></div></div><div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'> m_HessianFunction->SetMaximumKernelWidth( 32 );</span><o:p></o:p></p></div></div></div><div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'> m_HessianFunction->SetNormalizeAcrossScale( 1 );</span><o:p></o:p></p></div></div></div><div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'> m_HessianFunction->SetUseImageSpacing( false );</span><o:p></o:p></p></div></div></div><div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'> m_HessianFunction->Initialize( );</span><o:p></o:p></p></div></div></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><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'> //initiate iamge iterators</span><o:p></o:p></p></div></div></div><div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'> InputImageRegionIteratorType inIter(m_InputImage, outputRegionForThread);</span><o:p></o:p></p></div></div></div><div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'> OutputImageRegionIteratorType outIter(m_OutputImage, outputRegionForThread);</span><o:p></o:p></p></div></div></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><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'> inIter.GoToBegin();</span><o:p></o:p></p></div></div></div><div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'> while ( !inIter.IsAtEnd() )</span><o:p></o:p></p></div></div></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><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'> InputIndexType currentindex =inIter.GetIndex();</span><o:p></o:p></p></div></div></div><div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'> InputPixelType currentpixel = inIter.Get();</span><o:p></o:p></p></div></div></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><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'> //initialise the variables</span><o:p></o:p></p></div></div></div><div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'> HessianFunctionType::TensorType hess_matrix;</span><o:p></o:p></p></div></div></div><div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'> hess_matrix = m_HessianFunction->EvaluateAtIndex( currentindex );</span><o:p></o:p></p></div></div></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><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'> ++inIter; </span><o:p></o:p></p></div></div></div><div><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:black'> }//while</span><o:p></o:p></p></div></div></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><div><div><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p></div></div></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><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><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><div><div><p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p></div></div></div></div></div></div></div></div></div></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> </span><o:p></o:p></span></p><p style='margin:0cm;margin-bottom:.0001pt'><span class=apple-style-span><span style='font-size:9.0pt;font-family:"Arial","sans-serif";color:black'>Lockheed Martin </span></span><span style='font-size:9.0pt;font-family:"Helvetica","sans-serif";color:black'>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> </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><p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p></div><p class=MsoNormal><o:p> </o:p></p></div></div></body></html>