[Insight-developers] itkGradientImageFilter class & misc.

Luis Ibanez ibanez@choroid.cs.unc.edu
Fri, 18 May 2001 15:37:55 -0400 (EDT)


Damion,

The error message is comming from a line where
the value of the pixel is accessed from the iterator

it.Get();

it looks like a conflict with the Scalar traits,
but from your code it wasn't clear if the itkScalar
is used or not for the image declaration.



I just created an new Test file:

       itkRecursiveGaussianImageFiltersTest.cxx

it is in     Testing/Code/BasicFilters

This one is compiling and running.
Maybe it could be useful to start from it.

BTW, On which platform are you getting these error messages ?


Luis


----------------------------------------------


On Sat, 19 May 2001, Damion Shelton wrote:

> Luis, I just tried:
>
>   // First derivative filter test
>
>   // The type of the output image
>   typedef itk::PhysicalImage<double,3> TOutputType;
>
>   // The following line is for reference purposes
>   // typedef itk::PhysicalImage< itk::Scalar<double>, 3 > TImageType;
>
>   // Create the derivative filter
>   typedef itk::FirstDerivativeRecursiveGaussianImageFilter
>     < TImageType, TOutputType, double > TDerivType;
>
>   TDerivType::Pointer dfilter = TDerivType::New();
>
>   // Set filter parameters
>   dfilter->SetInput(outputImage);
>   dfilter->SetDirection(0);
>   dfilter->SetSigma(1.0);
>
>   // Execute the filter
>   dfilter->Update();
>   TOutputType::Pointer outputImage2 = dfilter->GetOutput();
>
> Unfortuntaely, this doesn't work either. The compiler produces the error:
>
> e:\damion\insight\code\basicfilters\itkrecursiveseparableimagefilter.txx(294
> ) : error C2593: 'operator =' is ambiguous
>         c:\program files\microsoft visual studio\vc98\include\xstring(583) :
> while compiling class-template member function 'void __thiscall
> itk::RecursiveSeparableImageFilter<class itk::PhysicalImage<class
> itk::Scalar<double>,3,class itk::DefaultIm
> ageTraits<class itk::Scalar<double>,3,class
> itk::ValarrayImageContainer<unsigned long,class itk::Scalar<double> > >
> >,class itk::PhysicalImage<double,3,class
> itk::DefaultImageTraits<double,3,class itk::ValarrayImageContainer<unsigned
> long,double> >
> >,double>::GenerateData(void)'
>
> This seems to be an internal problem in
> itkrecursiveseparableimagefilter.txx, relating to the way types are handled.
> Any thoughts?
>
> -Damion-