OTB  10.0.0
Orfeo Toolbox
otbScalarImageToAdvancedTexturesFilter.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 otbScalarImageToAdvancedTexturesFilter_h
22 #define otbScalarImageToAdvancedTexturesFilter_h
23 
25 #include "itkMacro.h"
26 #include "itkImageToImageFilter.h"
27 
28 namespace otb
29 {
104 template <class TInpuImage, class TOutputImage>
105 class ScalarImageToAdvancedTexturesFilter : public itk::ImageToImageFilter<TInpuImage, TOutputImage>
106 {
107 public:
108 
111  typedef itk::ImageToImageFilter<TInpuImage, TOutputImage> Superclass;
112  typedef itk::SmartPointer<Self> Pointer;
113  typedef itk::SmartPointer<const Self> ConstPointer;
114 
116  itkNewMacro(Self);
117 
119  itkTypeMacro(ScalarImageToAdvancedTexturesFilter, ImageToImageFilter);
120 
122  typedef TInpuImage InputImageType;
123  typedef typename InputImageType::Pointer InputImagePointerType;
124  typedef typename InputImageType::PixelType InputPixelType;
125  typedef typename InputImageType::RegionType InputRegionType;
126  typedef typename InputImageType::OffsetType OffsetType;
127  typedef typename InputRegionType::SizeType SizeType;
128  typedef TOutputImage OutputImageType;
129  typedef typename OutputImageType::Pointer OutputImagePointerType;
130  typedef typename OutputImageType::RegionType OutputRegionType;
131 
139 
140  typedef typename VectorType::iterator VectorIteratorType;
141  typedef typename VectorType::const_iterator VectorConstIteratorType;
142 
144  itkSetMacro(Radius, SizeType);
145 
147  itkGetMacro(Radius, SizeType);
148 
150  itkSetMacro(Offset, OffsetType);
151 
153  itkGetMacro(Offset, OffsetType);
154 
156  itkSetMacro(NumberOfBinsPerAxis, unsigned int);
157 
159  itkGetMacro(NumberOfBinsPerAxis, unsigned int);
160 
162  itkSetMacro(InputImageMinimum, InputPixelType);
163 
165  itkGetMacro(InputImageMinimum, InputPixelType);
166 
168  itkSetMacro(InputImageMaximum, InputPixelType);
169 
171  itkGetMacro(InputImageMaximum, InputPixelType);
172 
174  itkSetMacro(SubsampleFactor, SizeType);
175 
177  itkGetMacro(SubsampleFactor, SizeType);
178 
180  itkSetMacro(SubsampleOffset, OffsetType);
181 
183  itkGetMacro(SubsampleOffset, OffsetType);
184 
187 
190 
193 
196 
199 
202 
205 
208 
211 
214 
215 protected:
218 
221 
223  void GenerateOutputInformation() override;
224 
226  void GenerateInputRequestedRegion() override;
227 
229  void BeforeThreadedGenerateData() override;
230 
232  void DynamicThreadedGenerateData(const OutputRegionType& outputRegion) override;
233 
234 private:
236  void operator=(const Self&) = delete;
237 
239  static OutputRegionType RegionUnion(const OutputRegionType& region1, const OutputRegionType& region2);
240 
243 
246 
249 
251  unsigned int m_NumberOfBinsPerAxis;
252 
255 
258 
261 
264 };
265 } // End namespace otb
266 
267 #ifndef OTB_MANUAL_INSTANTIATION
269 #endif
270 
271 #endif
This class holds a VectorType of CooccurrencePairType with each pair is a combination of pixel index ...
itk::NumericTraits< FrequencyType >::RealType RelativeFrequencyType
itk::NumericTraits< PixelType >::RealType PixelValueType
In this case, 10 advanced texture features will be processed. The 10 output image channels are: Mean,...
CooccurrenceIndexedListType::Pointer CooccurrenceIndexedListPointerType
itk::ImageToImageFilter< TInpuImage, TOutputImage > Superclass
static OutputRegionType RegionUnion(const OutputRegionType &region1, const OutputRegionType &region2)
CooccurrenceIndexedListType::IndexType CooccurrenceIndexType
void operator=(const Self &)=delete
CooccurrenceIndexedListType::PixelValueType PixelValueType
CooccurrenceIndexedListType::ConstPointer CooccurrenceIndexedListConstPointerType
GreyLevelCooccurrenceIndexedList< InputPixelType > CooccurrenceIndexedListType
CooccurrenceIndexedListType::RelativeFrequencyType RelativeFrequencyType
ScalarImageToAdvancedTexturesFilter(const Self &)=delete
void DynamicThreadedGenerateData(const OutputRegionType &outputRegion) override
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.