OTB  9.0.0
Orfeo Toolbox
otbImageFittingPolygonListFilter.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 otbImageFittingPolygonListFilter_h
22 #define otbImageFittingPolygonListFilter_h
23 
25 #include "otbMacro.h"
26 #include "itkLineConstIterator.h"
27 
28 namespace otb
29 {
39 template <class TPath, class TImage>
41 {
42 public:
46  typedef itk::SmartPointer<Self> Pointer;
47  typedef itk::SmartPointer<const Self> ConstPointer;
48 
50  itkNewMacro(Self);
51 
54 
56  typedef typename Superclass::PathType PathType;
61  typedef typename PathType::VertexType VertexType;
62  typedef typename PathType::VertexListType VertexListType;
63  typedef typename VertexListType::ConstIterator VertexListConstIteratorType;
64  typedef double RealType;
65 
66  typedef TImage ImageType;
67  typedef typename ImageType::Pointer ImagePointerType;
68  typedef typename ImageType::ConstPointer ImageConstPointerType;
69 
70  typedef itk::LineConstIterator<ImageType> LineConstIteratorType;
71 
76  void SetInputImage(const ImageType* image);
77 
82  const ImageType* GetInputImage(void);
83 
85  itkSetMacro(Radius, unsigned int);
86  itkGetMacro(Radius, unsigned int);
88 
90  itkSetMacro(NumberOfIterations, unsigned int);
91  itkGetMacro(NumberOfIterations, unsigned int);
93 
94 protected:
97 
100  {
101  }
102 
104  void GenerateData() override;
105 
107  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
108 
109  virtual double computeValue(ImageConstPointerType image, VertexType middlePoint, VertexType previousPoint, VertexType nextPoint) const;
110 
111  unsigned int m_Radius;
112  unsigned int m_NumberOfIterations;
113 
114 private:
115  ImageFittingPolygonListFilter(const Self&) = delete;
116  void operator=(const Self&) = delete;
117 };
118 } // End namespace otb
119 #ifndef OTB_MANUAL_INSTANTIATION
121 #endif
122 
123 #endif
otb::ImageFittingPolygonListFilter::LineConstIteratorType
itk::LineConstIterator< ImageType > LineConstIteratorType
Definition: otbImageFittingPolygonListFilter.h:70
otb::ImageFittingPolygonListFilter::m_NumberOfIterations
unsigned int m_NumberOfIterations
Definition: otbImageFittingPolygonListFilter.h:112
otb::ImageFittingPolygonListFilter::~ImageFittingPolygonListFilter
~ImageFittingPolygonListFilter() override
Definition: otbImageFittingPolygonListFilter.h:99
otb::ImageFittingPolygonListFilter::m_Radius
unsigned int m_Radius
Definition: otbImageFittingPolygonListFilter.h:111
otb::ImageFittingPolygonListFilter::Superclass
PathListToPathListFilter< TPath > Superclass
Definition: otbImageFittingPolygonListFilter.h:45
otb::ObjectList::ConstIterator
ConstIterator of the object list.
Definition: otbObjectList.h:300
otb::PathListToPathListFilter
Base class for filter taking a PathList as input a returning a PathList.
Definition: otbPathListToPathListFilter.h:35
otb::ImageFittingPolygonListFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbImageFittingPolygonListFilter.h:46
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::ImageFittingPolygonListFilter::ImageType
TImage ImageType
Definition: otbImageFittingPolygonListFilter.h:66
otb::ImageFittingPolygonListFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbImageFittingPolygonListFilter.h:47
otb::PathListToPathListFilter::PathPointerType
PathType::Pointer PathPointerType
Definition: otbPathListToPathListFilter.h:53
otbMacro.h
otb::ImageFittingPolygonListFilter::Self
ImageFittingPolygonListFilter Self
Definition: otbImageFittingPolygonListFilter.h:44
otb::ImageFittingPolygonListFilter::VertexListConstIteratorType
VertexListType::ConstIterator VertexListConstIteratorType
Definition: otbImageFittingPolygonListFilter.h:63
otb::ImageFittingPolygonListFilter::VertexListType
PathType::VertexListType VertexListType
Definition: otbImageFittingPolygonListFilter.h:62
otb::ObjectList::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbObjectList.h:46
otb::ImageFittingPolygonListFilter::ImagePointerType
ImageType::Pointer ImagePointerType
Definition: otbImageFittingPolygonListFilter.h:67
otb::ImageFittingPolygonListFilter::ImageConstPointerType
ImageType::ConstPointer ImageConstPointerType
Definition: otbImageFittingPolygonListFilter.h:68
otbImageFittingPolygonListFilter.hxx
otb::ImageFittingPolygonListFilter::PathListType
Superclass::PathListType PathListType
Definition: otbImageFittingPolygonListFilter.h:57
otb::ImageFittingPolygonListFilter::VertexType
PathType::VertexType VertexType
Definition: otbImageFittingPolygonListFilter.h:61
otb::ImageFittingPolygonListFilter::PathPointerType
Superclass::PathPointerType PathPointerType
Definition: otbImageFittingPolygonListFilter.h:58
otbPathListToPathListFilter.h
otb::ImageFittingPolygonListFilter::PathListPointerType
PathListType::Pointer PathListPointerType
Definition: otbImageFittingPolygonListFilter.h:59
otb::ImageFittingPolygonListFilter
Slightly deform polygon to reach higher energy from the image.
Definition: otbImageFittingPolygonListFilter.h:40
otb::ImageFittingPolygonListFilter::PathType
Superclass::PathType PathType
Definition: otbImageFittingPolygonListFilter.h:53
otb::ObjectList
This class is a generic all-purpose wrapping around an std::vector<itk::SmartPointer<ObjectType> >.
Definition: otbObjectList.h:40
otb::PathListToPathListFilter::PathType
Superclass::InputObjectType PathType
Definition: otbPathListToPathListFilter.h:48
otb::ImageFittingPolygonListFilter::RealType
double RealType
Definition: otbImageFittingPolygonListFilter.h:64
otb::ImageFittingPolygonListFilter::IteratorType
PathListType::ConstIterator IteratorType
Definition: otbImageFittingPolygonListFilter.h:60