OTB  10.0.0
Orfeo Toolbox
otbSarDeburstImageFilter.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 otbSarDeburstImageFilter_h
22 #define otbSarDeburstImageFilter_h
23 
24 #include "itkImageToImageFilter.h"
25 #include "itkSmartPointer.h"
26 
27 namespace otb
28 {
48 template <class TImage>
49 class ITK_EXPORT SarDeburstImageFilter : public itk::ImageToImageFilter<TImage, TImage>
50 {
51 public:
52  // Standard class typedefs
54  typedef itk::ImageToImageFilter<TImage, TImage> Superclass;
55  typedef itk::SmartPointer<Self> Pointer;
56  typedef itk::SmartPointer<const Self> ConstPointer;
57 
58  itkNewMacro(Self);
59  itkTypeMacro(SarDeburstImageFilter, ImageToImageFilter);
60 
61  typedef TImage ImageType;
62  typedef typename ImageType::RegionType RegionType;
63  typedef typename ImageType::PointType PointType;
64 
65  typedef std::pair<unsigned long, unsigned long> RecordType;
66  typedef std::vector<RecordType> LinesRecordVectorType;
67 
68  // Setter
69  itkSetMacro(OnlyValidSample, bool);
70 
71 protected:
72  // Constructor
74 
75  // Destructor
77 
78  // Needs to be re-implemented since size of output is modified
79  void GenerateOutputInformation() override;
80 
81  // Needs to be re-implemented since size of output is modified
82  void GenerateInputRequestedRegion() override;
83 
84  // Actual processing
85  void DynamicThreadedGenerateData(const RegionType& outputRegionForThread) override;
86 
87  void ThreadedGenerateDataWithAllSamples(const RegionType& outputRegionForThread, itk::ThreadIdType threadId);
88  void ThreadedGenerateDataWithOnlyValidSamples(const RegionType& outputRegionForThread, itk::ThreadIdType threadId);
89 
90  RegionType OutputRegionToInputRegion(const RegionType& outputRegion) const;
91 
92 private:
93  SarDeburstImageFilter(const Self&) = delete;
94  void operator=(const Self&) = delete;
95 
96  // Vector of line records
98 
99  // Pair for sample valid selection
101 
103 };
104 
105 } // End namespace otb
106 
107 #ifndef OTB_MANUAL_INSTANTIATION
109 #endif
110 
111 
112 #endif
Performs a deburst operation by removing redundant lines.
itk::ImageToImageFilter< TImage, TImage > Superclass
itk::SmartPointer< const Self > ConstPointer
SarDeburstImageFilter(const Self &)=delete
std::pair< unsigned long, unsigned long > RecordType
itk::SmartPointer< Self > Pointer
LinesRecordVectorType m_LinesRecord
void operator=(const Self &)=delete
std::vector< RecordType > LinesRecordVectorType
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.