OTB  10.0.0
Orfeo Toolbox
otbCompacityPathFunction.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 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 
56 
58  itkNewMacro(Self);
59 
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
Calculate the compacity of a path. The formula of the compacity is :
VertexListType::ConstPointer VertexListPointer
itk::SmartPointer< const Self > ConstPointer
CompacityPathFunction(const Self &)=delete
PathFunction< TInputPath, TOutput > Superclass
Superclass::InputPathType PathType
itk::VectorContainer< unsigned, VertexType > VertexListType
Superclass::InputPathConstPointer PathConstPointer
PathType::ContinuousIndexType VertexType
itk::SmartPointer< Self > Pointer
void operator=(const Self &)=delete
Evaluates a function of an image over a specific path.
Superclass::InputType InputPathType
InputPathType::ConstPointer InputPathConstPointer
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.