22 #ifndef otbAmplitudePhaseToRGBFunctor_h
23 #define otbAmplitudePhaseToRGBFunctor_h
49 template <
class TInput1,
class TInput2 = TInput1,
class TInput3 = TInput1,
class TOutput = TInput1>
60 m_Minimum(0), m_Maximum(
itk::NumericTraits<
ScalarType>::max())
67 this->m_Maximum = max;
72 this->m_Minimum = min;
75 inline TOutput
operator()(
const TInput1& amplitude,
const TInput2& coherence,
const TInput3& phase)
const
83 hue = 0.6 - (phase +
CONST_PI) * hinc;
84 sat = 0.6 * coherence + 0.3;
85 val = itk::NumericTraits<RGBComponentType>::max() / 2 * ((amplitude - m_Minimum) / (m_Maximum - m_Minimum) + 1.0);
87 if (amplitude < m_Minimum)
91 if (amplitude > m_Maximum)
93 val = itk::NumericTraits<RGBComponentType>::max();
96 return m_HSVToRGBFunctor(hue, sat, val);
Function object to compute a color representation of a radar image.
~AmplitudePhaseToRGBFunctor()=default
void SetMaximum(ScalarType max)
AmplitudePhaseToRGBFunctor()
HSVToRGBFunctorType m_HSVToRGBFunctor
RGBPixelType::ValueType RGBComponentType
void SetMinimum(ScalarType min)
TOutput operator()(const TInput1 &litude, const TInput2 &coherence, const TInput3 &phase) const
HSVToRGBFunctor< RGBPixelType > HSVToRGBFunctorType
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
constexpr double CONST_PI
constexpr double CONST_2PI