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;
}
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: ";