OTB  9.0.0
Orfeo Toolbox
otbKuanImageFilter.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 otbKuanImageFilter_h
22 #define otbKuanImageFilter_h
23 
24 #include "itkImageToImageFilter.h"
25 #include "itkImage.h"
26 #include "itkNumericTraits.h"
27 
28 namespace otb
29 {
30 
42 template <class TInputImage, class TOutputImage>
43 class ITK_EXPORT KuanImageFilter : public itk::ImageToImageFilter<TInputImage, TOutputImage>
44 {
45 public:
47  itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
48  itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
50 
51  typedef TInputImage InputImageType;
52  typedef TOutputImage OutputImageType;
53 
56  typedef itk::ImageToImageFilter<InputImageType, OutputImageType> Superclass;
57  typedef itk::SmartPointer<Self> Pointer;
58  typedef itk::SmartPointer<const Self> ConstPointer;
59 
61  itkNewMacro(Self);
62 
64  itkTypeMacro(KuanImageFilter, ImageToImageFilter);
65 
66  typedef typename InputImageType::PixelType InputPixelType;
67  typedef typename OutputImageType::PixelType OutputPixelType;
68  typedef typename itk::NumericTraits<InputPixelType>::RealType InputRealType;
69  typedef typename InputImageType::RegionType InputImageRegionType;
70  typedef typename OutputImageType::RegionType OutputImageRegionType;
71  typedef typename InputImageType::SizeType SizeType;
72 
74  itkSetMacro(Radius, SizeType);
75 
77  itkGetConstReferenceMacro(Radius, SizeType);
78 
80  itkSetMacro(NbLooks, double);
81 
83  itkGetConstReferenceMacro(NbLooks, double);
84 
91  void GenerateInputRequestedRegion() override;
92 
93 protected:
95  ~KuanImageFilter() override
96  {
97  }
98  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
99 
103  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId) override;
104 
105 private:
106  KuanImageFilter(const Self&) = delete;
107  void operator=(const Self&) = delete;
108 
111 
113  double m_NbLooks;
114 };
115 } // end namespace otb
116 
117 #ifndef OTB_MANUAL_INSTANTIATION
118 #include "otbKuanImageFilter.hxx"
119 #endif
120 
121 #endif
otb::KuanImageFilter::SizeType
InputImageType::SizeType SizeType
Definition: otbKuanImageFilter.h:71
otb::KuanImageFilter::Superclass
itk::ImageToImageFilter< InputImageType, OutputImageType > Superclass
Definition: otbKuanImageFilter.h:56
otb::KuanImageFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbKuanImageFilter.h:58
otb::KuanImageFilter::m_NbLooks
double m_NbLooks
Definition: otbKuanImageFilter.h:113
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otbKuanImageFilter.hxx
otb::KuanImageFilter::~KuanImageFilter
~KuanImageFilter() override
Definition: otbKuanImageFilter.h:95
otb::KuanImageFilter::m_Radius
SizeType m_Radius
Definition: otbKuanImageFilter.h:110
otb::KuanImageFilter::OutputImageType
TOutputImage OutputImageType
Definition: otbKuanImageFilter.h:52
otb::KuanImageFilter::InputPixelType
InputImageType::PixelType InputPixelType
Definition: otbKuanImageFilter.h:64
otb::KuanImageFilter::OutputImageRegionType
OutputImageType::RegionType OutputImageRegionType
Definition: otbKuanImageFilter.h:70
otb::KuanImageFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbKuanImageFilter.h:57
otb::KuanImageFilter::InputRealType
itk::NumericTraits< InputPixelType >::RealType InputRealType
Definition: otbKuanImageFilter.h:68
otb::KuanImageFilter::OutputPixelType
OutputImageType::PixelType OutputPixelType
Definition: otbKuanImageFilter.h:67
otb::KuanImageFilter
Anti-speckle image filter.
Definition: otbKuanImageFilter.h:43
otb::KuanImageFilter::Self
KuanImageFilter Self
Definition: otbKuanImageFilter.h:55
otb::KuanImageFilter::InputImageRegionType
InputImageType::RegionType InputImageRegionType
Definition: otbKuanImageFilter.h:69
otb::KuanImageFilter::InputImageType
TInputImage InputImageType
Definition: otbKuanImageFilter.h:51