<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)">
<style>
<!--
 /* Font Definitions */
 @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;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        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;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
.MsoPapDefault
        {mso-style-type:export-only;
        mso-margin-top-alt:auto;
        mso-margin-bottom-alt:auto;}
@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>

<div class=WordSection1>

<p class=MsoNormal><span lang=EN-GB>Hi Itk Users,<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB>I am calculating the second derivative for
hessian matrix on my own using itkdetivativeimagefilter.  Please tell me
whether it is right.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB>Code given below<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      <span
style='color:blue'>typedef</span>
itk::DerivativeImageFilter&lt;FloatImageType,FloatImageType&gt;
DerivativeImageFilterType;<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      <span
style='color:green'>//create First Cast in X direction<o:p></o:p></span></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      </span><span
style='font-size:10.0pt;font-family:"Courier New"'>DerivativeImageFilterType::Pointer
DXfilter = DerivativeImageFilterType::New();<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
style='font-size:10.0pt;font-family:"Courier New"'>      DXfilter-&gt;SetInput(inImage);<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
style='font-size:10.0pt;font-family:"Courier New"'>      DXfilter-&gt;SetDirection(0);<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
style='font-size:10.0pt;font-family:"Courier New"'>      DXfilter-&gt;SetOrder(1);<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
style='font-size:10.0pt;font-family:"Courier New"'>      DXfilter-&gt;Update();<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
style='font-size:10.0pt;font-family:"Courier New"'>      <span
style='color:green'>//create second Cast in XX direction<o:p></o:p></span></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
style='font-size:10.0pt;font-family:"Courier New"'>      DerivativeImageFilterType::Pointer
DXXfilter = DerivativeImageFilterType::New();<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
style='font-size:10.0pt;font-family:"Courier New"'>      DXXfilter-&gt;SetInput(DXfilter-&gt;GetOutput());<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
style='font-size:10.0pt;font-family:"Courier New"'>      DXXfilter-&gt;SetDirection(0);<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
style='font-size:10.0pt;font-family:"Courier New"'>      DXXfilter-&gt;SetOrder(1);<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
style='font-size:10.0pt;font-family:"Courier New"'>      DXXfilter-&gt;Update();<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
style='font-size:10.0pt;font-family:"Courier New"'>      </span><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New";color:green'>//create
second Cast in XY direction<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      DerivativeImageFilterType::Pointer
DXYfilter = DerivativeImageFilterType::New();<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      DXYfilter-&gt;SetInput(DXfilter-&gt;GetOutput());<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      DXYfilter-&gt;SetDirection(1);<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      DXYfilter-&gt;SetOrder(1);<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      DXYfilter-&gt;Update();<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      <span
style='color:green'>//create second Cast in XZ direction<o:p></o:p></span></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      DerivativeImageFilterType::Pointer
DXZfilter = DerivativeImageFilterType::New();<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      DXZfilter-&gt;SetInput(DXfilter-&gt;GetOutput());<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      DXZfilter-&gt;SetDirection(2);<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      DXZfilter-&gt;SetOrder(1);<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      DXZfilter-&gt;Update();<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      <span
style='color:green'>//create first Cast in Y direction<o:p></o:p></span></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      DerivativeImageFilterType::Pointer
DYfilter = DerivativeImageFilterType::New();<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      DYfilter-&gt;SetInput(inImage);<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      DYfilter-&gt;SetDirection(1);<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      DYfilter-&gt;SetOrder(1);<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      DYfilter-&gt;Update();<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      <span
style='color:green'>//create second Cast in YY direction<o:p></o:p></span></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      DerivativeImageFilterType::Pointer
DYYfilter = DerivativeImageFilterType::New();<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      DYYfilter-&gt;SetInput(DYfilter-&gt;GetOutput());<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      DYYfilter-&gt;SetDirection(1);<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      DYYfilter-&gt;SetOrder(1);<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      DYYfilter-&gt;Update();<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      <span
style='color:green'>//create second Cast in YZ direction<o:p></o:p></span></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      DerivativeImageFilterType::Pointer
DYZfilter = DerivativeImageFilterType::New();<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      DYZfilter-&gt;SetInput(DYfilter-&gt;GetOutput());<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      DYZfilter-&gt;SetDirection(2);<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      DYZfilter-&gt;SetOrder(1);<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      DYZfilter-&gt;Update();<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      <span
style='color:green'>//create first Cast in Z direction<o:p></o:p></span></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      DerivativeImageFilterType::Pointer
DZfilter = DerivativeImageFilterType::New();<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      DZfilter-&gt;SetInput(inImage);<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      DZfilter-&gt;SetDirection(2);<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      DZfilter-&gt;SetOrder(1);<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      DZfilter-&gt;Update();<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      <span
style='color:green'>//create second Cast in ZZ direction<o:p></o:p></span></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      DerivativeImageFilterType::Pointer
DZZfilter = DerivativeImageFilterType::New();<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>      </span><span
style='font-size:10.0pt;font-family:"Courier New"'>DZZfilter-&gt;SetInput(DZfilter-&gt;GetOutput());<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
style='font-size:10.0pt;font-family:"Courier New"'>      DZZfilter-&gt;SetDirection(2);<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
style='font-size:10.0pt;font-family:"Courier New"'>      DZZfilter-&gt;SetOrder(1);<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt;text-autospace:none'><span
style='font-size:10.0pt;font-family:"Courier New"'>      </span><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>DZZfilter-&gt;Update();<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB>Thank you,<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB>Regards,<o:p></o:p></span></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt'>Kana Arunachalam
Kannappan<o:p></o:p></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt'>Research Associate<o:p></o:p></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt'>FH OÖ Forschungs
&amp; Entwicklungs GmbH<o:p></o:p></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt'>Stelzhamer Strasse
23,<o:p></o:p></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt'>4600 Wels,<o:p></o:p></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt'>Austria.<o:p></o:p></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt'>Phone: +43 (0)7242
72811 -4420<o:p></o:p></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt'>kana.arunachalam@fh-wels.at<o:p></o:p></p>

<p class=MsoNormal style='margin:0cm;margin-bottom:.0001pt'>www.fh-ooe.at;
www.3dct.at<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</body>

</html>