]> Creatis software - clitk.git/blob - itk/itkBSplineResampleImageFunctionWithLUT.h
removed headers
[clitk.git] / itk / itkBSplineResampleImageFunctionWithLUT.h
1 #ifndef __itkBSplineResampleImageFunctionWithLUT_h
2 #define __itkBSplineResampleImageFunctionWithLUT_h
3 #include "itkBSplineInterpolateImageFunctionWithLUT.h"
4
5 namespace itk
6 {
7 /** \class BSplineResampleImageFunctionWithLUT
8  * \brief Resample image intensity from a BSpline coefficient image using a LUT.
9  *
10  * This class resample the image intensity at a non-integer position
11  * from the input BSpline coefficient image using a LUT.
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 BSplineInterpolateImageFunctionWithLUT
21  * \sa BSplineDecompositionImageFilter
22  * \sa ResampleImageFilter
23  *
24  * \ingroup ImageFunctions
25  */
26 template <class TImageType, class TCoordRep = float>
27 class ITK_EXPORT BSplineResampleImageFunctionWithLUT : 
28     public BSplineInterpolateImageFunctionWithLUT<
29   TImageType,TCoordRep,ITK_TYPENAME TImageType::PixelType > 
30 {
31 public:
32   /** Standard class typedefs. */
33   typedef BSplineResampleImageFunctionWithLUT                   Self;
34   typedef BSplineInterpolateImageFunctionWithLUT< 
35     TImageType,TCoordRep, ITK_TYPENAME TImageType::PixelType >  Superclass;
36   typedef SmartPointer<Self>                                    Pointer;
37   typedef SmartPointer<const Self>                              ConstPointer;
38
39   /** Run-time type information (and related methods). */
40   itkTypeMacro(BSplineReconstructionImageFunction, 
41                BSplineInterpolateImageFunctionWithLUT);
42
43   /** New macro for creation of through a Smart Pointer */
44   itkNewMacro( Self );
45
46   /** Set the input image representing the BSplineCoefficients */
47   virtual void SetInputImage(const TImageType * inputData)
48   {
49     // bypass my superclass
50     this->InterpolateImageFunction<TImageType,TCoordRep>::SetInputImage(inputData);
51     this->m_Coefficients = inputData;
52     if ( this->m_Coefficients.IsNotNull() )
53       {
54       this->m_DataLength = this->m_Coefficients->GetBufferedRegion().GetSize();
55
56       // JV specific for BLUT ( contains the call to UpdatePrecomputedWeights() )
57       this->UpdateWeightsProperties();
58       }
59   }
60
61 protected:
62   BSplineResampleImageFunctionWithLUT() {};
63   virtual ~BSplineResampleImageFunctionWithLUT() {};
64   void PrintSelf(std::ostream& os, Indent indent) const
65   {
66     this->Superclass::PrintSelf( os, indent );
67   }
68
69 private:
70   BSplineResampleImageFunctionWithLUT(const Self&);//purposely not implemented
71 };
72
73 } // namespace itk
74
75
76 #endif
77