From 0eb43ed99c742a1e4934174ffc92f3dcdd83ca87 Mon Sep 17 00:00:00 2001 From: Otmane Lahlou <otmane.lahlou@c-s.fr> Date: Wed, 14 Oct 2009 11:06:22 +0200 Subject: [PATCH] ENH : suppress condition to recompute histograms when channels list modified --- .../Visualization/otbStandardRenderingFunction.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Code/Visualization/otbStandardRenderingFunction.h b/Code/Visualization/otbStandardRenderingFunction.h index 05054f65b3..f2a73a1c90 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); -- GitLab