OTB  9.0.0
Orfeo Toolbox
otbReduceSpectralResponseClassifierRAndNIR.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES)
3  *
4  * This file is part of Orfeo Toolbox
5  *
6  * https://www.orfeo-toolbox.org/
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 #ifndef otbReduceSpectralResponseClassifierRAndNIR_h
22 #define otbReduceSpectralResponseClassifierRAndNIR_h
23 
24 
27 
28 
29 namespace otb
30 {
55 template <class TReduceSpectralResponse,
56  class TFunction = Functor::NDVI<typename TReduceSpectralResponse::ValuePrecisionType, typename TReduceSpectralResponse::ValuePrecisionType>>
57 class ReduceSpectralResponseClassifierRAndNIR : public itk::DataObject
58 {
59  // friend class
60 public:
63  typedef itk::DataObject Superclass;
64  typedef itk::SmartPointer<Self> Pointer;
65  typedef itk::SmartPointer<const Self> ConstPointer;
66 
68  typedef TReduceSpectralResponse InputReduceSpectralResponseType;
69  typedef TFunction FunctorType;
70  typedef typename TReduceSpectralResponse::Pointer InputReduceSpectralResponsePointerType;
71  typedef typename InputReduceSpectralResponseType::ValuePrecisionType ValuePrecisionType;
72 
73 
75  itkNewMacro(Self);
76  itkTypeMacro(ReduceSpectralResponseClassifierRAndNIR, DataObject);
78 
79  itkGetConstObjectMacro(InputReduceSpectralResponse, InputReduceSpectralResponseType);
80  itkSetObjectMacro(InputReduceSpectralResponse, InputReduceSpectralResponseType);
81 
82  itkGetConstMacro(RBandNumber, unsigned int);
83  itkSetMacro(RBandNumber, unsigned int);
84 
85  itkGetConstMacro(NIRBandNumber, unsigned int);
86  itkSetMacro(NIRBandNumber, unsigned int);
87 
93  {
94  return m_Functor;
95  };
97 
104  void SetFunctor(const FunctorType& functor)
105  {
106  m_Functor = functor;
107  }
108 
110  virtual bool Clear();
111 
112 
114  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
115 
116 
122 
123 
124 protected:
127 
129  // ReduceSpectralResponseClassifierRAndNIR( const std::string & filename );
130 
133 
135  // void PrintSelf(std::ostream& os, itk::Indent indent) const;
136 
137 private:
139  void operator=(const Self&) = delete;
140 
143 
145  unsigned int m_RBandNumber;
146 
148  unsigned int m_NIRBandNumber;
149 
152 };
153 } // end namespace otb
154 
155 
156 #ifndef OTB_MANUAL_INSTANTIATION
158 #endif
159 
160 #endif
otb::ReduceSpectralResponseClassifierRAndNIR::InputReduceSpectralResponseType
TReduceSpectralResponse InputReduceSpectralResponseType
Definition: otbReduceSpectralResponseClassifierRAndNIR.h:68
otbReduceSpectralResponseClassifierRAndNIR.hxx
otb::ReduceSpectralResponseClassifierRAndNIR::FunctorType
TFunction FunctorType
Definition: otbReduceSpectralResponseClassifierRAndNIR.h:69
otb::ReduceSpectralResponseClassifierRAndNIR::operator()
ValuePrecisionType operator()()
Definition: otbReduceSpectralResponseClassifierRAndNIR.hxx:46
otb::ReduceSpectralResponseClassifierRAndNIR::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbReduceSpectralResponseClassifierRAndNIR.h:64
otb::ReduceSpectralResponseClassifierRAndNIR::operator=
void operator=(const Self &)=delete
otb::ReduceSpectralResponseClassifierRAndNIR::m_RBandNumber
unsigned int m_RBandNumber
Definition: otbReduceSpectralResponseClassifierRAndNIR.h:145
otb::ReduceSpectralResponseClassifierRAndNIR::Clear
virtual bool Clear()
Definition: otbReduceSpectralResponseClassifierRAndNIR.hxx:38
otb::ReduceSpectralResponseClassifierRAndNIR::m_InputReduceSpectralResponse
InputReduceSpectralResponsePointerType m_InputReduceSpectralResponse
Definition: otbReduceSpectralResponseClassifierRAndNIR.h:142
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::ReduceSpectralResponseClassifierRAndNIR::~ReduceSpectralResponseClassifierRAndNIR
~ReduceSpectralResponseClassifierRAndNIR() override
Definition: otbReduceSpectralResponseClassifierRAndNIR.h:132
otb::ReduceSpectralResponseClassifierRAndNIR::ReduceSpectralResponseClassifierRAndNIR
ReduceSpectralResponseClassifierRAndNIR()
Definition: otbReduceSpectralResponseClassifierRAndNIR.hxx:32
otb::ReduceSpectralResponseClassifierRAndNIR
this class represents a hierarchy of vector data.
Definition: otbReduceSpectralResponseClassifierRAndNIR.h:57
otb::ReduceSpectralResponseClassifierRAndNIR::InputReduceSpectralResponsePointerType
TReduceSpectralResponse::Pointer InputReduceSpectralResponsePointerType
Definition: otbReduceSpectralResponseClassifierRAndNIR.h:70
otbReduceSpectralResponse.h
otb::ReduceSpectralResponseClassifierRAndNIR::PrintSelf
void PrintSelf(std::ostream &os, itk::Indent indent) const override
Definition: otbReduceSpectralResponseClassifierRAndNIR.hxx:59
otb::ReduceSpectralResponseClassifierRAndNIR::SetFunctor
void SetFunctor(const FunctorType &functor)
Definition: otbReduceSpectralResponseClassifierRAndNIR.h:104
otb::ReduceSpectralResponseClassifierRAndNIR::m_Functor
FunctorType m_Functor
Definition: otbReduceSpectralResponseClassifierRAndNIR.h:151
otb::ReduceSpectralResponseClassifierRAndNIR::GetFunctor
FunctorType & GetFunctor()
Definition: otbReduceSpectralResponseClassifierRAndNIR.h:92
otb::ReduceSpectralResponseClassifierRAndNIR::ValuePrecisionType
InputReduceSpectralResponseType::ValuePrecisionType ValuePrecisionType
Definition: otbReduceSpectralResponseClassifierRAndNIR.h:71
otb::ReduceSpectralResponseClassifierRAndNIR::Superclass
itk::DataObject Superclass
Definition: otbReduceSpectralResponseClassifierRAndNIR.h:63
otbVegetationIndicesFunctor.h
otb::ReduceSpectralResponseClassifierRAndNIR::Self
ReduceSpectralResponseClassifierRAndNIR Self
Definition: otbReduceSpectralResponseClassifierRAndNIR.h:62
otb::ReduceSpectralResponseClassifierRAndNIR::m_NIRBandNumber
unsigned int m_NIRBandNumber
Definition: otbReduceSpectralResponseClassifierRAndNIR.h:148
otb::ReduceSpectralResponseClassifierRAndNIR::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbReduceSpectralResponseClassifierRAndNIR.h:65