OTB  9.0.0
Orfeo Toolbox
otbCompacityPathFunction.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 otbCompacityPathFunction_h
22 #define otbCompacityPathFunction_h
23 
24 #include "otbPathFunction.h"
25 #include "itkVectorContainer.h"
26 
27 namespace otb
28 {
29 
44 template <class TInputPath, class TOutput = double>
45 class ITK_EXPORT CompacityPathFunction : public PathFunction<TInputPath, TOutput>
46 {
47 public:
51  typedef itk::SmartPointer<Self> Pointer;
52  typedef itk::SmartPointer<const Self> ConstPointer;
53 
55  itkTypeMacro(CompacityPathFunction, PathFunction);
56 
58  itkNewMacro(Self);
59 
61  typedef typename Superclass::InputPathType PathType;
63  typedef typename PathType::ContinuousIndexType VertexType;
64  typedef itk::VectorContainer<unsigned, VertexType> VertexListType;
65  typedef typename VertexListType::ConstPointer VertexListPointer;
66  typedef TOutput OutputType;
67 
68  typedef double RealType;
69 
71  OutputType Evaluate(const PathType& path) const override;
72  virtual OutputType Evaluate() const;
74 
75 protected:
78  {
79  }
80  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
81 
82 private:
83  CompacityPathFunction(const Self&) = delete;
84  void operator=(const Self&) = delete;
85 };
86 
87 } // namespace otb
88 
89 #ifndef OTB_MANUAL_INSTANTIATION
91 #endif
92 
93 #endif
otb::CompacityPathFunction::VertexListType
itk::VectorContainer< unsigned, VertexType > VertexListType
Definition: otbCompacityPathFunction.h:64
otbCompacityPathFunction.hxx
otb::CompacityPathFunction::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbCompacityPathFunction.h:51
otb::CompacityPathFunction::OutputType
TOutput OutputType
Definition: otbCompacityPathFunction.h:66
otb::CompacityPathFunction::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbCompacityPathFunction.h:52
otb::PathFunction
Evaluates a function of an image over a specific path.
Definition: otbPathFunction.h:48
otb::CompacityPathFunction::VertexType
PathType::ContinuousIndexType VertexType
Definition: otbCompacityPathFunction.h:63
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::CompacityPathFunction::CompacityPathFunction
CompacityPathFunction()
Definition: otbCompacityPathFunction.h:76
otb::CompacityPathFunction::~CompacityPathFunction
~CompacityPathFunction() override
Definition: otbCompacityPathFunction.h:77
otb::CompacityPathFunction::Self
CompacityPathFunction Self
Definition: otbCompacityPathFunction.h:49
otb::PathFunction::InputPathConstPointer
InputPathType::ConstPointer InputPathConstPointer
Definition: otbPathFunction.h:64
otb::CompacityPathFunction::Superclass
PathFunction< TInputPath, TOutput > Superclass
Definition: otbCompacityPathFunction.h:50
otb::CompacityPathFunction
Calculate the compacity of a path. The formula of the compacity is :
Definition: otbCompacityPathFunction.h:45
otb::PathFunction::InputPathType
Superclass::InputType InputPathType
Definition: otbPathFunction.h:58
otb::CompacityPathFunction::VertexListPointer
VertexListType::ConstPointer VertexListPointer
Definition: otbCompacityPathFunction.h:65
otbPathFunction.h
otb::CompacityPathFunction::PathConstPointer
Superclass::InputPathConstPointer PathConstPointer
Definition: otbCompacityPathFunction.h:62
otb::CompacityPathFunction::RealType
double RealType
Definition: otbCompacityPathFunction.h:68
otb::CompacityPathFunction::PathType
Superclass::InputPathType PathType
Definition: otbCompacityPathFunction.h:58