From d399d82b72187c9e707cf1def20ae4e6ad3990e5 Mon Sep 17 00:00:00 2001 From: Antoine Regimbeau <antoine.regimbeau@c-s.fr> Date: Thu, 30 Nov 2017 12:01:17 +0100 Subject: [PATCH] BUG: bug in range of a for loop and better log --- .../AppFiltering/app/otbContrastEnhancement.cxx | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/Modules/Applications/AppFiltering/app/otbContrastEnhancement.cxx b/Modules/Applications/AppFiltering/app/otbContrastEnhancement.cxx index a1de6164ec..e259ea3f1e 100644 --- a/Modules/Applications/AppFiltering/app/otbContrastEnhancement.cxx +++ b/Modules/Applications/AppFiltering/app/otbContrastEnhancement.cxx @@ -451,13 +451,22 @@ private: void LogInfo() { std::ostringstream oss; - oss << "The application has been launch with the following parameters :" + oss << "The application has been launched with the following parameters :" <<std::endl; - oss << "- number of bins : " << GetParameterInt("bins")<<std::endl; + oss << "- number of bins : " << GetParameterInt("bins") << std::endl; + if ( HasValue("hfact") ) + { + oss << "- contrast limtaition factor : " + << GetParameterFloat("hfact") << std::endl; + } + else + { + oss << "- no contrast limitation factor" << std::endl; + } oss << "- spatial parameters : " << m_SpatialMode ; if ( m_SpatialMode == "local" ) { - oss<< " with a thumbnail of " <<m_ThumbSize[0]<<" X "<<m_ThumbSize[1]; + oss<< " with a thumbnail of " << m_ThumbSize[0] <<" X "<< m_ThumbSize[1] ; } oss << std::endl << "- equalisation of "; if ( m_EqMode == "each" ) @@ -817,7 +826,7 @@ private: void Threshold( HistoPersistentFilterType::HistogramListType * histoList , unsigned int nbBin ) { - for ( unsigned int j = 0 ; j < m_Histogram.size() ; j++ ) + for ( unsigned int j = 0 ; j < histoList->Size() ; j++ ) { unsigned int rest(0) , height ( static_cast<unsigned int>( GetParameterFloat( "hfact" ) * -- GitLab