<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<FloatImageType,FloatImageType>
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> </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->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->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->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->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> </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->SetInput(DXfilter->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->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->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->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> </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->SetInput(DXfilter->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->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->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->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> </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->SetInput(DXfilter->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->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->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->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> </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->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->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->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->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> </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->SetInput(DYfilter->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->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->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->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> </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->SetInput(DYfilter->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->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->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->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> </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->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->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->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->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> </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->SetInput(DZfilter->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->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->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->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
& 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> </o:p></p>
</div>
</body>
</html>