21 #ifndef otbUniformAlphaBlendingFunctor_h
22 #define otbUniformAlphaBlendingFunctor_h
25 #include "itkNumericTraits.h"
41 template <
class TInputPixel,
class TInputPixel2,
class TOutputPixel>
60 m_Alpha = a < 0.0 ? 0.0 : (a > 1.0 ? 1.0 : a);
70 resp.Fill(itk::NumericTraits<OutputInternalPixelType>::max());
72 std::floor(m_Alpha *
static_cast<double>(input1.GetRed()) + (1 - m_Alpha) *
static_cast<double>(input2.GetRed()) + 0.5)));
74 std::floor(m_Alpha *
static_cast<double>(input1.GetGreen()) + (1 - m_Alpha) *
static_cast<double>(input2.GetGreen()) + 0.5)));
76 std::floor(m_Alpha *
static_cast<double>(input1.GetBlue()) + (1 - m_Alpha) *
static_cast<double>(input2.GetBlue()) + 0.5)));