]> Creatis software - clitk.git/blob - tools/clitkBSplineCoefficientsToValuesGenericFilter.h
dicom structure in cmd line
[clitk.git] / tools / clitkBSplineCoefficientsToValuesGenericFilter.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 clitkBSplineCoefficientsToValuesGenericFilter_h
19 #define clitkBSplineCoefficientsToValuesGenericFilter_h
20
21 /* =================================================
22  * @file   clitkBSplineCoefficientsToValuesGenericFilter.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 "clitkBSplineCoefficientsToValues_ggo.h"
35 #include "clitkTransformUtilities.h"
36
37 //itk include
38 #include "itkLightObject.h"
39 #include "itkResampleImageFilter.h"
40 #include "itkVectorResampleImageFilter.h"
41 #include "itkBSplineResampleImageFunction.h"
42 #include "clitkVectorBSplineResampleImageFunction.h"
43 #include "itkAddImageFilter.h"
44 #if ITK_VERSION_MAJOR >= 4
45   #include "itkTransformToDisplacementFieldSource.h"
46 #else
47   #include "itkTransformToDeformationFieldSource.h"
48 #endif
49
50 namespace clitk 
51 {
52
53
54   class ITK_EXPORT BSplineCoefficientsToValuesGenericFilter : public itk::LightObject
55   {
56   public:
57     //----------------------------------------
58     // ITK
59     //----------------------------------------
60     typedef BSplineCoefficientsToValuesGenericFilter                   Self;
61     typedef itk::LightObject                   Superclass;
62     typedef itk::SmartPointer<Self>            Pointer;
63     typedef itk::SmartPointer<const Self>      ConstPointer;
64    
65     // Method for creation through the object factory
66     itkNewMacro(Self);  
67
68     // Run-time type information (and related methods)
69     itkTypeMacro( BSplineCoefficientsToValuesGenericFilter, LightObject );
70
71
72     //----------------------------------------
73     // Typedefs
74     //----------------------------------------
75
76
77     //----------------------------------------
78     // Set & Get
79     //----------------------------------------    
80     void SetArgsInfo(const args_info_clitkBSplineCoefficientsToValues & a)
81     {
82       m_ArgsInfo=a;
83       m_Verbose=m_ArgsInfo.verbose_flag;
84       m_InputFileName=m_ArgsInfo.input_arg;
85     }
86     
87     
88     //----------------------------------------  
89     // Update
90     //----------------------------------------  
91     void Update();
92
93   protected:
94
95     //----------------------------------------  
96     // Constructor & Destructor
97     //----------------------------------------  
98     BSplineCoefficientsToValuesGenericFilter();
99     ~BSplineCoefficientsToValuesGenericFilter() {};
100
101     
102     //----------------------------------------  
103     // Templated members
104     //----------------------------------------  
105     template <unsigned int Dimension>  void UpdateWithDim(std::string PixelType, unsigned int Components);
106     template <unsigned int Dimension, class PixelType>  void UpdateWithDimAndPixelType();
107     template <unsigned int Dimension, class PixelType>  void UpdateWithDimAndVectorType();
108
109     //----------------------------------------  
110     // Data members
111     //----------------------------------------
112     args_info_clitkBSplineCoefficientsToValues m_ArgsInfo;
113     bool m_Verbose;
114     std::string m_InputFileName;
115
116   };
117
118
119 } // end namespace clitk
120
121 #ifndef ITK_MANUAL_INSTANTIATION
122 #include "clitkBSplineCoefficientsToValuesGenericFilter.txx"
123 #endif
124
125 #endif // #define clitkBSplineCoefficientsToValuesGenericFilter_h