]> Creatis software - clitk.git/blob - itk/clitkGenericVectorInterpolator.h
added the new headers
[clitk.git] / itk / clitkGenericVectorInterpolator.h
1 /*=========================================================================
2   Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
3
4   Authors belong to: 
5   - University of LYON              http://www.universite-lyon.fr/
6   - Léon Bérard cancer center       http://oncora1.lyon.fnclcc.fr
7   - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
8
9   This software is distributed WITHOUT ANY WARRANTY; without even
10   the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11   PURPOSE.  See the copyright notices for more information.
12
13   It is distributed under dual licence
14
15   - BSD        See included LICENSE.txt file
16   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ======================================================================-====*/
18 #ifndef __clitkGenericVectorInterpolator_h
19 #define __clitkGenericVectorInterpolator_h
20 #include "clitkImageCommon.h"
21
22 //itk include
23 #include "itkVectorNearestNeighborInterpolateImageFunction.h"
24 #include "itkVectorLinearInterpolateImageFunction.h"
25 #include "clitkVectorBSplineInterpolateImageFunction.h"
26 #include "clitkVectorBSplineInterpolateImageFunctionWithLUT.h"
27
28 /*
29
30 Requires at least the following section is the .ggo file
31
32 option "interpVF"               -       "Interpolation: 0=NN, 1=Linear, 2=BSpline, 3=BLUT"      int     no  default="1"
33 option "interpVFOrder"  -       "Order if BLUT or BSpline (0-5)"                        int     no  default="3"
34 option "interpVFSF"     -       "Sampling factor if BLUT"                               int     no  default="20"
35
36 */
37
38 namespace clitk
39 {
40   
41   template <class args_info_type,   class ImageType,  class TCoordRep >  
42   class GenericVectorInterpolator : public itk::LightObject
43   {
44   public:
45     //==============================================
46     typedef GenericVectorInterpolator     Self;
47     typedef itk::LightObject     Superclass;
48     typedef itk::SmartPointer<Self>            Pointer;
49     typedef itk::SmartPointer<const Self>      ConstPointer;
50
51     typedef itk::VectorInterpolateImageFunction<ImageType, TCoordRep> InterpolatorType;
52     typedef typename InterpolatorType::Pointer InterpolatorPointer;   
53      
54     /** Method for creation through the object factory. */
55     itkNewMacro(Self);  
56   
57     //============================================== 
58     //Set members
59     void SetArgsInfo(args_info_type args_info)
60     {
61       m_ArgsInfo= args_info;
62       m_Verbose=m_ArgsInfo.verbose_flag;
63     }
64
65     //============================================== 
66     //Get members
67     InterpolatorPointer GetInterpolatorPointer(void);
68     
69     //==============================================
70   protected:
71     GenericVectorInterpolator();
72     ~GenericVectorInterpolator() {};
73
74   private:
75     args_info_type m_ArgsInfo;
76     InterpolatorPointer m_Interpolator;
77     bool m_Verbose;
78   };
79
80 } // end namespace clitk
81 #ifndef ITK_MANUAL_INSTANTIATION
82 #include "clitkGenericVectorInterpolator.txx"
83 #endif
84
85 #endif // #define __clitkGenericVectorInterpolator_h