1 #ifndef __clitkVectorBSplineResampleImageFunction_h
2 #define __clitkVectorBSplineResampleImageFunction_h
3 #include "clitkVectorBSplineInterpolateImageFunction.h"
7 /** \class VectorBSplineResampleImageFunction
8 * \brief Resample image intensity from a VectorBSpline coefficient image.
10 * This class resample the image intensity at a non-integer position
11 * from the input VectorBSpline coefficient image.
13 * Spline order may be from 0 to 5.
15 * In ITK, BSpline coefficient can be generated using a
16 * BSplineDecompositionImageFilter. Using this image function in
17 * conjunction with ResampleImageFunction allows the reconstruction
18 * of the original image at different resolution and size.
20 * \sa VectorBSplineInterpolateImageFunction
21 * \sa VectorBSplineDecompositionImageFilter
22 * \sa VectorResampleImageFilter
24 * \ingroup ImageFunctions
26 template <class TImageType, class TCoordRep = float>
27 class ITK_EXPORT VectorBSplineResampleImageFunction :
28 public VectorBSplineInterpolateImageFunction<
29 TImageType,TCoordRep,ITK_TYPENAME TImageType::PixelType::ValueType >
32 /** Standard class typedefs. */
33 typedef VectorBSplineResampleImageFunction Self;
34 typedef VectorBSplineInterpolateImageFunction<TImageType,TCoordRep, ITK_TYPENAME TImageType::PixelType::ValueType > Superclass;
35 typedef itk::SmartPointer<Self> Pointer;
36 typedef itk::SmartPointer<const Self> ConstPointer;
38 /** Run-time type information (and related methods). */
39 itkTypeMacro(VectorBSplineResampleImageFunction,
40 VectorBSplineInterpolateImageFunction);
42 /** New macro for creation of through a Smart Pointer */
45 /** Set the input image representing the BSplineCoefficients */
46 virtual void SetInputImage(const TImageType * inputData)
48 // bypass my superclass
49 this->itk::VectorInterpolateImageFunction<TImageType,TCoordRep>::SetInputImage(inputData);
50 this->m_Coefficients = inputData;
51 if ( this->m_Coefficients.IsNotNull() )
53 this->m_DataLength = this->m_Coefficients->GetBufferedRegion().GetSize();
58 VectorBSplineResampleImageFunction() {};
59 virtual ~VectorBSplineResampleImageFunction() {};
62 VectorBSplineResampleImageFunction(const Self&);//purposely not implemented