Skip to content
Snippets Groups Projects
Commit 55fc28a9 authored by Emmanuel Christophe's avatar Emmanuel Christophe
Browse files

MRG

parents 34ecc4ad 3bc1e2f5
No related branches found
No related tags found
No related merge requests found
......@@ -221,12 +221,12 @@ ImageLayer<TImage,TOutputImage>
typename RenderingFunctionType::ExtremaVectorType min, max;
otbMsgDevMacro(<<"ImageLayer::AutoMinMaxRenderingFunctionSetup(): "<<" ("<<this->GetName()<<") "<<nbComps<<" components, quantile= "<<100*m_AutoMinMaxQuantile<<" %");
// For each components, use the histogram to compute min and max
typedef typename RenderingFunctionType::ScalarPixelType RenderingFunctionScalarPixelType;
typedef RenderingFunctionType::ScalarPixelType RenderingFunctionScalarPixelType;
for(unsigned int comp = 0; comp < nbComps;++comp)
{
// Compute quantiles
min.push_back(static_cast<RenderingFunctionScalarPixelType>( m_HistogramList->GetNthElement(comp)->Quantile(0,m_AutoMinMaxQuantile)));
max.push_back(static_cast<RenderingFunctionScalarPixelType>(*/m_HistogramList->GetNthElement(comp)->Quantile(0,1-m_AutoMinMaxQuantile)));
max.push_back(static_cast<RenderingFunctionScalarPixelType>(m_HistogramList->GetNthElement(comp)->Quantile(0,1-m_AutoMinMaxQuantile)));
otbMsgDevMacro(<<"ImageLayer::AutoMinMaxRenderingFunctionSetup():"<<" ("<<this->GetName()<<")"<< " component "<<comp<<", min= "<<min.back()<<", max= "<<max.back());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment