OTB  10.0.0
Orfeo Toolbox
otbReduceSpectralResponseClassifierRAndNIR.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2024 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
this class represents a hierarchy of vector data.
InputReduceSpectralResponseType::ValuePrecisionType ValuePrecisionType
void PrintSelf(std::ostream &os, itk::Indent indent) const override
ReduceSpectralResponseClassifierRAndNIR(const Self &)=delete
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.