X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=tools%2FclitkImageStatisticsGenericFilter.h;h=8544d59b6a4027e2bea3fd89f0f621dcc9b17715;hb=refs%2Fheads%2FextentSimon;hp=131eda4147564d5bc3bcf29c2211f2fe8aa5e68f;hpb=a26cd8a19e1b9ad8344ab501436045f171a73713;p=clitk.git diff --git a/tools/clitkImageStatisticsGenericFilter.h b/tools/clitkImageStatisticsGenericFilter.h old mode 100755 new mode 100644 index 131eda4..8544d59 --- a/tools/clitkImageStatisticsGenericFilter.h +++ b/tools/clitkImageStatisticsGenericFilter.h @@ -3,7 +3,7 @@ Authors belong to: - University of LYON http://www.universite-lyon.fr/ - - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr + - Léon Bérard cancer center http://www.centreleonberard.fr - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr This software is distributed WITHOUT ANY WARRANTY; without even @@ -14,20 +14,10 @@ - BSD See included LICENSE.txt file - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -======================================================================-====*/ +===========================================================================**/ #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,15 @@ namespace clitk { m_ArgsInfo=a; m_Verbose=m_ArgsInfo.verbose_flag; - m_InputFileName=m_ArgsInfo.input_arg; + + 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,8 +90,8 @@ namespace clitk //---------------------------------------- // Templated members //---------------------------------------- - template void UpdateWithDim(std::string PixelType); - template void UpdateWithDimAndPixelType(); + template void UpdateWithDim(std::string PixelType); + template void UpdateWithDimAndPixelType(); //----------------------------------------