22 #ifndef otbScalarToRainbowRGBPixelFunctor_hxx
23 #define otbScalarToRainbowRGBPixelFunctor_hxx
33 template <
class TScalar,
class TRGBPixel>
40 template <
class TScalar,
class TRGBPixel>
43 double const hinc = 0.6 / (this->GetMaximumInputValue() - this->GetMinimumInputValue());
44 double const sinc = 0.0;
45 double const vinc = 0.0;
47 double hue = 0.6 - (v - this->GetMinimumInputValue()) * hinc;
48 if (v < this->GetMinimumInputValue())
52 if (v > this->GetMaximumInputValue())
56 double const sat = 0.99 + v * sinc;
57 double const val = itk::NumericTraits<RGBComponentType>::max() + v * vinc;
59 return m_HSVToRGBFunctor(hue, sat, val);