Skip to content
Snippets Groups Projects
Commit 2c7eff94 authored by Otmane Lahlou's avatar Otmane Lahlou
Browse files

ENH: Use NonPositiveMax to add negative value for float params

parent 80f7522f
No related branches found
No related tags found
No related merge requests found
......@@ -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"))
{
......
......@@ -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())
{}
......
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