From 345a1eb377c5bdac1e41f3c04b1c3ce9f6d4f5e6 Mon Sep 17 00:00:00 2001 From: remi cresson <remi.cresson@teledetection.fr> Date: Fri, 3 Nov 2017 11:17:49 +0000 Subject: [PATCH] ENH: display progress of statistics and histogram computing. Remote empty logging in CheckValidity() --- .../AppFiltering/app/otbContrastEnhancement.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Modules/Applications/AppFiltering/app/otbContrastEnhancement.cxx b/Modules/Applications/AppFiltering/app/otbContrastEnhancement.cxx index cb1e076756..d077d55dbf 100644 --- a/Modules/Applications/AppFiltering/app/otbContrastEnhancement.cxx +++ b/Modules/Applications/AppFiltering/app/otbContrastEnhancement.cxx @@ -426,8 +426,8 @@ private: "in comparison with the number of bin. Histogram may not have much sens. " "For better result enlarge thumbnail size or reduce number of bin." <<std::endl; + otbAppLogINFO( << oss.str() ); } - otbAppLogINFO( << oss.str() ); } // Compute min max from a vector image @@ -451,6 +451,7 @@ private: statFilter->SetUserIgnoredValue( GetParameterFloat("nodata") ); } statFilter->SetInput( inImage ); + AddProcess(statFilter->GetStreamer(), "Computing statistics"); statFilter->Update(); min = statFilter->GetMinimum(); max = statFilter->GetMaximum(); @@ -671,6 +672,7 @@ private: histoPersistent->GetFilter()->SetHistogramMin(pixel); pixel = max + 0.5 * step; histoPersistent->GetFilter()->SetHistogramMax(pixel); + AddProcess(histoPersistent->GetStreamer(), "Computing histogram"); histoPersistent->Update(); HistoPersistentFilterType::HistogramListType * histoList = histoPersistent->GetHistogramList(); @@ -834,4 +836,4 @@ private: } //End namespace Wrapper } //End namespace otb -OTB_APPLICATION_EXPORT(otb::Wrapper::ContrastEnhancement) \ No newline at end of file +OTB_APPLICATION_EXPORT(otb::Wrapper::ContrastEnhancement) -- GitLab