OTB  6.7.0
Orfeo Toolbox
otbPointSetExtractROI.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2019 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 otbPointSetExtractROI_h
22 #define otbPointSetExtractROI_h
23 
25 #include "itkTransform.h"
26 
27 namespace otb
28 {
29 
43 template <class TInputPointSet, class TOutputPointSet>
44 class ITK_EXPORT PointSetExtractROI :
45  public PointSetToPointSetFilter<TInputPointSet, TOutputPointSet>
46 {
47 public:
53 
54  typedef TInputPointSet InputPointSetType;
55  typedef TOutputPointSet OutputPointSetType;
56  typedef typename InputPointSetType::Pointer InputPointSetPointer;
57  typedef typename OutputPointSetType::Pointer OutputPointSetPointer;
58 
60  typedef typename TInputPointSet::CoordRepType CoordRepType;
61 
63  itkNewMacro(Self);
64 
67 
69  itkGetMacro(StartX, unsigned long);
70  itkGetMacro(StartY, unsigned long);
71  itkSetMacro(StartX, unsigned long);
72  itkSetMacro(StartY, unsigned long);
73 
75  itkGetMacro(SizeX, unsigned long);
76  itkGetMacro(SizeY, unsigned long);
77  itkSetMacro(SizeX, unsigned long);
78  itkSetMacro(SizeY, unsigned long);
80 
81 protected:
83  ~PointSetExtractROI() override {}
84  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
85 
87  void GenerateData(void) override;
88 
89 private:
90  PointSetExtractROI(const PointSetExtractROI &) = delete;
91  void operator =(const PointSetExtractROI&) = delete;
92 
94  unsigned long m_StartX;
95  unsigned long m_StartY;
96 
98  unsigned long m_SizeX;
99  unsigned long m_SizeY;
100 };
101 
102 } // end namespace otb
103 
104 #ifndef OTB_MANUAL_INSTANTIATION
105 #include "otbPointSetExtractROI.hxx"
106 #endif
107 
108 #endif
InputPointSetType::Pointer InputPointSetPointer
itk::SmartPointer< Self > Pointer
TInputPointSet::CoordRepType CoordRepType
PointSetToPointSetFilter< TInputPointSet, TOutputPointSet > Superclass
TOutputPointSet OutputPointSetType
itk::SmartPointer< const Self > ConstPointer
Extract a part of the points specified by a region.
Base class to process PointSet data.
OutputPointSetType::Pointer OutputPointSetPointer