OTB  9.0.0
Orfeo Toolbox
otbLeeImageFilter.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 otbLeeImageFilter_h
22 #define otbLeeImageFilter_h
23 
24 #include "itkImageToImageFilter.h"
25 #include "itkImage.h"
26 #include "itkNumericTraits.h"
27 
28 namespace otb
29 {
30 
49 template <class TInputImage, class TOutputImage>
50 class ITK_EXPORT LeeImageFilter : public itk::ImageToImageFilter<TInputImage, TOutputImage>
51 {
52 public:
54  itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
55  itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
57 
58  typedef TInputImage InputImageType;
59  typedef TOutputImage OutputImageType;
60 
63  typedef itk::ImageToImageFilter<InputImageType, OutputImageType> Superclass;
64  typedef itk::SmartPointer<Self> Pointer;
65  typedef itk::SmartPointer<const Self> ConstPointer;
66 
68  itkNewMacro(Self);
69 
71  itkTypeMacro(LeeImageFilter, ImageToImageFilter);
72 
73  typedef typename InputImageType::PixelType InputPixelType;
74  typedef typename OutputImageType::PixelType OutputPixelType;
75  typedef typename itk::NumericTraits<InputPixelType>::RealType InputRealType;
76  typedef typename InputImageType::RegionType InputImageRegionType;
77  typedef typename OutputImageType::RegionType OutputImageRegionType;
78  typedef typename InputImageType::SizeType SizeType;
79 
81  itkSetMacro(Radius, SizeType);
82 
84  itkGetConstReferenceMacro(Radius, SizeType);
85 
87  itkSetMacro(NbLooks, double);
88 
90  itkGetConstReferenceMacro(NbLooks, double);
91 
98  void GenerateInputRequestedRegion() override;
99 
100 protected:
101  LeeImageFilter();
102  ~LeeImageFilter() override
103  {
104  }
105  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
106 
117  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId) override;
118 
119 private:
120  LeeImageFilter(const Self&) = delete;
121  void operator=(const Self&) = delete;
122 
125 
127  double m_NbLooks;
128 };
129 } // end namespace otb
130 
131 #ifndef OTB_MANUAL_INSTANTIATION
132 #include "otbLeeImageFilter.hxx"
133 #endif
134 
135 #endif
otb::LeeImageFilter::InputPixelType
InputImageType::PixelType InputPixelType
Definition: otbLeeImageFilter.h:71
otb::LeeImageFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbLeeImageFilter.h:64
otb::LeeImageFilter::InputRealType
itk::NumericTraits< InputPixelType >::RealType InputRealType
Definition: otbLeeImageFilter.h:75
otbLeeImageFilter.hxx
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::LeeImageFilter::m_NbLooks
double m_NbLooks
Definition: otbLeeImageFilter.h:127
otb::LeeImageFilter::SizeType
InputImageType::SizeType SizeType
Definition: otbLeeImageFilter.h:78
otb::LeeImageFilter::OutputImageType
TOutputImage OutputImageType
Definition: otbLeeImageFilter.h:59
otb::LeeImageFilter::InputImageType
TInputImage InputImageType
Definition: otbLeeImageFilter.h:58
otb::LeeImageFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbLeeImageFilter.h:65
otb::LeeImageFilter::~LeeImageFilter
~LeeImageFilter() override
Definition: otbLeeImageFilter.h:102
otb::LeeImageFilter::Self
LeeImageFilter Self
Definition: otbLeeImageFilter.h:62
otb::LeeImageFilter::OutputPixelType
OutputImageType::PixelType OutputPixelType
Definition: otbLeeImageFilter.h:74
otb::LeeImageFilter::InputImageRegionType
InputImageType::RegionType InputImageRegionType
Definition: otbLeeImageFilter.h:76
otb::LeeImageFilter::Superclass
itk::ImageToImageFilter< InputImageType, OutputImageType > Superclass
Definition: otbLeeImageFilter.h:63
otb::LeeImageFilter::OutputImageRegionType
OutputImageType::RegionType OutputImageRegionType
Definition: otbLeeImageFilter.h:77
otb::LeeImageFilter::m_Radius
SizeType m_Radius
Definition: otbLeeImageFilter.h:124
otb::LeeImageFilter
Anti-speckle image filter.
Definition: otbLeeImageFilter.h:50