diff --git a/Applications/Projections/otbOrthoRectification.cxx b/Applications/Projections/otbOrthoRectification.cxx index 4a9d0b9e40715444a3e808c6b00be2fda8900485..3f0d346e9c439298869afef40c59a87a5a68c71f 100644 --- a/Applications/Projections/otbOrthoRectification.cxx +++ b/Applications/Projections/otbOrthoRectification.cxx @@ -217,10 +217,6 @@ private: genericRSEstimator->SetOutputProjectionRef(m_OutputProjectionRef); genericRSEstimator->Compute(); - // Update the GUI - dynamic_cast< NumericalParameter<float> * >(GetParameterByKey("outputs.spacingy"))->SetMinimumValue(-50000.0); - dynamic_cast< NumericalParameter<float> * >(GetParameterByKey("outputs.spacingy"))->SetMaximumValue(10000.0); - // Fill the Gui with the computed parameters if (!HasUserValue("outputs.ulx")) { diff --git a/Code/ApplicationEngine/otbWrapperNumericalParameter.h b/Code/ApplicationEngine/otbWrapperNumericalParameter.h index 086d5ab20dfc837fd9b6a042e7d0def74dd1c1a7..f4f9ada22ed5bedc0900889319b1a018de8734e0 100644 --- a/Code/ApplicationEngine/otbWrapperNumericalParameter.h +++ b/Code/ApplicationEngine/otbWrapperNumericalParameter.h @@ -95,10 +95,21 @@ public: itkGetMacro(DefaultValue, ScalarType); /** Set the minimum value */ - itkSetMacro(MinimumValue, ScalarType); + //itkSetMacro(MinimumValue, ScalarType); + + void SetMinimumValue(ScalarType min) + { + std::cout <<"SetMinimum Value (old value : "<< m_MinimumValue << " ) -- ( new value :"<< min << " )" << std::endl; + m_MinimumValue = min; + } /** Get the minimum value */ - itkGetMacro(MinimumValue, ScalarType); + //itkGetMacro(MinimumValue, ScalarType); + ScalarType GetMinimumValue() + { + std::cout <<"Param "<< GetKey()<<" GetMinimum Value "<< m_MinimumValue << std::endl; + return m_MinimumValue; + } /** Set the maximum value */ itkSetMacro(MaximumValue, ScalarType); @@ -110,7 +121,7 @@ protected: /** Constructor */ NumericalParameter() : m_DefaultValue(itk::NumericTraits<T>::Zero), - m_MinimumValue(itk::NumericTraits<T>::min()), + m_MinimumValue(itk::NumericTraits<T>::NonpositiveMin()), m_MaximumValue(itk::NumericTraits<T>::max()) {}