]> Creatis software - clitk.git/blob - itk/clitkVectorBSplineResampleImageFunctionWithLUT.h
removed headers
[clitk.git] / itk / clitkVectorBSplineResampleImageFunctionWithLUT.h
1 #ifndef __clitkVectorBSplineResampleImageFunctionWithLUT_h
2 #define __clitkVectorBSplineResampleImageFunctionWithLUT_h
3 #include "clitkVectorBSplineInterpolateImageFunctionWithLUT.h"
4
5 namespace clitk
6 {
7 /** \class VectorBSplineResampleImageFunctionWithLUT
8  * \brief Resample image intensity from a VectorBSpline coefficient image using a LUT.
9  *
10  * This class resample the image intensity at a non-integer position
11  * from the input VectorBSpline coefficient image using a LUT.
12  * 
13  * Spline order may be from 0 to 5.
14  *
15  * In ITK, VectorBSpline coefficient can be generated using a
16  * VectorBSplineDecompositionImageFilter. 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 VectorBSplineInterpolateImageFunctionWithLUT
21  * \sa VectorBSplineDecompositionImageFilter
22  * \sa ResampleImageFilter
23  *
24  * \ingroup ImageFunctions
25  */
26 template <class TImageType, class TCoordRep = float>
27 class ITK_EXPORT VectorBSplineResampleImageFunctionWithLUT : 
28     public VectorBSplineInterpolateImageFunctionWithLUT<
29   TImageType,TCoordRep,ITK_TYPENAME TImageType::PixelType::ValueType > 
30 {
31 public:
32   /** Standard class typedefs. */
33   typedef VectorBSplineResampleImageFunctionWithLUT   Self;
34   typedef VectorBSplineInterpolateImageFunctionWithLUT< 
35     TImageType,TCoordRep, ITK_TYPENAME TImageType::PixelType::ValueType >  Superclass;
36   typedef itk::SmartPointer<Self>                    Pointer;
37   typedef itk::SmartPointer<const Self>              ConstPointer;
38
39   /** Run-time type information (and related methods). */
40   itkTypeMacro(VectorBSplineReconstructionImageFunction, 
41                VectorBSplineInterpolateImageFunctionWithLUT);
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->itk::VectorInterpolateImageFunction<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   VectorBSplineResampleImageFunctionWithLUT() {};
63   virtual ~VectorBSplineResampleImageFunctionWithLUT() {};
64   void PrintSelf(std::ostream& os, itk::Indent indent) const
65   {
66     this->Superclass::PrintSelf( os, indent );
67   }
68
69 private:
70   VectorBSplineResampleImageFunctionWithLUT(const Self&);//purposely not implemented
71 };
72
73 } // namespace clitk
74
75
76 #endif