OTB  10.0.0
Orfeo Toolbox
otbSarBurstExtractionImageFilter.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 otbSarBurstExtractionImageFilter_h
22 #define otbSarBurstExtractionImageFilter_h
23 
24 #include "itkImageToImageFilter.h"
25 #include "itkSmartPointer.h"
26 
27 namespace otb
28 {
48 template <class TImage>
49 class ITK_EXPORT SarBurstExtractionImageFilter : 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(SarBurstExtractionImageFilter, 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(BurstIndex, unsigned int);
70  itkSetMacro(AllPixels, bool);
71 
72 protected:
73  // Constructor
75 
76  // Destructor
77  ~SarBurstExtractionImageFilter() override = default;
78 
79  // Needs to be re-implemented since size of output is modified
80  virtual void GenerateOutputInformation() override;
81 
82  // Needs to be re-implemented since size of output is modified
83  virtual void GenerateInputRequestedRegion() override;
84 
85  // Actual processing
86  virtual void DynamicThreadedGenerateData(const RegionType& outputRegionForThread) override;
87 
88  RegionType OutputRegionToInputRegion(const RegionType& outputRegion) const;
89 
90 private:
92  void operator=(const Self&) = delete;
93 
94  // Pair for sample valid selection
96 
97  // Pair for sample valid selection
99 
100  // Burst index
101  unsigned int m_BurstIndex;
102 
103  // Mode for extraction :
104  // If true : all pixels of the burst are selected
105  // If false : only valid pixels are selected
107 };
108 
109 } // End namespace otb
110 
111 #ifndef OTB_MANUAL_INSTANTIATION
113 #endif
114 
115 
116 #endif
Performs a burst extraction by keeping only lines and samples of a required Burst.
itk::ImageToImageFilter< TImage, TImage > Superclass
void operator=(const Self &)=delete
SarBurstExtractionImageFilter(const Self &)=delete
~SarBurstExtractionImageFilter() override=default
std::pair< unsigned long, unsigned long > RecordType
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.