1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
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
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.
13 It is distributed under dual licence
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
21 /* =================================================
22 * @file clitkCalculateTREGenericFilter.h
28 ===================================================*/
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"
42 #include "itkLightObject.h"
43 #include "itkExtractImageFilter.h"
52 class ITK_EXPORT CalculateTREGenericFilter : public itk::LightObject
55 //----------------------------------------
57 //----------------------------------------
58 typedef CalculateTREGenericFilter Self;
59 typedef itk::LightObject Superclass;
60 typedef itk::SmartPointer<Self> Pointer;
61 typedef itk::SmartPointer<const Self> ConstPointer;
63 // Method for creation through the object factory
66 // Run-time type information (and related methods)
67 itkTypeMacro( CalculateTREGenericFilter, LightObject );
70 //-----------------------------
72 //-----------------------------
73 typedef double ValueType;
74 typedef std::vector<ValueType> MeasureListType;
77 //----------------------------------------
79 //----------------------------------------
80 void SetArgsInfo(const args_info_clitkCalculateTRE& a)
83 m_Verbose=m_ArgsInfo.verbose_flag;
87 //----------------------------------------
89 //----------------------------------------
94 //----------------------------------------
95 // Constructor & Destructor
96 //----------------------------------------
97 CalculateTREGenericFilter();
98 ~CalculateTREGenericFilter() {};
101 //----------------------------------------
103 //----------------------------------------
104 template <unsigned int Dimension,unsigned int Components> void ReadVectorFields(void);
105 template <unsigned int Dimension,unsigned int Components> void ProcessVectorFields(std::vector< typename itk::Image<itk::Vector<double, Components>, Dimension>::Pointer > dvfs, char** filenames);
106 template <unsigned int Dimension> void UpdateDVFWithDim( std::vector<typename itk::Image<itk::Vector<ValueType, Dimension>, Dimension>::Pointer > dvfs, std::vector<std::string> filenames);
107 template <unsigned int Dimension,unsigned int Components> void ReadCoefficientImages(void);
108 template <unsigned int Dimension,unsigned int Components> void ProcessCoefficientImages(std::vector< typename itk::Image<itk::Vector<double, Components>, Dimension>::Pointer > dvfs, char** filenames);
109 template <unsigned int Dimension> void UpdateCoeffsWithDim( std::vector<typename itk::Image<itk::Vector<ValueType, Dimension>, Dimension>::Pointer > dvfs, std::vector<std::string> filenames);
110 template<unsigned int Dimension> void BuildPointLists(std::vector<std::string>& filenames);
112 //----------------------------------------
114 //----------------------------------------
115 args_info_clitkCalculateTRE m_ArgsInfo;
117 std::string m_InputFileName;
118 unsigned int m_NumberOfFields;
119 unsigned int m_NumberOfLists;
120 unsigned int m_NumberOfPoints;
125 } // end namespace clitk
127 #ifndef ITK_MANUAL_INSTANTIATION
128 #include "clitkCalculateTREGenericFilter.txx"
131 #endif // #define clitkCalculateTREGenericFilter_h