Commit 345a1eb3 authored by remi cresson's avatar remi cresson
Browse files

ENH: display progress of statistics and histogram computing. Remote empty...

ENH: display progress of statistics and histogram computing. Remote empty logging in CheckValidity()
No related merge requests found
Showing with 4 additions and 2 deletions
+4 -2
...@@ -426,8 +426,8 @@ private: ...@@ -426,8 +426,8 @@ private:
"in comparison with the number of bin. Histogram may not have much sens. " "in comparison with the number of bin. Histogram may not have much sens. "
"For better result enlarge thumbnail size or reduce number of bin." "For better result enlarge thumbnail size or reduce number of bin."
<<std::endl; <<std::endl;
otbAppLogINFO( << oss.str() );
} }
otbAppLogINFO( << oss.str() );
} }
// Compute min max from a vector image // Compute min max from a vector image
...@@ -451,6 +451,7 @@ private: ...@@ -451,6 +451,7 @@ private:
statFilter->SetUserIgnoredValue( GetParameterFloat("nodata") ); statFilter->SetUserIgnoredValue( GetParameterFloat("nodata") );
} }
statFilter->SetInput( inImage ); statFilter->SetInput( inImage );
AddProcess(statFilter->GetStreamer(), "Computing statistics");
statFilter->Update(); statFilter->Update();
min = statFilter->GetMinimum(); min = statFilter->GetMinimum();
max = statFilter->GetMaximum(); max = statFilter->GetMaximum();
...@@ -671,6 +672,7 @@ private: ...@@ -671,6 +672,7 @@ private:
histoPersistent->GetFilter()->SetHistogramMin(pixel); histoPersistent->GetFilter()->SetHistogramMin(pixel);
pixel = max + 0.5 * step; pixel = max + 0.5 * step;
histoPersistent->GetFilter()->SetHistogramMax(pixel); histoPersistent->GetFilter()->SetHistogramMax(pixel);
AddProcess(histoPersistent->GetStreamer(), "Computing histogram");
histoPersistent->Update(); histoPersistent->Update();
HistoPersistentFilterType::HistogramListType * histoList = HistoPersistentFilterType::HistogramListType * histoList =
histoPersistent->GetHistogramList(); histoPersistent->GetHistogramList();
...@@ -834,4 +836,4 @@ private: ...@@ -834,4 +836,4 @@ private:
} //End namespace Wrapper } //End namespace Wrapper
} //End namespace otb } //End namespace otb
OTB_APPLICATION_EXPORT(otb::Wrapper::ContrastEnhancement) OTB_APPLICATION_EXPORT(otb::Wrapper::ContrastEnhancement)
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment