]> Creatis software - clitk.git/blobdiff - tools/clitkImageStatisticsGenericFilter.h
Change name of the button in Image Arithm tool
[clitk.git] / tools / clitkImageStatisticsGenericFilter.h
old mode 100755 (executable)
new mode 100644 (file)
index b61beb8..26da4e4
 #ifndef clitkImageStatisticsGenericFilter_h
 #define clitkImageStatisticsGenericFilter_h
 
-/* =================================================
- * @file   clitkImageStatisticsGenericFilter.h
- * @author 
- * @date   
- * 
- * @brief 
- * 
- ===================================================*/
-
-
 // clitk include
 #include "clitkIO.h"
 #include "clitkCommon.h"
@@ -41,7 +31,6 @@
 namespace clitk 
 {
 
-
   class ITK_EXPORT ImageStatisticsGenericFilter : public itk::LightObject
   {
   public:
@@ -72,7 +61,16 @@ namespace clitk
     {
       m_ArgsInfo=a;
       m_Verbose=m_ArgsInfo.verbose_flag;
-      m_InputFileName=m_ArgsInfo.input_arg;
+      m_Localize=m_ArgsInfo.localize_flag;
+
+      if(m_ArgsInfo.input_given)
+        m_InputFileName=m_ArgsInfo.input_arg[0];
+      else if(m_ArgsInfo.inputs_num>0)
+        m_InputFileName=m_ArgsInfo.inputs[0];
+      else {
+        std::cerr << "You must give an input file name" << std::endl;
+        exit(1);
+      }
     }
     
     
@@ -93,15 +91,15 @@ namespace clitk
     //----------------------------------------  
     // Templated members
     //----------------------------------------  
-    template <unsigned int Dimension>  void UpdateWithDim(std::string PixelType);
-    template <unsigned int Dimension, class PixelType>  void UpdateWithDimAndPixelType();
+    template <unsigned int Dimension, unsigned int Components>  void UpdateWithDim(std::string PixelType);
+    template <unsigned int Dimension, class PixelType, unsigned int Components>  void UpdateWithDimAndPixelType();
 
 
     //----------------------------------------  
     // Data members
     //----------------------------------------
     args_info_clitkImageStatistics m_ArgsInfo;
-    bool m_Verbose;
+    bool m_Verbose, m_Localize;
     std::string m_InputFileName;
 
   };