21 #ifndef otbWaterSqrtSpectralAngleImageFilter_h
22 #define otbWaterSqrtSpectralAngleImageFilter_h
25 #include "itkUnaryFunctorImageFilter.h"
42 template <
class TInput,
class TOutput>
49 :
RadiometricIndex<TInput, TOutput>({CommonBandNames::BLUE, CommonBandNames::GREEN, CommonBandNames::RED, CommonBandNames::NIR} )
80 pix[0] = this->
Value(CommonBandNames::BLUE, inPix);
81 pix[1] = this->
Value(CommonBandNames::GREEN, inPix);
82 pix[2] = this->
Value(CommonBandNames::RED, inPix);
83 pix[3] = this->
Value(CommonBandNames::NIR, inPix);
85 return std::sqrt(SpectralAngleDetails::ComputeSpectralAngle<PixelType, PixelType, TOutput>
105 this->
SetBandIndex(CommonBandNames::GREEN, channel + 1);
159 template <
class TInputVectorImage,
class TOutputImage,
166 typedef itk::UnaryFunctorImageFilter<TInputVectorImage, TOutputImage, TFunction>
Superclass;
195 #ifndef OTB_MANUAL_INSTANTIATION
Base class for all radiometric indices.
itk::VariableLengthVector< InputType > PixelType
double Value(BandNameType band, const itk::VariableLengthVector< TInput > &input) const
vcl_size_t GetBandIndex(BandNameType band) const
void SetBandIndex(BandNameType band, vcl_size_t index)
This functor uses a spectral angle with a particular reference pixel.
virtual ~WaterSqrtSpectralAngleFunctor()=default
void SetReferenceWaterPixel(PixelType ref)
void SetBlueChannel(unsigned int channel)
void SetGreenChannel(unsigned int channel)
void SetRedChannel(unsigned int channel)
unsigned int GetNIRChannel() const
unsigned int GetGreenChannel() const
unsigned int GetBlueChannel() const
PixelType m_ReferencePixel
WaterSqrtSpectralAngleFunctor()
void SetNIRChannel(unsigned int channel)
TOutput operator()(PixelType const &inPix) const override
unsigned int GetRedChannel() const
Compute a radiometric water indice.
WaterSqrtSpectralAngleImageFilter(Self &)=delete
WaterSqrtSpectralAngleImageFilter Self
itk::SmartPointer< Self > Pointer
TInputVectorImage InputVectorImageType
TOutputImage OutputImageType
void operator=(const Self &)=delete
itk::UnaryFunctorImageFilter< TInputVectorImage, TOutputImage, TFunction > Superclass
InputVectorImageType::PixelType InputVectorPixelType
itk::SmartPointer< const Self > ConstPointer
WaterSqrtSpectralAngleImageFilter()
~WaterSqrtSpectralAngleImageFilter() override
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.