OTB  10.0.0
Orfeo Toolbox
otbScalarImageToPanTexTextureFilter.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 otbScalarImageToPanTexTextureFilter_h
22 #define otbScalarImageToPanTexTextureFilter_h
23 
25 #include "itkImageToImageFilter.h"
26 
27 namespace otb
28 {
49 template <class TInpuImage, class TOutputImage>
50 class ScalarImageToPanTexTextureFilter : public itk::ImageToImageFilter<TInpuImage, TOutputImage>
51 {
52 public:
55  typedef itk::ImageToImageFilter<TInpuImage, TOutputImage> Superclass;
56  typedef itk::SmartPointer<Self> Pointer;
57  typedef itk::SmartPointer<const Self> ConstPointer;
58 
60  itkNewMacro(Self);
61 
63  itkTypeMacro(ScalarImageToPanTexTextureFilter, ImageToImageFilter);
64 
66  typedef TInpuImage InputImageType;
67  typedef typename InputImageType::Pointer InputImagePointerType;
68  typedef typename InputImageType::PixelType InputPixelType;
69  typedef typename InputImageType::RegionType InputRegionType;
70  typedef typename InputRegionType::SizeType SizeType;
71  typedef typename InputImageType::OffsetType OffsetType;
72  typedef typename std::vector<OffsetType> OffsetListType;
73  typedef TOutputImage OutputImageType;
74  typedef typename OutputImageType::Pointer OutputImagePointerType;
75  typedef typename OutputImageType::RegionType OutputRegionType;
76 
84 
85  typedef typename VectorType::iterator VectorIteratorType;
86  typedef typename VectorType::const_iterator VectorConstIteratorType;
87 
88 
90  itkSetMacro(Radius, SizeType);
91 
93  itkGetMacro(Radius, SizeType);
94 
96  itkSetMacro(NumberOfBinsPerAxis, unsigned int);
97 
99  itkGetMacro(NumberOfBinsPerAxis, unsigned int);
100 
102  itkSetMacro(InputImageMinimum, InputPixelType);
103 
105  itkGetMacro(InputImageMinimum, InputPixelType);
106 
108  itkSetMacro(InputImageMaximum, InputPixelType);
109 
111  itkGetMacro(InputImageMaximum, InputPixelType);
112 
113 protected:
116 
118  ~ScalarImageToPanTexTextureFilter() override = default;
119 
121  void GenerateInputRequestedRegion() override;
122 
124  void DynamicThreadedGenerateData(const OutputRegionType& outputRegion) override;
125 
126 private:
128  void operator=(const Self&) = delete;
129 
131  static OutputRegionType RegionUnion(const OutputRegionType& region1, const OutputRegionType& region2);
132 
135 
138 
140  unsigned int m_NumberOfBinsPerAxis;
141 
144 
147 };
148 } // End namespace otb
149 
150 #ifndef OTB_MANUAL_INSTANTIATION
152 #endif
153 
154 #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
This class computes a texture derived built-up presence index (PanTex)
CooccurrenceIndexedListType::RelativeFrequencyType RelativeFrequencyType
itk::ImageToImageFilter< TInpuImage, TOutputImage > Superclass
CooccurrenceIndexedListType::Pointer CooccurrenceIndexedListPointerType
static OutputRegionType RegionUnion(const OutputRegionType &region1, const OutputRegionType &region2)
CooccurrenceIndexedListType::VectorType VectorType
CooccurrenceIndexedListType::PixelValueType PixelValueType
CooccurrenceIndexedListType::ConstPointer CooccurrenceIndexedListConstPointerType
ScalarImageToPanTexTextureFilter(const Self &)=delete
GreyLevelCooccurrenceIndexedList< InputPixelType > CooccurrenceIndexedListType
void DynamicThreadedGenerateData(const OutputRegionType &outputRegion) override
CooccurrenceIndexedListType::IndexType CooccurrenceIndexType
~ScalarImageToPanTexTextureFilter() override=default
void operator=(const Self &)=delete
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.