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 clitkImageStatisticsGenericFilter_h
19 #define clitkImageStatisticsGenericFilter_h
23 #include "clitkCommon.h"
24 #include "clitkImageCommon.h"
25 #include "clitkImageStatistics_ggo.h"
28 #include "itkLightObject.h"
29 #include "itkLabelStatisticsImageFilter.h"
34 class ITK_EXPORT ImageStatisticsGenericFilter : public itk::LightObject
37 //----------------------------------------
39 //----------------------------------------
40 typedef ImageStatisticsGenericFilter Self;
41 typedef itk::LightObject Superclass;
42 typedef itk::SmartPointer<Self> Pointer;
43 typedef itk::SmartPointer<const Self> ConstPointer;
45 // Method for creation through the object factory
48 // Run-time type information (and related methods)
49 itkTypeMacro( ImageStatisticsGenericFilter, LightObject );
52 //----------------------------------------
54 //----------------------------------------
57 //----------------------------------------
59 //----------------------------------------
60 void SetArgsInfo(const args_info_clitkImageStatistics & a)
63 m_Verbose=m_ArgsInfo.verbose_flag;
64 m_Localize=m_ArgsInfo.localize_flag;
66 if(m_ArgsInfo.input_given)
67 m_InputFileName=m_ArgsInfo.input_arg[0];
68 else if(m_ArgsInfo.inputs_num>0)
69 m_InputFileName=m_ArgsInfo.inputs[0];
71 std::cerr << "You must give an input file name" << std::endl;
77 //----------------------------------------
79 //----------------------------------------
84 //----------------------------------------
85 // Constructor & Destructor
86 //----------------------------------------
87 ImageStatisticsGenericFilter();
88 ~ImageStatisticsGenericFilter() {};
91 //----------------------------------------
93 //----------------------------------------
94 template <unsigned int Dimension, unsigned int Components> void UpdateWithDim(std::string PixelType);
95 template <unsigned int Dimension, class PixelType, unsigned int Components> void UpdateWithDimAndPixelType();
98 //----------------------------------------
100 //----------------------------------------
101 args_info_clitkImageStatistics m_ArgsInfo;
102 bool m_Verbose, m_Localize;
103 std::string m_InputFileName;
108 } // end namespace clitk
110 #ifndef ITK_MANUAL_INSTANTIATION
111 #include "clitkImageStatisticsGenericFilter.txx"
114 #endif // #define clitkImageStatisticsGenericFilter_h