OTB  9.0.0
Orfeo Toolbox
otbScalarImageToPanTexTextureFilter.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 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 ThreadedGenerateData(const OutputRegionType& outputRegion, itk::ThreadIdType threadId) override;
125 
126 private:
127  ScalarImageToPanTexTextureFilter(const Self&) = delete;
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
otb::ScalarImageToPanTexTextureFilter::CooccurrenceIndexedListType
GreyLevelCooccurrenceIndexedList< InputPixelType > CooccurrenceIndexedListType
Definition: otbScalarImageToPanTexTextureFilter.h:77
otb::ScalarImageToPanTexTextureFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbScalarImageToPanTexTextureFilter.h:57
otb::ScalarImageToPanTexTextureFilter::m_InputImageMaximum
InputPixelType m_InputImageMaximum
Definition: otbScalarImageToPanTexTextureFilter.h:146
otb::ScalarImageToPanTexTextureFilter::InputRegionType
InputImageType::RegionType InputRegionType
Definition: otbScalarImageToPanTexTextureFilter.h:69
otb::GreyLevelCooccurrenceIndexedList::RelativeFrequencyType
itk::NumericTraits< FrequencyType >::RealType RelativeFrequencyType
Definition: otbGreyLevelCooccurrenceIndexedList.h:91
otb::ScalarImageToPanTexTextureFilter::InputImagePointerType
InputImageType::Pointer InputImagePointerType
Definition: otbScalarImageToPanTexTextureFilter.h:67
otb::GreyLevelCooccurrenceIndexedList::PixelValueType
itk::NumericTraits< PixelType >::RealType PixelValueType
Definition: otbGreyLevelCooccurrenceIndexedList.h:94
otb::ScalarImageToPanTexTextureFilter::VectorIteratorType
VectorType::iterator VectorIteratorType
Definition: otbScalarImageToPanTexTextureFilter.h:85
otb::ScalarImageToPanTexTextureFilter::m_InputImageMinimum
InputPixelType m_InputImageMinimum
Definition: otbScalarImageToPanTexTextureFilter.h:143
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::GreyLevelCooccurrenceIndexedList::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbGreyLevelCooccurrenceIndexedList.h:72
otb::ScalarImageToPanTexTextureFilter::Superclass
itk::ImageToImageFilter< TInpuImage, TOutputImage > Superclass
Definition: otbScalarImageToPanTexTextureFilter.h:55
otb::ScalarImageToPanTexTextureFilter::PixelValueType
CooccurrenceIndexedListType::PixelValueType PixelValueType
Definition: otbScalarImageToPanTexTextureFilter.h:81
otb::GreyLevelCooccurrenceIndexedList::VectorType
std::vector< CooccurrencePairType > VectorType
Definition: otbGreyLevelCooccurrenceIndexedList.h:111
otb::ScalarImageToPanTexTextureFilter::VectorType
CooccurrenceIndexedListType::VectorType VectorType
Definition: otbScalarImageToPanTexTextureFilter.h:83
otb::ScalarImageToPanTexTextureFilter::operator=
void operator=(const Self &)=delete
otb::ScalarImageToPanTexTextureFilter::CooccurrenceIndexedListConstPointerType
CooccurrenceIndexedListType::ConstPointer CooccurrenceIndexedListConstPointerType
Definition: otbScalarImageToPanTexTextureFilter.h:79
otb::ScalarImageToPanTexTextureFilter::OutputImageType
TOutputImage OutputImageType
Definition: otbScalarImageToPanTexTextureFilter.h:73
otb::ScalarImageToPanTexTextureFilter::VectorConstIteratorType
VectorType::const_iterator VectorConstIteratorType
Definition: otbScalarImageToPanTexTextureFilter.h:86
otb::ScalarImageToPanTexTextureFilter::OutputRegionType
OutputImageType::RegionType OutputRegionType
Definition: otbScalarImageToPanTexTextureFilter.h:75
otb::ScalarImageToPanTexTextureFilter::OffsetType
InputImageType::OffsetType OffsetType
Definition: otbScalarImageToPanTexTextureFilter.h:71
otb::ScalarImageToPanTexTextureFilter::RelativeFrequencyType
CooccurrenceIndexedListType::RelativeFrequencyType RelativeFrequencyType
Definition: otbScalarImageToPanTexTextureFilter.h:82
otb::ScalarImageToPanTexTextureFilter::CooccurrenceIndexedListPointerType
CooccurrenceIndexedListType::Pointer CooccurrenceIndexedListPointerType
Definition: otbScalarImageToPanTexTextureFilter.h:78
otbScalarImageToPanTexTextureFilter.hxx
otb::ScalarImageToPanTexTextureFilter::ScalarImageToPanTexTextureFilter
ScalarImageToPanTexTextureFilter()
Definition: otbScalarImageToPanTexTextureFilter.hxx:34
otbGreyLevelCooccurrenceIndexedList.h
otb::ScalarImageToPanTexTextureFilter::OffsetListType
std::vector< OffsetType > OffsetListType
Definition: otbScalarImageToPanTexTextureFilter.h:72
otb::ScalarImageToPanTexTextureFilter::m_OffsetList
OffsetListType m_OffsetList
Definition: otbScalarImageToPanTexTextureFilter.h:137
otb::ScalarImageToPanTexTextureFilter::~ScalarImageToPanTexTextureFilter
~ScalarImageToPanTexTextureFilter() override=default
otb::GreyLevelCooccurrenceIndexedList::IndexType
itk::Index< PixelPairSize > IndexType
Definition: otbGreyLevelCooccurrenceIndexedList.h:85
otb::ScalarImageToPanTexTextureFilter::SizeType
InputRegionType::SizeType SizeType
Definition: otbScalarImageToPanTexTextureFilter.h:70
otb::ScalarImageToPanTexTextureFilter::GenerateInputRequestedRegion
void GenerateInputRequestedRegion() override
Definition: otbScalarImageToPanTexTextureFilter.hxx:46
otb::GreyLevelCooccurrenceIndexedList::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbGreyLevelCooccurrenceIndexedList.h:73
otb::ScalarImageToPanTexTextureFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbScalarImageToPanTexTextureFilter.h:56
otb::ScalarImageToPanTexTextureFilter::RegionUnion
static OutputRegionType RegionUnion(const OutputRegionType &region1, const OutputRegionType &region2)
otb::ScalarImageToPanTexTextureFilter::m_NumberOfBinsPerAxis
unsigned int m_NumberOfBinsPerAxis
Definition: otbScalarImageToPanTexTextureFilter.h:140
otb::ScalarImageToPanTexTextureFilter::ThreadedGenerateData
void ThreadedGenerateData(const OutputRegionType &outputRegion, itk::ThreadIdType threadId) override
Definition: otbScalarImageToPanTexTextureFilter.hxx:89
otb::ScalarImageToPanTexTextureFilter::InputImageType
TInpuImage InputImageType
Definition: otbScalarImageToPanTexTextureFilter.h:63
otb::ScalarImageToPanTexTextureFilter::OutputImagePointerType
OutputImageType::Pointer OutputImagePointerType
Definition: otbScalarImageToPanTexTextureFilter.h:74
otb::GreyLevelCooccurrenceIndexedList
This class holds a VectorType of CooccurrencePairType with each pair is a combination of pixel index ...
Definition: otbGreyLevelCooccurrenceIndexedList.h:66
otb::ScalarImageToPanTexTextureFilter::CooccurrenceIndexType
CooccurrenceIndexedListType::IndexType CooccurrenceIndexType
Definition: otbScalarImageToPanTexTextureFilter.h:80
otb::ScalarImageToPanTexTextureFilter
This class computes a texture derived built-up presence index (PanTex)
Definition: otbScalarImageToPanTexTextureFilter.h:50
otb::ScalarImageToPanTexTextureFilter::m_Radius
SizeType m_Radius
Definition: otbScalarImageToPanTexTextureFilter.h:134
otb::ScalarImageToPanTexTextureFilter::Self
ScalarImageToPanTexTextureFilter Self
Definition: otbScalarImageToPanTexTextureFilter.h:54
otb::ScalarImageToPanTexTextureFilter::InputPixelType
InputImageType::PixelType InputPixelType
Definition: otbScalarImageToPanTexTextureFilter.h:68