<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV>Dear All:</DIV>
<DIV> </DIV>
<DIV>I am trying to use the output of GradientVectorflowImageFilter to set the AdvectionImage for for geodesidcAcitveContour level set filter as :</DIV>
<DIV> </DIV>
<DIV>geodesicActiveContour->SetAdvectionImage(m_GVFFilter->GetOutput()) </DIV>
<DIV> </DIV>
<DIV>But I got the bleow errors. I have seen somebody caster the output of GradientVectorflowImageFilter, then feed into geodesicActiveContour->SetAdvectionImage.</DIV>
<DIV> </DIV>
<DIV>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?</DIV>
<DIV> </DIV>
<DIV>I attatached the error messages and part of my code.</DIV>
<DIV> </DIV>
<DIV>Thanks, and your help is highly appreciated.</DIV>
<DIV> </DIV>
<DIV>Baoyun</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>*************************Error message</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>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> >&)'<BR>/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<BR></DIV>
<DIV> </DIV>
<DIV>**************code</DIV>
<DIV>
<DIV> ///I have defined Dim=3;</DIV></DIV>
<DIV> typedef itk::CovariantVector<float, Dim> myGradientType;<BR> typedef itk::Image<myGradientType, Dim> myGradientImageType;</DIV>
<DIV> typedef itk::GradientVectorFlowImageFilter<myGradientImageType, myGradientImageType><BR> myGVFFilterType;</DIV>
<DIV> typedef itk::GradientImageFilter<InternalImageType, float,float><BR> myGFilterType;</DIV>
<DIV><BR> typedef itk::GradientRecursiveGaussianImageFilter<<BR> InternalImageType,<BR> myGradientImageType<BR> > myFilterType;<BR>
typedef itk::LaplacianImageFilter<InternalImageType, InternalImageType> myLaplacianFilterType;<BR> typename myFilterType::Pointer filter = myFilterType::New();<BR> typename myLaplacianFilterType::Pointer m_LFilter = myLaplacianFilterType::New();<BR> typename myGVFFilterType::Pointer m_GVFFilter = myGVFFilterType::New();</DIV>
<DIV> </DIV>
<DIV> //caster12 convert input int type to float type</DIV>
<DIV> filter->SetInput( caster12->GetOutput() ); <BR> filter->SetSigma( 1.0);<BR> filter->Update();<BR> m_GVFFilter->SetInput(filter->GetOutput());<BR> m_GVFFilter->SetNoiseLevel(500);<BR> m_GVFFilter->SetTimeStep(0.001);<BR> m_GVFFilter->SetIterationNum(2);<BR> m_GVFFilter->Update();<BR> geodesicActiveContour->SetAutoGenerateSpeedAdvection(false);<BR> typename myGradientImageType::Pointer m_GVFField; <BR> m_GVFField = m_GVFFilter->GetOutput();</DIV>
<DIV>****************error happend<BR> geodesicActiveContour->SetAdvectionImage(m_GVFField); </DIV></div><br>
</body></html>