<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=Generator content="Microsoft Word 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
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@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>Dear ITK Users,<o:p></o:p></p>

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

<p class=MsoNormal><span lang=EN-GB>I have a small doubt while I compare the itkDerivativeImageFilter
result with manually calculated derivative. The code below for
itkDerivativeImageFilter:<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New";color:blue'>typedef</span><span
lang=EN-GB style='font-size:10.0pt;font-family:"Courier New"'>
itk::DerivativeImageFilter&lt;CastImageType,CastImageType&gt;
DerivativeFilterType;<o:p></o:p></span></p>

<p class=MsoNormal style='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='text-autospace:none'><span lang=EN-GB
style='font-size:10.0pt;font-family:"Courier New";color:green'>//create First
derivative in X direction<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>DerivativeFilterType::Pointer DXfilter =
DerivativeFilterType::New();<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New"'>DXfilter-&gt;SetInput(inputimage);<o:p></o:p></span></p>

<p class=MsoNormal style='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='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='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><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-GB>The following are the grayvalue of indics:<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB>Gray value at index [9,31,11] = 20850<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB>Gray value at index [10,31,11] = 22923<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB>Gray value at index [11,31,11] = 22923<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-GB>Manual calculation of DX at index [10,31,11]
 = 22923 – 20850 = 2073<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB>The filter calculation of DX at index [10,31,11]
 = 518.25 <o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-GB>I have a doubt
in how the filter calculates the derivative. When I read the manual it said  “A
derivative at pixel index i = ( j,k), for example, is taken as a weighted<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB>difference of the values at ( j+1,k) and ( j</span><span
lang=EN-US>−</span><span lang=EN-GB>1,k).” . I would like to know how is the
weighted difference of the values is calculated and is it ok to calculated the
weighted difference ?<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-GB><o:p>&nbsp;</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><o:p>&nbsp;</o:p></span></p>

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

<p class=MsoNormal><span lang=EN-GB>Kana Arunachalam Kannappan<o:p></o:p></span></p>

<p class=MsoNormal>Research Associate<o:p></o:p></p>

<p class=MsoNormal>FH OÖ Forschungs &amp; Entwicklungs GmbH<o:p></o:p></p>

<p class=MsoNormal>Stelzhamer Strasse 23,<o:p></o:p></p>

<p class=MsoNormal>4600 Wels,<o:p></o:p></p>

<p class=MsoNormal>Austria.<o:p></o:p></p>

<p class=MsoNormal>Phone: +43 (0)7242 72811 -4420<o:p></o:p></p>

<p class=MsoNormal>kana.arunachalam@fh-wels.at<o:p></o:p></p>

<p class=MsoNormal>www.fh-ooe.at; www.3dct.at<o:p></o:p></p>

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

</div>

</body>

</html>