22 #ifndef otbReciprocalCoherencyToReciprocalMuellerImageFilter_h
23 #define otbReciprocalCoherencyToReciprocalMuellerImageFilter_h
77 template <
class TInput,
class TOutput>
84 inline void operator()(TOutput& result,
const TInput& Coherency)
const
86 const double T1 =
static_cast<double>(Coherency[0].real());
87 const double T2 =
static_cast<double>(Coherency[3].real());
88 const double T3 =
static_cast<double>(Coherency[5].real());
95 result[0] = 0.5 * (T1 + T2 + T3);
96 result[1] =
static_cast<double>(Coherency[1].real() + Coherency[3].imag());
97 result[2] =
static_cast<double>(Coherency[2].real());
98 result[3] =
static_cast<double>(Coherency[4].imag());
99 result[4] =
static_cast<double>(Coherency[1].real());
100 result[5] = 0.5 * (T1 + T2 - T3);
101 result[6] =
static_cast<double>(Coherency[4].real());
102 result[7] =
static_cast<double>(Coherency[2].imag());
103 result[8] =
static_cast<double>(-Coherency[2].real());
104 result[9] =
static_cast<double>(-Coherency[4].real());
105 result[10] =
static_cast<double>(0.5 * VAL1.real());
106 result[11] =
static_cast<double>(0.5 * VAL0.imag());
107 result[12] =
static_cast<double>(Coherency[4].imag());
108 result[13] =
static_cast<double>(Coherency[2].imag());
109 result[14] =
static_cast<double>(0.5 * std::conj(VAL1).imag());
110 result[15] =
static_cast<double>(0.5 * VAL0.real());
133 template <
typename TInputImage,
typename TOutputImage>