OTB  9.0.0
Orfeo Toolbox
otbRegionImageToRectangularPathListFilter.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 
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
otb::RegionImageToRectangularPathListFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbRegionImageToRectangularPathListFilter.h:51
otbImage.h
otb::RegionImageToRectangularPathListFilter::Superclass
ImageToPathListFilter< TInputImage, TOutputPath > Superclass
Definition: otbRegionImageToRectangularPathListFilter.h:49
otb::Image::IndexType
Superclass::IndexType IndexType
Definition: otbImage.h:142
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::Image
Creation of an "otb" image which contains metadata.
Definition: otbImage.h:89
otb::RegionImageToRectangularPathListFilter::m_CrossTermFormula
int m_CrossTermFormula
Definition: otbRegionImageToRectangularPathListFilter.h:116
otb::RegionImageToRectangularPathListFilter::m_MinimumSize
double m_MinimumSize
Definition: otbRegionImageToRectangularPathListFilter.h:115
otb::RegionImageToRectangularPathListFilter::InputImageRegionType
Superclass::InputImageRegionType InputImageRegionType
Definition: otbRegionImageToRectangularPathListFilter.h:68
otb::RegionImageToRectangularPathListFilter::OutputPathListType
Superclass::OutputPathListType OutputPathListType
Definition: otbRegionImageToRectangularPathListFilter.h:65
otb::RegionImageToRectangularPathListFilter::MarkerImageType
Image< unsigned char, itkGetStaticConstMacro(NDimensions)> MarkerImageType
Definition: otbRegionImageToRectangularPathListFilter.h:121
otb::PathListSource::OutputPathType
TOutputPath OutputPathType
Definition: otbPathListSource.h:64
otb::RegionImageToRectangularPathListFilter::InputImageType
Superclass::InputImageType InputImageType
Definition: otbRegionImageToRectangularPathListFilter.h:67
otb::RegionImageToRectangularPathListFilter::RealType
double RealType
Definition: otbRegionImageToRectangularPathListFilter.h:82
otbImageToPathListFilter.h
otb::RegionImageToRectangularPathListFilter::RealImageTypePointer
RealImageType::Pointer RealImageTypePointer
Definition: otbRegionImageToRectangularPathListFilter.h:85
otbVectorDataSource.h
otb::RegionImageToRectangularPathListFilter::InputImagePointer
InputImageType::Pointer InputImagePointer
Definition: otbRegionImageToRectangularPathListFilter.h:69
otb::RegionImageToRectangularPathListFilter::RealImageTypeIndexType
RealImageType::IndexType RealImageTypeIndexType
Definition: otbRegionImageToRectangularPathListFilter.h:86
otb::RegionImageToRectangularPathListFilter::ValueType
InputImageType::ValueType ValueType
Definition: otbRegionImageToRectangularPathListFilter.h:73
otb::PathListSource::OutputPathPointerType
OutputPathType::Pointer OutputPathPointerType
Definition: otbPathListSource.h:65
otb::RegionImageToRectangularPathListFilter::SizeType
InputImageType::SizeType SizeType
Definition: otbRegionImageToRectangularPathListFilter.h:72
otb::RegionImageToRectangularPathListFilter::markerImage
MarkerImageType::Pointer markerImage
Definition: otbRegionImageToRectangularPathListFilter.h:122
otb::RegionImageToRectangularPathListFilter::PixelType
InputImageType::PixelType PixelType
Definition: otbRegionImageToRectangularPathListFilter.h:74
otbRegionImageToRectangularPathListFilter.hxx
otbVectorData.h
otb::ImageToPathListFilter
Base class used to implement filters that have a image as input and a paths list as output.
Definition: otbImageToPathListFilter.h:39
otb::RegionImageToRectangularPathListFilter::InputImageConstPointer
InputImageType::ConstPointer InputImageConstPointer
Definition: otbRegionImageToRectangularPathListFilter.h:70
otb::RegionImageToRectangularPathListFilter::m_MinimumFit
double m_MinimumFit
Definition: otbRegionImageToRectangularPathListFilter.h:114
otb::ObjectList
This class is a generic all-purpose wrapping around an std::vector<itk::SmartPointer<ObjectType> >.
Definition: otbObjectList.h:40
otb::RegionImageToRectangularPathListFilter::Self
RegionImageToRectangularPathListFilter Self
Definition: otbRegionImageToRectangularPathListFilter.h:48
otb::Image::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbImage.h:97
otb::RegionImageToRectangularPathListFilter::GenerateOutputInformation
void GenerateOutputInformation() override
Definition: otbRegionImageToRectangularPathListFilter.h:109
otb::RegionImageToRectangularPathListFilter
Base class used to implement filter to model regions by rectangles.
Definition: otbRegionImageToRectangularPathListFilter.h:44
otb::RegionImageToRectangularPathListFilter::RealImageType
otb::Image< RealType, InputImageDimension > RealImageType
Definition: otbRegionImageToRectangularPathListFilter.h:84
otb::RegionImageToRectangularPathListFilter::OutputPathType
Superclass::OutputPathType OutputPathType
Definition: otbRegionImageToRectangularPathListFilter.h:76
otb::RegionImageToRectangularPathListFilter::OutputPathPointerType
Superclass::OutputPathPointerType OutputPathPointerType
Definition: otbRegionImageToRectangularPathListFilter.h:78
otb::RegionImageToRectangularPathListFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbRegionImageToRectangularPathListFilter.h:50