Commit c60f4ae7 authored by Luc Hermitte's avatar Luc Hermitte Committed by Thibaut ROMAIN
Browse files

BUG: Support `nan` in application parameters

parent 86de8dbe
......@@ -22,6 +22,7 @@
#define otbWrapperNumericalParameter_h
#include "otbWrapperParameter.h"
#include "otbAlgoClamp.h"
#include "itkNumericTraits.h"
#include <boost/optional.hpp>
......@@ -56,7 +57,7 @@ public:
/** Set the value */
void SetValue(ScalarType value)
{
m_Value = (value < m_MinimumValue) ? m_MinimumValue : (value < m_MaximumValue) ? value : m_MaximumValue;
m_Value = otb::clamp(value, m_MinimumValue, m_MaximumValue);
// Set Active only if the parameter is not automatically set
if (!GetAutomaticValue())
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment