From: Romulo Pinho Date: Thu, 6 Oct 2011 15:17:35 +0000 (+0200) Subject: clitkImageStatistics - small robustness issue X-Git-Tag: v1.3.0~196^2~3 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=942ca247436b4b80fa373c9fd4b4a4890f32c367;p=clitk.git clitkImageStatistics - small robustness issue --- diff --git a/tools/clitkImageStatisticsGenericFilter.cxx b/tools/clitkImageStatisticsGenericFilter.cxx index 90e6ecb..ddfe5e0 100644 --- a/tools/clitkImageStatisticsGenericFilter.cxx +++ b/tools/clitkImageStatisticsGenericFilter.cxx @@ -54,7 +54,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; } diff --git a/tools/clitkImageStatisticsGenericFilter.txx b/tools/clitkImageStatisticsGenericFilter.txx index 9931fa0..d1b0d4c 100644 --- a/tools/clitkImageStatisticsGenericFilter.txx +++ b/tools/clitkImageStatisticsGenericFilter.txx @@ -186,7 +186,6 @@ namespace clitk statisticsFilter->SetHistogramParameters(m_ArgsInfo.bins_arg, m_ArgsInfo.lower_arg, m_ArgsInfo.upper_arg); } statisticsFilter->Update(); - if (m_Verbose) std::cout<<"FINISHED!"; // Output if (m_Verbose) std::cout<<"N° of pixels: ";