]> Creatis software - clitk.git/blob - registration/clitkCalculateTREGenericFilter.h
*** empty log message ***
[clitk.git] / registration / clitkCalculateTREGenericFilter.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 clitkCalculateTREGenericFilter_h
19 #define clitkCalculateTREGenericFilter_h
20
21 /* =================================================
22  * @file   clitkCalculateTREGenericFilter.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 "clitkCalculateTRE_ggo.h"
35 #include "clitkGenericVectorInterpolator.h"
36 #include "clitkPointListWriter.h"
37 #include "clitkPointListReader.h"
38 #include "clitkDeformationListStatisticsFilter.h"
39 #include "clitkList.h"
40
41 //itk include
42 #include "itkLightObject.h"
43 #include "itkExtractImageFilter.h"
44
45 //general
46 #include <iomanip>
47
48 namespace clitk 
49 {
50
51
52   class ITK_EXPORT CalculateTREGenericFilter : public itk::LightObject
53   {
54   public:
55     //----------------------------------------
56     // ITK
57     //----------------------------------------
58     typedef CalculateTREGenericFilter                   Self;
59     typedef itk::LightObject                   Superclass;
60     typedef itk::SmartPointer<Self>            Pointer;
61     typedef itk::SmartPointer<const Self>      ConstPointer;
62    
63     // Method for creation through the object factory
64     itkNewMacro(Self);  
65
66     // Run-time type information (and related methods)
67     itkTypeMacro( CalculateTREGenericFilter, LightObject );
68
69
70     //----------------------------------------
71     // Typedefs
72     //----------------------------------------
73
74
75     //----------------------------------------
76     // Set & Get
77     //----------------------------------------    
78     void SetArgsInfo(const args_info_clitkCalculateTRE& a)
79     {
80       m_ArgsInfo=a;
81       m_Verbose=m_ArgsInfo.verbose_flag;
82       m_InputFileName=m_ArgsInfo.vf_arg[0];
83     }
84     
85     
86     //----------------------------------------  
87     // Update
88     //----------------------------------------  
89     void Update();
90
91   protected:
92
93     //----------------------------------------  
94     // Constructor & Destructor
95     //----------------------------------------  
96     CalculateTREGenericFilter();
97     ~CalculateTREGenericFilter() {};
98
99     
100     //----------------------------------------  
101     // Templated members
102     //----------------------------------------  
103     template <unsigned int Dimension,unsigned int Components> void ReadVectorFields(void);
104     template <unsigned int Dimension,unsigned int Components> void ProcessVectorFields(std::vector< typename itk::Image<itk::Vector<float, Components>, Dimension>::Pointer > dvfs, char** filenames);
105     template <unsigned int Dimension> void UpdateWithDim( std::vector<typename itk::Image<itk::Vector<float, Dimension>, Dimension>::Pointer > dvfs,  std::vector<std::string> filenames);
106     
107
108     //----------------------------------------  
109     // Data members
110     //----------------------------------------
111     args_info_clitkCalculateTRE m_ArgsInfo;
112     bool m_Verbose;
113     std::string m_InputFileName;
114
115   };
116
117
118 } // end namespace clitk
119
120 #ifndef ITK_MANUAL_INSTANTIATION
121 #include "clitkCalculateTREGenericFilter.txx"
122 #endif
123
124 #endif // #define clitkCalculateTREGenericFilter_h