[Insight-users] Doubt in derivative calculation using itkDerivativeImageFilter

Arunachalam Kana Kana.Arunachalam at fh-wels.at
Fri Oct 15 09:51:47 EDT 2010


Dear ITK Users,

I have a small doubt while I compare the itkDerivativeImageFilter result with manually calculated derivative. The code below for itkDerivativeImageFilter:
typedef itk::DerivativeImageFilter<CastImageType,CastImageType> DerivativeFilterType;

//create First derivative in X direction
DerivativeFilterType::Pointer DXfilter = DerivativeFilterType::New();
DXfilter->SetInput(inputimage);
DXfilter->SetDirection(0);
DXfilter->SetOrder(1);
DXfilter->Update();

The following are the grayvalue of indics:
Gray value at index [9,31,11] = 20850
Gray value at index [10,31,11] = 22923
Gray value at index [11,31,11] = 22923

Manual calculation of DX at index [10,31,11]  = 22923 – 20850 = 2073
The filter calculation of DX at index [10,31,11]  = 518.25

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
difference of the values at ( j+1,k) and ( j−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 ?

Thank you,

Regards,
Kana Arunachalam Kannappan
Research Associate
FH OÖ Forschungs & Entwicklungs GmbH
Stelzhamer Strasse 23,
4600 Wels,
Austria.
Phone: +43 (0)7242 72811 -4420
kana.arunachalam at fh-wels.at
www.fh-ooe.at; www.3dct.at

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20101015/e88bdd11/attachment.htm>


More information about the Insight-users mailing list