diff --git a/Code/Visualization/otbStandardRenderingFunction.h b/Code/Visualization/otbStandardRenderingFunction.h index 05054f65b3fbffea78091bb3b84c187168739e4c..f2a73a1c9008ad40a80d360db4573d7825a51d56 100644 --- a/Code/Visualization/otbStandardRenderingFunction.h +++ b/Code/Visualization/otbStandardRenderingFunction.h @@ -198,13 +198,15 @@ public: // For each components, use the histogram to compute min and max m_Minimum.clear(); m_Maximum.clear(); - - if (this->GetHistogramList().IsNull()) - { + + // Comment the condition cause if we change the channel list order + // this condition doesn't allow us to recompute the histograms + //if (this->GetHistogramList().IsNull()) + //{ this->RenderHistogram(); - // itkExceptionMacro( << "To Compute min/max automatically, Histogram should be " - // <<"provided to the rendering function with SetHistogramList()" ); - } + // itkExceptionMacro( << "To Compute min/max automatically, Histogram should be " + // <<"provided to the rendering function with SetHistogramList()" ); + //} for(unsigned int comp = 0; comp < nbComps;++comp) { // Compute quantiles @@ -314,7 +316,7 @@ public: */ virtual ParametersType GetParameters() { - unsigned int nbBands = m_Minimum.size();/*TransferedMaximum*/ + unsigned int nbBands = m_PixelRepresentationFunction.GetOutputSize(); ParametersType param; param.SetSize(2*nbBands);