OTB  9.0.0
Orfeo Toolbox
otbPathFunction.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 otbPathFunction_h
22 #define otbPathFunction_h
23 
24 #include "itkFunctionBase.h"
25 
26 namespace otb
27 {
28 
47 template <class TInputPath, class TOutput>
48 class ITK_EXPORT PathFunction : public itk::FunctionBase<TInputPath, TOutput>
49 {
50 public:
52  typedef PathFunction Self;
53  typedef itk::FunctionBase<TInputPath, TOutput> Superclass;
54  typedef itk::SmartPointer<Self> Pointer;
55  typedef itk::SmartPointer<const Self> ConstPointer;
56 
58  itkTypeMacro(PathFunction, itk::FunctionBase);
59 
61  typedef typename Superclass::InputType InputPathType;
62 
64  typedef typename InputPathType::ConstPointer InputPathConstPointer;
65 
67  typedef typename Superclass::OutputType OutputType;
68 
70  virtual void SetInputPath(const InputPathType* ptr);
71 
73  const InputPathType* GetInputPath() const
74  {
75  return m_Path.GetPointer();
76  }
77 
78 protected:
79  PathFunction();
80  ~PathFunction() override
81  {
82  }
83  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
84 
86 
87 private:
88  PathFunction(const Self&) = delete;
89  void operator=(const Self&) = delete;
90 };
91 
92 } // namespace otb
93 
94 #ifndef OTB_MANUAL_INSTANTIATION
95 #include "otbPathFunction.hxx"
96 #endif
97 
98 #endif
otb::PathFunction::~PathFunction
~PathFunction() override
Definition: otbPathFunction.h:80
otb::PathFunction::Superclass
itk::FunctionBase< TInputPath, TOutput > Superclass
Definition: otbPathFunction.h:53
otb::PathFunction
Evaluates a function of an image over a specific path.
Definition: otbPathFunction.h:48
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otbPathFunction.hxx
otb::PathFunction::OutputType
Superclass::OutputType OutputType
Definition: otbPathFunction.h:67
otb::PathFunction::m_Path
InputPathConstPointer m_Path
Definition: otbPathFunction.h:85
otb::PathFunction::InputPathConstPointer
InputPathType::ConstPointer InputPathConstPointer
Definition: otbPathFunction.h:64
otb::PathFunction::Self
PathFunction Self
Definition: otbPathFunction.h:52
otb::PathFunction::InputPathType
Superclass::InputType InputPathType
Definition: otbPathFunction.h:58
otb::PathFunction::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbPathFunction.h:55
otb::PathFunction::GetInputPath
const InputPathType * GetInputPath() const
Definition: otbPathFunction.h:73
otb::PathFunction::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbPathFunction.h:54