19 #ifndef __otbRGBAPixelConverter_txx
20 #define __otbRGBAPixelConverter_txx
27 template <
class TInternalInputPixelType,
class TOutputPixelType>
28 typename RGBAPixelConverter<TInternalInputPixelType,
31 RGBAPixelConverter<TInternalInputPixelType,
38 ( 2125.0 *
static_cast<double>(input[0]) +
39 7154.0 * static_cast<double>(input[1]) +
40 0721.0 *
static_cast<double>(input[2])) / 10000.0);
42 return (static_cast<OutputPixelType>(result));
46 template <
class TInternalInputPixelType,
class TInternalOutputPixelType>
52 ::Convert(InputPixelType input)
54 OutputPixelType result;
56 result[0] =
static_cast<TInternalOutputPixelType
>(input[0]);
57 result[1] =
static_cast<TInternalOutputPixelType
>(input[1]);
58 result[2] =
static_cast<TInternalOutputPixelType
>(input[2]);
59 result[3] =
static_cast<TInternalOutputPixelType
>(input[3]);
65 template <
class TInternalInputPixelType,
class TInternalOutputPixelType>
66 typename RGBAPixelConverter<TInternalInputPixelType,
69 RGBAPixelConverter<TInternalInputPixelType,
71 ::Convert(InputPixelType input)
73 OutputPixelType result;
75 result[0] =
static_cast<TInternalOutputPixelType
>(input[0]);
76 result[1] =
static_cast<TInternalOutputPixelType
>(input[1]);
77 result[2] =
static_cast<TInternalOutputPixelType
>(input[2]);