OTB  9.0.0
Orfeo Toolbox
otbReduceSpectralResponseClassifierRAndNIR.hxx
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_hxx
22 #define otbReduceSpectralResponseClassifierRAndNIR_hxx
23 
25 
26 #include <algorithm>
27 
28 namespace otb
29 {
30 
31 template <class TReduceSpectralResponse, class TFunction>
33 {
34  // m_Response = VectorType::New();
35 }
36 
37 template <class TReduceSpectralResponse, class TFunction>
39 {
40  return (m_InputReduceSpectralResponse->Clear());
41 }
42 
43 
44 template <class TReduceSpectralResponse, class TFunction>
47 {
48  itk::VariableLengthVector<ValuePrecisionType> sr(2);
49  sr[0] = (*m_InputReduceSpectralResponse)(m_RBandNumber);
50  sr[1] = (*m_InputReduceSpectralResponse)(m_NIRBandNumber);
51  m_Functor.SetBandIndex(CommonBandNames::RED, 1);
52  m_Functor.SetBandIndex(CommonBandNames::NIR, 2);
53 
54  return m_Functor(sr);
55 }
56 
57 
58 template <class TReduceSpectralResponse, class TFunction>
60 {
61  Superclass::PrintSelf(os, indent);
62 }
63 } // end namespace otb
64 
65 #endif
otb::ReduceSpectralResponseClassifierRAndNIR::operator()
ValuePrecisionType operator()()
Definition: otbReduceSpectralResponseClassifierRAndNIR.hxx:46
otb::ReduceSpectralResponseClassifierRAndNIR::Clear
virtual bool Clear()
Definition: otbReduceSpectralResponseClassifierRAndNIR.hxx:38
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otbReduceSpectralResponseClassifierRAndNIR.h
otb::ReduceSpectralResponseClassifierRAndNIR::ReduceSpectralResponseClassifierRAndNIR
ReduceSpectralResponseClassifierRAndNIR()
Definition: otbReduceSpectralResponseClassifierRAndNIR.hxx:32
otb::ReduceSpectralResponseClassifierRAndNIR::PrintSelf
void PrintSelf(std::ostream &os, itk::Indent indent) const override
Definition: otbReduceSpectralResponseClassifierRAndNIR.hxx:59
otb::ReduceSpectralResponseClassifierRAndNIR::ValuePrecisionType
InputReduceSpectralResponseType::ValuePrecisionType ValuePrecisionType
Definition: otbReduceSpectralResponseClassifierRAndNIR.h:71