[Insight-users] second derivative calculation using itkderivativeimagefilter
Arunachalam Kana
Kana.Arunachalam at fh-wels.at
Wed Oct 20 05:24:32 EDT 2010
Hi Itk Users,
I am calculating the second derivative for hessian matrix on my own using itkdetivativeimagefilter. Please tell me whether it is right.
Code given below
typedef itk::DerivativeImageFilter<FloatImageType,FloatImageType> DerivativeImageFilterType;
//create First Cast in X direction
DerivativeImageFilterType::Pointer DXfilter = DerivativeImageFilterType::New();
DXfilter->SetInput(inImage);
DXfilter->SetDirection(0);
DXfilter->SetOrder(1);
DXfilter->Update();
//create second Cast in XX direction
DerivativeImageFilterType::Pointer DXXfilter = DerivativeImageFilterType::New();
DXXfilter->SetInput(DXfilter->GetOutput());
DXXfilter->SetDirection(0);
DXXfilter->SetOrder(1);
DXXfilter->Update();
//create second Cast in XY direction
DerivativeImageFilterType::Pointer DXYfilter = DerivativeImageFilterType::New();
DXYfilter->SetInput(DXfilter->GetOutput());
DXYfilter->SetDirection(1);
DXYfilter->SetOrder(1);
DXYfilter->Update();
//create second Cast in XZ direction
DerivativeImageFilterType::Pointer DXZfilter = DerivativeImageFilterType::New();
DXZfilter->SetInput(DXfilter->GetOutput());
DXZfilter->SetDirection(2);
DXZfilter->SetOrder(1);
DXZfilter->Update();
//create first Cast in Y direction
DerivativeImageFilterType::Pointer DYfilter = DerivativeImageFilterType::New();
DYfilter->SetInput(inImage);
DYfilter->SetDirection(1);
DYfilter->SetOrder(1);
DYfilter->Update();
//create second Cast in YY direction
DerivativeImageFilterType::Pointer DYYfilter = DerivativeImageFilterType::New();
DYYfilter->SetInput(DYfilter->GetOutput());
DYYfilter->SetDirection(1);
DYYfilter->SetOrder(1);
DYYfilter->Update();
//create second Cast in YZ direction
DerivativeImageFilterType::Pointer DYZfilter = DerivativeImageFilterType::New();
DYZfilter->SetInput(DYfilter->GetOutput());
DYZfilter->SetDirection(2);
DYZfilter->SetOrder(1);
DYZfilter->Update();
//create first Cast in Z direction
DerivativeImageFilterType::Pointer DZfilter = DerivativeImageFilterType::New();
DZfilter->SetInput(inImage);
DZfilter->SetDirection(2);
DZfilter->SetOrder(1);
DZfilter->Update();
//create second Cast in ZZ direction
DerivativeImageFilterType::Pointer DZZfilter = DerivativeImageFilterType::New();
DZZfilter->SetInput(DZfilter->GetOutput());
DZZfilter->SetDirection(2);
DZZfilter->SetOrder(1);
DZZfilter->Update();
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/20101020/95b4440e/attachment.htm>
More information about the Insight-users
mailing list