[Insight-users] Complex data interpolation and resampling

Yannick Allard Yannick.Allard at USherbrooke.ca
Mon Jan 24 17:31:31 EST 2005


Hi Everyone,

Is there a simple way to interpolate and resample a image with a complex pixel
type (real, imag)? I've succeeded in building a complex image but when I
instantiate the interpolator and resampler I have the following error at
compilation.

//declaration
typedef std::complex<float> PixelType;
typedef   itk::Image< PixelType, 2 >       ImageType;
typedef ImageType::Pointer            ImagePointer ;
typedef ImageType::RegionType         RegionType;
typedef itk::BSplineInterpolateImageFunction< ImageType, double >
InterpolatorType;

//Compilation error
Resampling_c.C: At global scope:
Resampling_c.C: In instantiation of
`itk::InterpolateImageFunction<itk::Image<std::complex<float>, 2>, double>':
Resampling_c.C:1232:   instantiated from
`itk::BSplineInterpolateImageFunction<itk::Image<std::complex<float>, 2>,
double, double>'
Resampling_c.C:1232:   instantiated from here
Resampling_c.C:1232: error: no type named `RealType' in `class
   itk::NumericTraits<std::complex<float> >'


Thank you

Yannick




More information about the Insight-users mailing list