[Insight-developers] Interpolation of complex images

Emmanuel Christophe emmanuel.christophe at gmail.com
Thu Mar 18 06:10:10 EDT 2010


Hi all,

Very little prevent the use of the spline interpolation with complex
images in ITK. For example, the code below does not manage to compile
:

  const unsigned int Dimension=2;
  typedef std::complex<double> PixelType;
  typedef itk::Image<PixelType,Dimension> ImageType;
  typedef itk::BSplineDecompositionImageFilter<ImageType, ImageType> FilterType;
  FilterType::Pointer filter = FilterType::New();

The assumption taken in the BSplineDecompositionImageFilter is that
the pixel type should be convertible to double.

Using the patch attached, the program successfully compile and
interpolation of complex image is possible.

This patch removes the assumption that the pixel type should be
convertible to double and separate the template for the type of the
pixel and the type of the spline coefficients.

The experimental is all green, should I commit the patch?

Should I add the code above in an existing test or create a new test for it?

Emmanuel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patchSplines.patch
Type: text/x-patch
Size: 3296 bytes
Desc: not available
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20100318/6ba2fc22/attachment.bin>


More information about the Insight-developers mailing list