OTB  9.0.0
Orfeo Toolbox
otbSarBurstExtractionImageFilter.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 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 ThreadedGenerateData(const RegionType& outputRegionForThread, itk::ThreadIdType threadId) override;
87 
88  RegionType OutputRegionToInputRegion(const RegionType& outputRegion) const;
89 
90 private:
91  SarBurstExtractionImageFilter(const Self&) = delete;
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
otb::SarBurstExtractionImageFilter::RecordType
std::pair< unsigned long, unsigned long > RecordType
Definition: otbSarBurstExtractionImageFilter.h:65
otb::SarBurstExtractionImageFilter::m_BurstIndex
unsigned int m_BurstIndex
Definition: otbSarBurstExtractionImageFilter.h:101
otb::SarBurstExtractionImageFilter::LinesRecordVectorType
std::vector< RecordType > LinesRecordVectorType
Definition: otbSarBurstExtractionImageFilter.h:66
otb::SarBurstExtractionImageFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbSarBurstExtractionImageFilter.h:55
otb::SarBurstExtractionImageFilter::ImageType
TImage ImageType
Definition: otbSarBurstExtractionImageFilter.h:59
otb::SarBurstExtractionImageFilter::Superclass
itk::ImageToImageFilter< TImage, TImage > Superclass
Definition: otbSarBurstExtractionImageFilter.h:54
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::SarBurstExtractionImageFilter
Performs a burst extraction by keeping only lines and samples of a required Burst.
Definition: otbSarBurstExtractionImageFilter.h:49
otb::SarBurstExtractionImageFilter::m_AllPixels
bool m_AllPixels
Definition: otbSarBurstExtractionImageFilter.h:106
otbSarBurstExtractionImageFilter.hxx
otb::SarBurstExtractionImageFilter::m_LinesRecord
RecordType m_LinesRecord
Definition: otbSarBurstExtractionImageFilter.h:95
otb::SarBurstExtractionImageFilter::PointType
ImageType::PointType PointType
Definition: otbSarBurstExtractionImageFilter.h:63
otb::SarBurstExtractionImageFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbSarBurstExtractionImageFilter.h:56
otb::SarBurstExtractionImageFilter::RegionType
ImageType::RegionType RegionType
Definition: otbSarBurstExtractionImageFilter.h:62
otb::SarBurstExtractionImageFilter::Self
SarBurstExtractionImageFilter Self
Definition: otbSarBurstExtractionImageFilter.h:53
otb::SarBurstExtractionImageFilter::m_SamplesRecord
RecordType m_SamplesRecord
Definition: otbSarBurstExtractionImageFilter.h:98