21 #ifndef otbWaterIndicesFunctor_h
22 #define otbWaterIndicesFunctor_h
45 template <
class TInput,
class TOutput>
53 TOutput
operator()(
const itk::VariableLengthVector<TInput>& input)
const override
55 auto mir = this->
Value(CommonBandNames::MIR, input);
56 auto nir = this->
Value(CommonBandNames::NIR, input);
63 return (nir - mir) / (nir + mir);
77 template <
class TInput,
class TOutput>
85 TOutput
operator()(
const itk::VariableLengthVector<TInput>& input)
const override
87 auto green = this->
Value(CommonBandNames::GREEN, input);
88 auto nir = this->
Value(CommonBandNames::NIR, input);
95 return (green - nir) / (green + nir);
113 template <
class TInput,
class TOutput>
121 TOutput
operator()(
const itk::VariableLengthVector<TInput>& input)
const override
123 auto green = this->
Value(CommonBandNames::GREEN, input);
124 auto mir = this->
Value(CommonBandNames::MIR, input);
131 return (green - mir) / (green + mir);
145 template <
class TInput,
class TOutput>
153 TOutput
operator()(
const itk::VariableLengthVector<TInput>& input)
const override
155 auto green = this->
Value(CommonBandNames::GREEN, input);
156 auto red = this->
Value(CommonBandNames::RED, input);
163 return (red - green) / (green + red);