OTB  10.0.0
Orfeo Toolbox
otbRegionImageToRectangularPathListFilter.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 
22 // Adapted from otbImageToPathListAlignFilter.h
23 #ifndef otbRegionImageToRectangularPathListFilter_h
24 #define otbRegionImageToRectangularPathListFilter_h
25 
26 #include "itkImageSource.h"
27 #include "itkConceptChecking.h"
28 #include "otbImage.h"
30 #include <vector>
31 #include "otbVectorDataSource.h"
32 #include "otbVectorData.h"
33 
34 namespace otb
35 {
36 
43 template <class TInputImage, class TOutputPath>
44 class ITK_EXPORT RegionImageToRectangularPathListFilter : public ImageToPathListFilter<TInputImage, TOutputPath>
45 {
46 public:
50  typedef itk::SmartPointer<Self> Pointer;
51  typedef itk::SmartPointer<const Self> ConstPointer;
52 
54  itkNewMacro(Self);
55 
58  // itkTypeMacro(ImageToPathListAlignFilter, itk::ImageSource);
60 
62  itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
63 
66 
67  typedef typename Superclass::InputImageType InputImageType;
68  typedef typename Superclass::InputImageRegionType InputImageRegionType;
69  typedef typename InputImageType::Pointer InputImagePointer;
70  typedef typename InputImageType::ConstPointer InputImageConstPointer;
71 
72  typedef typename InputImageType::SizeType SizeType;
73  typedef typename InputImageType::ValueType ValueType;
74  typedef typename InputImageType::PixelType PixelType;
75 
77  // typedef typename Superclass::OutputPathListType OutputPathListType;
79 
80  // typedef float RealType;
81  // typedef typename itk::NumericTraits<PixelType>::RealType RealType;
82  typedef double RealType;
83  // typedef typename itk::Image<RealType, InputImageDimension> RealImageType;
87 
89  itkSetMacro(MinimumFit, double);
90  itkGetConstReferenceMacro(MinimumFit, double);
92 
94  itkSetMacro(MinimumSize, double);
95  itkGetConstReferenceMacro(MinimumSize, double);
97 
98  // jgc
103  itkStaticConstMacro(NDimensions, unsigned int, TInputImage::ImageDimension);
104 
105 protected:
108 
110  {
111  } // do nothing
112  void GenerateData() override;
113 
114  double m_MinimumFit;
117 
118  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
119 
120  // jgc
121  typedef Image<unsigned char, itkGetStaticConstMacro(NDimensions)> MarkerImageType;
123 
124 private:
126  void operator=(const Self&) = delete;
127 };
128 
129 } // end namespace otb
130 
131 #ifndef OTB_MANUAL_INSTANTIATION
133 #endif
134 
135 #endif
Base class used to implement filters that have a image as input and a paths list as output.
Creation of an "otb" image which contains metadata.
Definition: otbImage.h:92
itk::SmartPointer< Self > Pointer
Definition: otbImage.h:97
Superclass::IndexType IndexType
Definition: otbImage.h:142
This class is a generic all-purpose wrapping around an std::vector<itk::SmartPointer<ObjectType> >.
Definition: otbObjectList.h:41
OutputPathType::Pointer OutputPathPointerType
TOutputPath OutputPathType
Base class used to implement filter to model regions by rectangles.
RegionImageToRectangularPathListFilter(const Self &)=delete
Image< unsigned char, itkGetStaticConstMacro(NDimensions)> MarkerImageType
ImageToPathListFilter< TInputImage, TOutputPath > Superclass
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.