22 #ifndef otbRGBAPixelConverter_hxx
23 #define otbRGBAPixelConverter_hxx
31 template <
class TInternalInputPixelType,
class TOutputPixelType>
37 result = ((2125.0 *
static_cast<double>(input[0]) + 7154.0 *
static_cast<double>(input[1]) + 0721.0 *
static_cast<double>(input[2])) /
44 template <
class TInternalInputPixelType,
class TInternalOutputPixelType>
48 OutputPixelType result;
50 result[0] =
static_cast<TInternalOutputPixelType
>(input[0]);
51 result[1] =
static_cast<TInternalOutputPixelType
>(input[1]);
52 result[2] =
static_cast<TInternalOutputPixelType
>(input[2]);
53 result[3] =
static_cast<TInternalOutputPixelType
>(input[3]);
59 template <
class TInternalInputPixelType,
class TInternalOutputPixelType>
60 typename RGBAPixelConverter<TInternalInputPixelType, typename itk::RGBPixel<TInternalOutputPixelType>>::OutputPixelType
61 RGBAPixelConverter<TInternalInputPixelType, typename itk::RGBPixel<TInternalOutputPixelType>>::Convert(InputPixelType input)
63 OutputPixelType result;
65 result[0] =
static_cast<TInternalOutputPixelType
>(input[0]);
66 result[1] =
static_cast<TInternalOutputPixelType
>(input[1]);
67 result[2] =
static_cast<TInternalOutputPixelType
>(input[2]);