]> Creatis software - clitk.git/blob - tools/clitkValuesToBSplineCoefficientsGenericFilter.h
changes in license header
[clitk.git] / tools / clitkValuesToBSplineCoefficientsGenericFilter.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://www.centreleonberard.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 clitkValuesToBSplineCoefficientsGenericFilter_h
19 #define clitkValuesToBSplineCoefficientsGenericFilter_h
20
21 /* =================================================
22  * @file   clitkValuesToBSplineCoefficientsGenericFilter.h
23  * @author 
24  * @date   
25  * 
26  * @brief 
27  * 
28  ===================================================*/
29
30
31 // clitk include
32 #include "clitkIO.h"
33 #include "clitkCommon.h"
34 #include "clitkImageCommon.h"
35 #include "clitkValuesToBSplineCoefficients_ggo.h"
36
37 //itk include
38 #include "itkLightObject.h"
39 #include "itkBSplineDecompositionImageFilter.h"
40 #include "clitkVectorBSplineDecompositionImageFilter.h"
41
42 namespace clitk 
43 {
44
45
46   class ITK_EXPORT ValuesToBSplineCoefficientsGenericFilter : public itk::LightObject
47   {
48   public:
49     //----------------------------------------
50     // ITK
51     //----------------------------------------
52     typedef ValuesToBSplineCoefficientsGenericFilter                   Self;
53     typedef itk::LightObject                   Superclass;
54     typedef itk::SmartPointer<Self>            Pointer;
55     typedef itk::SmartPointer<const Self>      ConstPointer;
56    
57     // Method for creation through the object factory
58     itkNewMacro(Self);  
59
60     // Run-time type information (and related methods)
61     itkTypeMacro( ValuesToBSplineCoefficientsGenericFilter, LightObject );
62
63
64     //----------------------------------------
65     // Typedefs
66     //----------------------------------------
67
68
69     //----------------------------------------
70     // Set & Get
71     //----------------------------------------    
72     void SetArgsInfo(const args_info_clitkValuesToBSplineCoefficients & a)
73     {
74       m_ArgsInfo=a;
75       m_Verbose=m_ArgsInfo.verbose_flag;
76       m_InputFileName=m_ArgsInfo.input_arg;
77     }
78     
79     
80     //----------------------------------------  
81     // Update
82     //----------------------------------------  
83     void Update();
84
85   protected:
86
87     //----------------------------------------  
88     // Constructor & Destructor
89     //----------------------------------------  
90     ValuesToBSplineCoefficientsGenericFilter();
91     ~ValuesToBSplineCoefficientsGenericFilter() {};
92
93     
94     //----------------------------------------  
95     // Templated members
96     //----------------------------------------  
97     template <unsigned int Dimension>  void UpdateWithDim(std::string PixelType, unsigned int Components);
98     template <unsigned int Dimension, class PixelType>  void UpdateWithDimAndPixelType();
99     template <unsigned int Dimension, class PixelType>  void UpdateWithDimAndVectorType();
100
101
102     //----------------------------------------  
103     // Data members
104     //----------------------------------------
105     args_info_clitkValuesToBSplineCoefficients m_ArgsInfo;
106     bool m_Verbose;
107     std::string m_InputFileName;
108
109   };
110
111
112 } // end namespace clitk
113
114 #ifndef ITK_MANUAL_INSTANTIATION
115 #include "clitkValuesToBSplineCoefficientsGenericFilter.txx"
116 #endif
117
118 #endif // #define clitkValuesToBSplineCoefficientsGenericFilter_h