[Insight-developers] itkGradientImageFilter class & misc.
Damion Shelton
dmsst59+@pitt.edu
Mon, 21 May 2001 10:03:10 -0400
Luis:
These errors are with Visual C++. In regards to your first question, I was
using scalar traits; the typedef line (not in the code I attached) was:
typedef itk::PhysicalImage< itk::Scalar<double>, 3 > TImageType;
The output image type was:
typedef itk::PhysicalImage<double,3> TOutputType;
Changing the output image to scalar traits,
typedef itk::PhysicalImage< itk::Scalar<double>, 3 > TOutputType;
results in one additional error,
'type cast' : cannot convert from 'double' to 'class
itk::Scalar<double>'
In both cases the derivative filter is defined as:
typedef itk::FirstDerivativeRecursiveGaussianImageFilter
< TImageType, TOutputType, double > TDerivType;
Anyways, I'll take a look at your new example. Thanks,
-Damion-
----- Original Message -----
From: "Luis Ibanez" <ibanez@choroid.cs.unc.edu>
To: "Damion Shelton" <dmsst59@pitt.edu>
Cc: "insight-Developers" <insight-developers@public.kitware.com>
Sent: Friday, May 18, 2001 3:37 PM
Subject: Re: [Insight-developers] itkGradientImageFilter class & misc.
>
> 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-
>
>
> _______________________________________________
> Insight-developers mailing list
> Insight-developers@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-developers
>