OTB  9.0.0
Orfeo Toolbox
otbScalarImageToHigherOrderTexturesFilter.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 otbScalarImageToHigherOrderTexturesFilter_h
22 #define otbScalarImageToHigherOrderTexturesFilter_h
23 
24 #include "itkImageToImageFilter.h"
25 #include "itkScalarImageToRunLengthFeaturesFilter.h"
26 
27 namespace otb
28 {
72 template <class TInpuImage, class TOutputImage>
73 class ScalarImageToHigherOrderTexturesFilter : public itk::ImageToImageFilter<TInpuImage, TOutputImage>
74 {
75 public:
78  typedef itk::ImageToImageFilter<TInpuImage, TOutputImage> Superclass;
79  typedef itk::SmartPointer<Self> Pointer;
80  typedef itk::SmartPointer<const Self> ConstPointer;
81 
83  itkNewMacro(Self);
84 
86  itkTypeMacro(ScalarImageToHigherOrderTexturesFilter, ImageToImageFilter);
87 
89  typedef TInpuImage InputImageType;
90  typedef typename InputImageType::Pointer InputImagePointerType;
91  typedef typename InputImageType::PixelType InputPixelType;
92  typedef typename InputImageType::RegionType InputRegionType;
93  typedef typename InputRegionType::SizeType SizeType;
94  typedef TOutputImage OutputImageType;
95  typedef typename OutputImageType::Pointer OutputImagePointerType;
96  typedef typename OutputImageType::RegionType OutputRegionType;
97 
98  typedef itk::Statistics::ScalarImageToRunLengthFeaturesFilter<InputImageType> ScalarImageToRunLengthFeaturesFilterType;
99  typedef typename InputImageType::OffsetType OffsetType;
100  typedef itk::VectorContainer<unsigned char, OffsetType> OffsetVector;
101  typedef typename OffsetVector::Pointer OffsetVectorPointer;
102  typedef typename OffsetVector::ConstPointer OffsetVectorConstPointer;
103 
104 
106  itkSetMacro(Radius, SizeType);
107 
109  itkGetMacro(Radius, SizeType);
110 
113  itkSetConstObjectMacro(Offsets, OffsetVector);
114  itkGetConstObjectMacro(Offsets, OffsetVector);
116 
117  void SetOffset(const OffsetType offset);
118 
120  itkSetMacro(NumberOfBinsPerAxis, unsigned int);
121 
123  itkGetMacro(NumberOfBinsPerAxis, unsigned int);
124 
126  itkSetMacro(InputImageMinimum, InputPixelType);
127 
129  itkGetMacro(InputImageMinimum, InputPixelType);
130 
132  itkSetMacro(InputImageMaximum, InputPixelType);
133 
135  itkGetMacro(InputImageMaximum, InputPixelType);
136 
137  /* Enable/Disable fast calculation */
138  itkGetConstMacro(FastCalculations, bool);
139  itkSetMacro(FastCalculations, bool);
140  itkBooleanMacro(FastCalculations);
141 
143  itkSetMacro(SubsampleFactor, SizeType);
144 
146  itkGetMacro(SubsampleFactor, SizeType);
147 
149  itkSetMacro(SubsampleOffset, OffsetType);
150 
152  itkGetMacro(SubsampleOffset, OffsetType);
153 
156 
159 
162 
165 
168 
171 
174 
177 
180 
183 
184 protected:
187 
190 
192  void GenerateOutputInformation() override;
193 
195  void GenerateInputRequestedRegion() override;
196 
198  void ThreadedGenerateData(const OutputRegionType& outputRegion, itk::ThreadIdType threadId) override;
199 
200 private:
202  void operator=(const Self&) = delete;
203 
205  static OutputRegionType RegionUnion(const OutputRegionType& region1, const OutputRegionType& region2);
206 
209 
212 
214  unsigned int m_NumberOfBinsPerAxis;
215 
218 
221 
224 
227 
230 };
231 } // End namespace otb
232 
233 #ifndef OTB_MANUAL_INSTANTIATION
235 #endif
236 
237 #endif
otb::ScalarImageToHigherOrderTexturesFilter::~ScalarImageToHigherOrderTexturesFilter
~ScalarImageToHigherOrderTexturesFilter() override
Definition: otbScalarImageToHigherOrderTexturesFilter.hxx:75
otb::ScalarImageToHigherOrderTexturesFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbScalarImageToHigherOrderTexturesFilter.h:80
otb::ScalarImageToHigherOrderTexturesFilter::SizeType
InputRegionType::SizeType SizeType
Definition: otbScalarImageToHigherOrderTexturesFilter.h:93
otb::ScalarImageToHigherOrderTexturesFilter::GenerateOutputInformation
void GenerateOutputInformation() override
Definition: otbScalarImageToHigherOrderTexturesFilter.hxx:158
otb::ScalarImageToHigherOrderTexturesFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbScalarImageToHigherOrderTexturesFilter.h:79
otb::ScalarImageToHigherOrderTexturesFilter::ThreadedGenerateData
void ThreadedGenerateData(const OutputRegionType &outputRegion, itk::ThreadIdType threadId) override
Definition: otbScalarImageToHigherOrderTexturesFilter.hxx:238
otb::ScalarImageToHigherOrderTexturesFilter::GetShortRunHighGreyLevelEmphasisOutput
OutputImageType * GetShortRunHighGreyLevelEmphasisOutput()
Definition: otbScalarImageToHigherOrderTexturesFilter.hxx:130
otb::ScalarImageToHigherOrderTexturesFilter::m_InputImageMaximum
InputPixelType m_InputImageMaximum
Definition: otbScalarImageToHigherOrderTexturesFilter.h:220
otb::ScalarImageToHigherOrderTexturesFilter::m_Radius
SizeType m_Radius
Definition: otbScalarImageToHigherOrderTexturesFilter.h:208
otb::ScalarImageToHigherOrderTexturesFilter::RegionUnion
static OutputRegionType RegionUnion(const OutputRegionType &region1, const OutputRegionType &region2)
otb::ScalarImageToHigherOrderTexturesFilter::OutputImagePointerType
OutputImageType::Pointer OutputImagePointerType
Definition: otbScalarImageToHigherOrderTexturesFilter.h:95
otb::ScalarImageToHigherOrderTexturesFilter::OffsetVectorPointer
OffsetVector::Pointer OffsetVectorPointer
Definition: otbScalarImageToHigherOrderTexturesFilter.h:101
otb::ScalarImageToHigherOrderTexturesFilter::GetShortRunEmphasisOutput
OutputImageType * GetShortRunEmphasisOutput()
Definition: otbScalarImageToHigherOrderTexturesFilter.hxx:81
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::ScalarImageToHigherOrderTexturesFilter::GetGreyLevelNonuniformityOutput
OutputImageType * GetGreyLevelNonuniformityOutput()
Definition: otbScalarImageToHigherOrderTexturesFilter.hxx:95
otb::ScalarImageToHigherOrderTexturesFilter::OutputRegionType
OutputImageType::RegionType OutputRegionType
Definition: otbScalarImageToHigherOrderTexturesFilter.h:96
otb::ScalarImageToHigherOrderTexturesFilter::SetOffset
void SetOffset(const OffsetType offset)
Definition: otbScalarImageToHigherOrderTexturesFilter.hxx:150
otb::ScalarImageToHigherOrderTexturesFilter::InputImageType
TInpuImage InputImageType
Definition: otbScalarImageToHigherOrderTexturesFilter.h:86
otb::ScalarImageToHigherOrderTexturesFilter::ScalarImageToRunLengthFeaturesFilterType
itk::Statistics::ScalarImageToRunLengthFeaturesFilter< InputImageType > ScalarImageToRunLengthFeaturesFilterType
Definition: otbScalarImageToHigherOrderTexturesFilter.h:98
otb::ScalarImageToHigherOrderTexturesFilter::GetLowGreyLevelRunEmphasisOutput
OutputImageType * GetLowGreyLevelRunEmphasisOutput()
Definition: otbScalarImageToHigherOrderTexturesFilter.hxx:109
otb::ScalarImageToHigherOrderTexturesFilter::Superclass
itk::ImageToImageFilter< TInpuImage, TOutputImage > Superclass
Definition: otbScalarImageToHigherOrderTexturesFilter.h:78
otb::ScalarImageToHigherOrderTexturesFilter::InputRegionType
InputImageType::RegionType InputRegionType
Definition: otbScalarImageToHigherOrderTexturesFilter.h:92
otb::ScalarImageToHigherOrderTexturesFilter::GetShortRunLowGreyLevelEmphasisOutput
OutputImageType * GetShortRunLowGreyLevelEmphasisOutput()
Definition: otbScalarImageToHigherOrderTexturesFilter.hxx:123
otb::ScalarImageToHigherOrderTexturesFilter::InputPixelType
InputImageType::PixelType InputPixelType
Definition: otbScalarImageToHigherOrderTexturesFilter.h:91
otb::ScalarImageToHigherOrderTexturesFilter::InputImagePointerType
InputImageType::Pointer InputImagePointerType
Definition: otbScalarImageToHigherOrderTexturesFilter.h:90
otb::ScalarImageToHigherOrderTexturesFilter
This class compute 10 local higher order statistics textures coefficients based on the grey level run...
Definition: otbScalarImageToHigherOrderTexturesFilter.h:73
otb::ScalarImageToHigherOrderTexturesFilter::OffsetVectorConstPointer
OffsetVector::ConstPointer OffsetVectorConstPointer
Definition: otbScalarImageToHigherOrderTexturesFilter.h:102
otb::ScalarImageToHigherOrderTexturesFilter::GetLongRunHighGreyLevelEmphasisOutput
OutputImageType * GetLongRunHighGreyLevelEmphasisOutput()
Definition: otbScalarImageToHigherOrderTexturesFilter.hxx:144
otb::ScalarImageToHigherOrderTexturesFilter::m_InputImageMinimum
InputPixelType m_InputImageMinimum
Definition: otbScalarImageToHigherOrderTexturesFilter.h:217
otb::ScalarImageToHigherOrderTexturesFilter::OffsetType
InputImageType::OffsetType OffsetType
Definition: otbScalarImageToHigherOrderTexturesFilter.h:99
otb::ScalarImageToHigherOrderTexturesFilter::GetHighGreyLevelRunEmphasisOutput
OutputImageType * GetHighGreyLevelRunEmphasisOutput()
Definition: otbScalarImageToHigherOrderTexturesFilter.hxx:116
otb::ScalarImageToHigherOrderTexturesFilter::GetLongRunEmphasisOutput
OutputImageType * GetLongRunEmphasisOutput()
Definition: otbScalarImageToHigherOrderTexturesFilter.hxx:88
otb::ScalarImageToHigherOrderTexturesFilter::m_SubsampleOffset
OffsetType m_SubsampleOffset
Definition: otbScalarImageToHigherOrderTexturesFilter.h:229
otb::ScalarImageToHigherOrderTexturesFilter::operator=
void operator=(const Self &)=delete
otb::ScalarImageToHigherOrderTexturesFilter::ScalarImageToHigherOrderTexturesFilter
ScalarImageToHigherOrderTexturesFilter()
Definition: otbScalarImageToHigherOrderTexturesFilter.hxx:32
otb::ScalarImageToHigherOrderTexturesFilter::OffsetVector
itk::VectorContainer< unsigned char, OffsetType > OffsetVector
Definition: otbScalarImageToHigherOrderTexturesFilter.h:100
otb::ScalarImageToHigherOrderTexturesFilter::m_FastCalculations
bool m_FastCalculations
Definition: otbScalarImageToHigherOrderTexturesFilter.h:223
otb::ScalarImageToHigherOrderTexturesFilter::Self
ScalarImageToHigherOrderTexturesFilter Self
Definition: otbScalarImageToHigherOrderTexturesFilter.h:77
otb::ScalarImageToHigherOrderTexturesFilter::m_Offsets
OffsetVectorConstPointer m_Offsets
Definition: otbScalarImageToHigherOrderTexturesFilter.h:211
otb::ScalarImageToHigherOrderTexturesFilter::GetLongRunLowGreyLevelEmphasisOutput
OutputImageType * GetLongRunLowGreyLevelEmphasisOutput()
Definition: otbScalarImageToHigherOrderTexturesFilter.hxx:137
otb::ScalarImageToHigherOrderTexturesFilter::m_SubsampleFactor
SizeType m_SubsampleFactor
Definition: otbScalarImageToHigherOrderTexturesFilter.h:226
otb::ScalarImageToHigherOrderTexturesFilter::GetRunLengthNonuniformityOutput
OutputImageType * GetRunLengthNonuniformityOutput()
Definition: otbScalarImageToHigherOrderTexturesFilter.hxx:102
otb::ScalarImageToHigherOrderTexturesFilter::GenerateInputRequestedRegion
void GenerateInputRequestedRegion() override
Definition: otbScalarImageToHigherOrderTexturesFilter.hxx:188
otbScalarImageToHigherOrderTexturesFilter.hxx
otb::ScalarImageToHigherOrderTexturesFilter::m_NumberOfBinsPerAxis
unsigned int m_NumberOfBinsPerAxis
Definition: otbScalarImageToHigherOrderTexturesFilter.h:214
otb::ScalarImageToHigherOrderTexturesFilter::OutputImageType
TOutputImage OutputImageType
Definition: otbScalarImageToHigherOrderTexturesFilter.h:94