OTB  9.0.0
Orfeo Toolbox
otbScalarImageToAdvancedTexturesFilter.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 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 ThreadedGenerateData(const OutputRegionType& outputRegion, itk::ThreadIdType threadId) override;
233 
234 private:
235  ScalarImageToAdvancedTexturesFilter(const Self&) = delete;
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
otb::ScalarImageToAdvancedTexturesFilter::GetSumAverageOutput
OutputImageType * GetSumAverageOutput()
Definition: otbScalarImageToAdvancedTexturesFilter.hxx:103
otb::ScalarImageToAdvancedTexturesFilter::VectorIteratorType
VectorType::iterator VectorIteratorType
Definition: otbScalarImageToAdvancedTexturesFilter.h:140
otb::ScalarImageToAdvancedTexturesFilter::RegionUnion
static OutputRegionType RegionUnion(const OutputRegionType &region1, const OutputRegionType &region2)
otb::GreyLevelCooccurrenceIndexedList::RelativeFrequencyType
itk::NumericTraits< FrequencyType >::RealType RelativeFrequencyType
Definition: otbGreyLevelCooccurrenceIndexedList.h:91
otb::ScalarImageToAdvancedTexturesFilter::InputPixelType
InputImageType::PixelType InputPixelType
Definition: otbScalarImageToAdvancedTexturesFilter.h:124
otb::ScalarImageToAdvancedTexturesFilter::GetIC1Output
OutputImageType * GetIC1Output()
Definition: otbScalarImageToAdvancedTexturesFilter.hxx:158
otb::ScalarImageToAdvancedTexturesFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbScalarImageToAdvancedTexturesFilter.h:113
otb::ScalarImageToAdvancedTexturesFilter::OutputRegionType
OutputImageType::RegionType OutputRegionType
Definition: otbScalarImageToAdvancedTexturesFilter.h:130
otb::GreyLevelCooccurrenceIndexedList::PixelValueType
itk::NumericTraits< PixelType >::RealType PixelValueType
Definition: otbGreyLevelCooccurrenceIndexedList.h:94
otb::ScalarImageToAdvancedTexturesFilter::OutputImagePointerType
OutputImageType::Pointer OutputImagePointerType
Definition: otbScalarImageToAdvancedTexturesFilter.h:129
otbScalarImageToAdvancedTexturesFilter.hxx
otb::ScalarImageToAdvancedTexturesFilter::GenerateInputRequestedRegion
void GenerateInputRequestedRegion() override
Definition: otbScalarImageToAdvancedTexturesFilter.hxx:209
otb::ScalarImageToAdvancedTexturesFilter::BeforeThreadedGenerateData
void BeforeThreadedGenerateData() override
Definition: otbScalarImageToAdvancedTexturesFilter.hxx:272
otb::ScalarImageToAdvancedTexturesFilter::PixelValueType
CooccurrenceIndexedListType::PixelValueType PixelValueType
Definition: otbScalarImageToAdvancedTexturesFilter.h:136
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::ScalarImageToAdvancedTexturesFilter::GetSumVarianceOutput
OutputImageType * GetSumVarianceOutput()
Definition: otbScalarImageToAdvancedTexturesFilter.hxx:114
otb::GreyLevelCooccurrenceIndexedList::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbGreyLevelCooccurrenceIndexedList.h:72
otb::ScalarImageToAdvancedTexturesFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbScalarImageToAdvancedTexturesFilter.h:112
otb::ScalarImageToAdvancedTexturesFilter::GenerateOutputInformation
void GenerateOutputInformation() override
Definition: otbScalarImageToAdvancedTexturesFilter.hxx:179
otb::ScalarImageToAdvancedTexturesFilter::m_InputImageMaximum
InputPixelType m_InputImageMaximum
Definition: otbScalarImageToAdvancedTexturesFilter.h:257
otb::GreyLevelCooccurrenceIndexedList::VectorType
std::vector< CooccurrencePairType > VectorType
Definition: otbGreyLevelCooccurrenceIndexedList.h:111
otb::ScalarImageToAdvancedTexturesFilter::m_Radius
SizeType m_Radius
Definition: otbScalarImageToAdvancedTexturesFilter.h:242
otb::ScalarImageToAdvancedTexturesFilter::CooccurrenceIndexedListType
GreyLevelCooccurrenceIndexedList< InputPixelType > CooccurrenceIndexedListType
Definition: otbScalarImageToAdvancedTexturesFilter.h:132
otb::ScalarImageToAdvancedTexturesFilter::Self
ScalarImageToAdvancedTexturesFilter Self
Definition: otbScalarImageToAdvancedTexturesFilter.h:110
otb::ScalarImageToAdvancedTexturesFilter::ThreadedGenerateData
void ThreadedGenerateData(const OutputRegionType &outputRegion, itk::ThreadIdType threadId) override
Definition: otbScalarImageToAdvancedTexturesFilter.hxx:287
otb::ScalarImageToAdvancedTexturesFilter::GetDifferenceVarianceOutput
OutputImageType * GetDifferenceVarianceOutput()
Definition: otbScalarImageToAdvancedTexturesFilter.hxx:147
otb::ScalarImageToAdvancedTexturesFilter::GetDifferenceEntropyOutput
OutputImageType * GetDifferenceEntropyOutput()
Definition: otbScalarImageToAdvancedTexturesFilter.hxx:136
otb::ScalarImageToAdvancedTexturesFilter::CooccurrenceIndexType
CooccurrenceIndexedListType::IndexType CooccurrenceIndexType
Definition: otbScalarImageToAdvancedTexturesFilter.h:135
otb::ScalarImageToAdvancedTexturesFilter::VectorConstIteratorType
VectorType::const_iterator VectorConstIteratorType
Definition: otbScalarImageToAdvancedTexturesFilter.h:141
otb::ScalarImageToAdvancedTexturesFilter::m_NumberOfBinsPerAxis
unsigned int m_NumberOfBinsPerAxis
Definition: otbScalarImageToAdvancedTexturesFilter.h:251
otb::ScalarImageToAdvancedTexturesFilter::GetVarianceOutput
OutputImageType * GetVarianceOutput()
Definition: otbScalarImageToAdvancedTexturesFilter.hxx:81
otb::ScalarImageToAdvancedTexturesFilter::OffsetType
InputImageType::OffsetType OffsetType
Definition: otbScalarImageToAdvancedTexturesFilter.h:126
otbGreyLevelCooccurrenceIndexedList.h
otb::ScalarImageToAdvancedTexturesFilter::m_SubsampleFactor
SizeType m_SubsampleFactor
Definition: otbScalarImageToAdvancedTexturesFilter.h:260
otb::ScalarImageToAdvancedTexturesFilter::CooccurrenceIndexedListPointerType
CooccurrenceIndexedListType::Pointer CooccurrenceIndexedListPointerType
Definition: otbScalarImageToAdvancedTexturesFilter.h:133
otb::ScalarImageToAdvancedTexturesFilter::RelativeFrequencyType
CooccurrenceIndexedListType::RelativeFrequencyType RelativeFrequencyType
Definition: otbScalarImageToAdvancedTexturesFilter.h:137
otb::ScalarImageToAdvancedTexturesFilter::InputImagePointerType
InputImageType::Pointer InputImagePointerType
Definition: otbScalarImageToAdvancedTexturesFilter.h:123
otb::ScalarImageToAdvancedTexturesFilter::GetIC2Output
OutputImageType * GetIC2Output()
Definition: otbScalarImageToAdvancedTexturesFilter.hxx:169
otb::ScalarImageToAdvancedTexturesFilter
In this case, 10 advanced texture features will be processed. The 10 output image channels are: Mean,...
Definition: otbScalarImageToAdvancedTexturesFilter.h:105
otb::ScalarImageToAdvancedTexturesFilter::m_SubsampleOffset
OffsetType m_SubsampleOffset
Definition: otbScalarImageToAdvancedTexturesFilter.h:263
otb::ScalarImageToAdvancedTexturesFilter::~ScalarImageToAdvancedTexturesFilter
~ScalarImageToAdvancedTexturesFilter() override
Definition: otbScalarImageToAdvancedTexturesFilter.hxx:65
otb::ScalarImageToAdvancedTexturesFilter::OutputImageType
TOutputImage OutputImageType
Definition: otbScalarImageToAdvancedTexturesFilter.h:128
otb::GreyLevelCooccurrenceIndexedList::IndexType
itk::Index< PixelPairSize > IndexType
Definition: otbGreyLevelCooccurrenceIndexedList.h:85
otb::ScalarImageToAdvancedTexturesFilter::GetDissimilarityOutput
OutputImageType * GetDissimilarityOutput()
Definition: otbScalarImageToAdvancedTexturesFilter.hxx:92
otb::GreyLevelCooccurrenceIndexedList::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbGreyLevelCooccurrenceIndexedList.h:73
otb::ScalarImageToAdvancedTexturesFilter::m_Offset
OffsetType m_Offset
Definition: otbScalarImageToAdvancedTexturesFilter.h:245
otb::ScalarImageToAdvancedTexturesFilter::ScalarImageToAdvancedTexturesFilter
ScalarImageToAdvancedTexturesFilter()
Definition: otbScalarImageToAdvancedTexturesFilter.hxx:35
otb::ScalarImageToAdvancedTexturesFilter::GetSumEntropyOutput
OutputImageType * GetSumEntropyOutput()
Definition: otbScalarImageToAdvancedTexturesFilter.hxx:125
otb::ScalarImageToAdvancedTexturesFilter::VectorType
CooccurrenceIndexedListType::VectorType VectorType
Definition: otbScalarImageToAdvancedTexturesFilter.h:138
otb::GreyLevelCooccurrenceIndexedList
This class holds a VectorType of CooccurrencePairType with each pair is a combination of pixel index ...
Definition: otbGreyLevelCooccurrenceIndexedList.h:66
otb::ScalarImageToAdvancedTexturesFilter::InputRegionType
InputImageType::RegionType InputRegionType
Definition: otbScalarImageToAdvancedTexturesFilter.h:125
otb::ScalarImageToAdvancedTexturesFilter::CooccurrenceIndexedListConstPointerType
CooccurrenceIndexedListType::ConstPointer CooccurrenceIndexedListConstPointerType
Definition: otbScalarImageToAdvancedTexturesFilter.h:134
otb::ScalarImageToAdvancedTexturesFilter::InputImageType
TInpuImage InputImageType
Definition: otbScalarImageToAdvancedTexturesFilter.h:119
otb::ScalarImageToAdvancedTexturesFilter::SizeType
InputRegionType::SizeType SizeType
Definition: otbScalarImageToAdvancedTexturesFilter.h:127
otb::ScalarImageToAdvancedTexturesFilter::GetMeanOutput
OutputImageType * GetMeanOutput()
Definition: otbScalarImageToAdvancedTexturesFilter.hxx:70
otb::ScalarImageToAdvancedTexturesFilter::Superclass
itk::ImageToImageFilter< TInpuImage, TOutputImage > Superclass
Definition: otbScalarImageToAdvancedTexturesFilter.h:111
otb::ScalarImageToAdvancedTexturesFilter::m_InputImageMinimum
InputPixelType m_InputImageMinimum
Definition: otbScalarImageToAdvancedTexturesFilter.h:254
otb::ScalarImageToAdvancedTexturesFilter::operator=
void operator=(const Self &)=delete
otb::ScalarImageToAdvancedTexturesFilter::m_NeighborhoodRadius
SizeType m_NeighborhoodRadius
Definition: otbScalarImageToAdvancedTexturesFilter.h:248