[Insight-users] How to save the result of itkHessianRecursiveGaussianImageFilter
庄凌峰
jxdw_zlf at yahoo.com.cn
Sun Oct 18 22:14:21 EDT 2009
Hello
I am new to itk.
I want to employ HessianRecursiveGaussianImageFilter in my program.
In order to see its result,I modified DicomSeriesReadImageWrite2.cxx. Wanna to result its output to a dicom file.
But it failed with
itk::ExceptionObject (013FDEAC)
Location: "void __thiscall itk::GDCMImageIO::Write(const void *)"
File: ..\..\..\Insight\Code\IO\itkGDCMImageIO.cxx
Line: 1659
Description: itk::ERROR: GDCMImageIO(02E72FE0): DICOM does not support RGBPixels with components != 3
The changed made to DicomSeriesReadImageWrite2.cxx is listed below.
typedef itk::HessianRecursiveGaussianImageFilter< ImageType > myFilterType;
typedef myFilterType::OutputImageType myHessianImageType;
// Create a Filter
myFilterType::Pointer filter = myFilterType::New();
// Connect the input images
filter->SetInput( reader->GetOutput() );
// Select the value of Sigma
filter->SetSigma( 2.5 );
// Execute the filter
filter->Update();
writer->SetInput( filter->GetOutput() );
Thanks!
zlf
___________________________________________________________
好玩贺卡等你发,邮箱贺卡全新上线!
http://card.mail.cn.yahoo.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20091019/eb37af8c/attachment.htm>
More information about the Insight-users
mailing list