OTB  9.0.0
Orfeo Toolbox
otbSarDeburstImageFilter.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 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
76  virtual ~SarDeburstImageFilter() override{};
77 
78  // Needs to be re-implemented since size of output is modified
79  virtual void GenerateOutputInformation() override;
80 
81  // Needs to be re-implemented since size of output is modified
82  virtual void GenerateInputRequestedRegion() override;
83 
84  // Actual processing
85  virtual void ThreadedGenerateData(const RegionType& outputRegionForThread, itk::ThreadIdType threadId) 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
otb::SarDeburstImageFilter::m_SamplesRecord
RecordType m_SamplesRecord
Definition: otbSarDeburstImageFilter.h:100
otb::SarDeburstImageFilter::m_OnlyValidSample
bool m_OnlyValidSample
Definition: otbSarDeburstImageFilter.h:102
otbSarDeburstImageFilter.hxx
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::SarDeburstImageFilter::ImageType
TImage ImageType
Definition: otbSarDeburstImageFilter.h:59
otb::SarDeburstImageFilter::RecordType
std::pair< unsigned long, unsigned long > RecordType
Definition: otbSarDeburstImageFilter.h:65
otb::SarDeburstImageFilter::LinesRecordVectorType
std::vector< RecordType > LinesRecordVectorType
Definition: otbSarDeburstImageFilter.h:66
otb::SarDeburstImageFilter::m_LinesRecord
LinesRecordVectorType m_LinesRecord
Definition: otbSarDeburstImageFilter.h:97
otb::SarDeburstImageFilter::Self
SarDeburstImageFilter Self
Definition: otbSarDeburstImageFilter.h:53
otb::SarDeburstImageFilter::~SarDeburstImageFilter
virtual ~SarDeburstImageFilter() override
Definition: otbSarDeburstImageFilter.h:76
otb::SarDeburstImageFilter::Superclass
itk::ImageToImageFilter< TImage, TImage > Superclass
Definition: otbSarDeburstImageFilter.h:54
otb::SarDeburstImageFilter::RegionType
ImageType::RegionType RegionType
Definition: otbSarDeburstImageFilter.h:62
otb::SarDeburstImageFilter
Performs a deburst operation by removing redundant lines.
Definition: otbSarDeburstImageFilter.h:49
otb::SarDeburstImageFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbSarDeburstImageFilter.h:55
otb::SarDeburstImageFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbSarDeburstImageFilter.h:56
otb::SarDeburstImageFilter::PointType
ImageType::PointType PointType
Definition: otbSarDeburstImageFilter.h:63