From d618c76dca040fe1ebbb4c56557eff76881b18b9 Mon Sep 17 00:00:00 2001 From: Otmane Lahlou <otmane.lahlou@c-s.fr> Date: Mon, 5 Oct 2009 16:16:31 +0200 Subject: [PATCH] ENH : clear min & max vectors when setting new parameters --- Code/Visualization/otbStandardRenderingFunction.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Code/Visualization/otbStandardRenderingFunction.h b/Code/Visualization/otbStandardRenderingFunction.h index bd3b6608aa..fa3a6273b0 100644 --- a/Code/Visualization/otbStandardRenderingFunction.h +++ b/Code/Visualization/otbStandardRenderingFunction.h @@ -288,10 +288,15 @@ public: */ virtual void SetParameters( const ParametersType & parameters) { + //Clear the min and max vectors + m_Minimum.clear(); + m_Maximum.clear(); + if (parameters.Size() % 2 != 0) { itkExceptionMacro( << "Min And Max should be provided for every band to display" ); } + for (unsigned int i=0; i< parameters.Size(); ++i) { m_Minimum.push_back(parameters[i]); @@ -301,6 +306,7 @@ public: m_AutoMinMax = false; UpdateTransferedMinMax(); otbMsgDevMacro(<< "StandardRenderingFunction::SetParameters: " << m_Minimum.size() << "; " << m_Maximum.size()); + this->Modified(); } /** -- GitLab