]> Creatis software - clitk.git/blob - itk/clitkVectorBSplineResampleImageFunction.h
removed headers
[clitk.git] / itk / clitkVectorBSplineResampleImageFunction.h
1 #ifndef __clitkVectorBSplineResampleImageFunction_h
2 #define __clitkVectorBSplineResampleImageFunction_h
3 #include "clitkVectorBSplineInterpolateImageFunction.h"
4
5 namespace clitk
6 {
7 /** \class VectorBSplineResampleImageFunction
8  * \brief Resample image intensity from a VectorBSpline coefficient image.
9  *
10  * This class resample the image intensity at a non-integer position
11  * from the input VectorBSpline coefficient image.
12  * 
13  * Spline order may be from 0 to 5.
14  *
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.
19  *
20  * \sa VectorBSplineInterpolateImageFunction
21  * \sa VectorBSplineDecompositionImageFilter
22  * \sa VectorResampleImageFilter
23  *
24  * \ingroup ImageFunctions
25  */
26 template <class TImageType, class TCoordRep = float>
27 class ITK_EXPORT VectorBSplineResampleImageFunction : 
28     public VectorBSplineInterpolateImageFunction<
29   TImageType,TCoordRep,ITK_TYPENAME TImageType::PixelType::ValueType > 
30 {
31 public:
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;
37
38   /** Run-time type information (and related methods). */
39   itkTypeMacro(VectorBSplineResampleImageFunction, 
40                VectorBSplineInterpolateImageFunction);
41
42   /** New macro for creation of through a Smart Pointer */
43   itkNewMacro( Self );
44
45   /** Set the input image representing the BSplineCoefficients */
46   virtual void SetInputImage(const TImageType * inputData)
47     {
48       // bypass my superclass
49       this->itk::VectorInterpolateImageFunction<TImageType,TCoordRep>::SetInputImage(inputData);
50       this->m_Coefficients = inputData;
51       if ( this->m_Coefficients.IsNotNull() )
52         {
53           this->m_DataLength = this->m_Coefficients->GetBufferedRegion().GetSize();
54         }
55     }
56
57 protected:
58   VectorBSplineResampleImageFunction() {};
59   virtual ~VectorBSplineResampleImageFunction() {};
60
61 private:
62   VectorBSplineResampleImageFunction(const Self&);//purposely not implemented
63 };
64
65 } // namespace clitk
66
67
68 #endif