[Insight-users] input error for ----geodesicActiveContour->SetAdvectionImage(m_GVFFilter->GetOutput())
Baoyun Li
baoyun_li123 at yahoo.com
Thu Mar 5 13:11:05 EST 2009
Dear All:
I am trying to use the output of GradientVectorflowImageFilter to set the AdvectionImage for for geodesidcAcitveContour level set filter as :
geodesicActiveContour->SetAdvectionImage(m_GVFFilter->GetOutput())
But I got the bleow errors. I have seen somebody caster the output of GradientVectorflowImageFilter, then feed into geodesicActiveContour->SetAdvectionImage.
Can somebody tell me how to set the input of geodesicActiveContour->SetAdvectionImage? My current input is vector image obtained from GradientVectorflowImageFilter. Seems ok, what is wrong?
I attatached the error messages and part of my code.
Thanks, and your help is highly appreciated.
Baoyun
*************************Error message
no matching function for call to 'itk::GeodesicActiveContourLevelSetImageFilter<itk::Image<float, 3u>, itk::Image<float, 3u>, float>::SetAdvectionImage(itk::SmartPointer<itk::Image<itk::CovariantVector<float, 3u>, 3u> >&)'
/home/gtao/tools/ITK/Source/Code/Algorithms/itkSegmentationLevelSetImageFilter.h:228: note: candidates are: void itk::SegmentationLevelSetImageFilter<TInputImage, TFeatureImage, TOutputPixelType>::SetAdvectionImage(typename itk::SegmentationLevelSetFunction<itk::Image<TOutputPixelType, itk::SegmentationLevelSetImageFilter<TInputImage,TFeatureImage,TOutputPixelType>::InputImageDimension>, TFeatureImage>::VectorImageType*) [with TInputImage = itk::Image<float, 3u>, TFeatureImage = itk::Image<floa
**************code
///I have defined Dim=3;
typedef itk::CovariantVector<float, Dim> myGradientType;
typedef itk::Image<myGradientType, Dim> myGradientImageType;
typedef itk::GradientVectorFlowImageFilter<myGradientImageType, myGradientImageType>
myGVFFilterType;
typedef itk::GradientImageFilter<InternalImageType, float,float>
myGFilterType;
typedef itk::GradientRecursiveGaussianImageFilter<
InternalImageType,
myGradientImageType
> myFilterType;
typedef itk::LaplacianImageFilter<InternalImageType, InternalImageType> myLaplacianFilterType;
typename myFilterType::Pointer filter = myFilterType::New();
typename myLaplacianFilterType::Pointer m_LFilter = myLaplacianFilterType::New();
typename myGVFFilterType::Pointer m_GVFFilter = myGVFFilterType::New();
//caster12 convert input int type to float type
filter->SetInput( caster12->GetOutput() );
filter->SetSigma( 1.0);
filter->Update();
m_GVFFilter->SetInput(filter->GetOutput());
m_GVFFilter->SetNoiseLevel(500);
m_GVFFilter->SetTimeStep(0.001);
m_GVFFilter->SetIterationNum(2);
m_GVFFilter->Update();
geodesicActiveContour->SetAutoGenerateSpeedAdvection(false);
typename myGradientImageType::Pointer m_GVFField;
m_GVFField = m_GVFFilter->GetOutput();
****************error happend
geodesicActiveContour->SetAdvectionImage(m_GVFField);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090305/d37e3daf/attachment.htm>
More information about the Insight-users
mailing list