X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=tools%2FclitkImageStatisticsGenericFilter.h;h=26da4e44d5e0a868029f2133327de6f715c90e2a;hb=b8e5890d37dfd64409b9694f73c0be164a089e64;hp=b61beb89006e941fed751778cb81b8e72ed7f659;hpb=08d1fd56ac1d08bd228d9e557f5472a395e9b708;p=clitk.git diff --git a/tools/clitkImageStatisticsGenericFilter.h b/tools/clitkImageStatisticsGenericFilter.h index b61beb8..26da4e4 100644 --- a/tools/clitkImageStatisticsGenericFilter.h +++ b/tools/clitkImageStatisticsGenericFilter.h @@ -18,16 +18,6 @@ #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 void UpdateWithDim(std::string PixelType); - template void UpdateWithDimAndPixelType(); + template void UpdateWithDim(std::string PixelType); + template void UpdateWithDimAndPixelType(); //---------------------------------------- // Data members //---------------------------------------- args_info_clitkImageStatistics m_ArgsInfo; - bool m_Verbose; + bool m_Verbose, m_Localize; std::string m_InputFileName; };