X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=tools%2FclitkImageStatisticsGenericFilter.cxx;h=931e1bfe7c12b8002cc2e18eeb5ba5181fb044e8;hb=8c110a6b043a6b85c1a0c4762fbfff4c3bea5c7d;hp=90e6ecbd334b2e3856bb79699660d60147bb9900;hpb=d8d3febb5b610a76d682c7ae9bb5d9b5bf090178;p=clitk.git diff --git a/tools/clitkImageStatisticsGenericFilter.cxx b/tools/clitkImageStatisticsGenericFilter.cxx index 90e6ecb..931e1bf 100644 --- a/tools/clitkImageStatisticsGenericFilter.cxx +++ b/tools/clitkImageStatisticsGenericFilter.cxx @@ -18,18 +18,8 @@ #ifndef clitkImageStatisticsGenericFilter_cxx #define clitkImageStatisticsGenericFilter_cxx -/* ================================================= - * @file clitkImageStatisticsGenericFilter.cxx - * @author - * @date - * - * @brief - * - ===================================================*/ - #include "clitkImageStatisticsGenericFilter.h" - namespace clitk { @@ -42,7 +32,8 @@ namespace clitk m_Verbose=false; m_InputFileName=""; } - + //----------------------------------------------------------- + //----------------------------------------------------------- // Update @@ -54,7 +45,7 @@ namespace clitk std::string PixelType; ReadImageDimensionAndPixelType(m_InputFileName, Dimension, PixelType, Components); - if (m_ArgsInfo.channel_arg != -1 && m_ArgsInfo.channel_arg >= Components) { + if (m_ArgsInfo.channel_arg < -1 || m_ArgsInfo.channel_arg >= Components) { std::cout << "Invalid image channel" << std::endl; return; }