OTB  9.0.0
Orfeo Toolbox
otbFrostImageFilter.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 otbFrostImageFilter_h
22 #define otbFrostImageFilter_h
23 
24 #include "itkImageToImageFilter.h"
25 #include "itkImage.h"
26 #include "itkNumericTraits.h"
27 
28 namespace otb
29 {
30 
46 template <class TInputImage, class TOutputImage>
47 class ITK_EXPORT FrostImageFilter : public itk::ImageToImageFilter<TInputImage, TOutputImage>
48 {
49 public:
51  itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
52  itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
54 
56  typedef TInputImage InputImageType;
57 
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(FrostImageFilter, ImageToImageFilter);
72 
74  typedef typename InputImageType::PixelType InputPixelType;
75  typedef typename OutputImageType::PixelType OutputPixelType;
76 
78  typedef typename itk::NumericTraits<InputPixelType>::RealType InputRealType;
79 
80  typedef typename InputImageType::RegionType InputImageRegionType;
81  typedef typename OutputImageType::RegionType OutputImageRegionType;
82 
84  typedef typename InputImageType::SizeType SizeType;
85 
87  itkSetMacro(Radius, SizeType);
88 
90  itkGetConstReferenceMacro(Radius, SizeType);
91 
93  itkSetMacro(Deramp, double);
94 
96  itkGetConstReferenceMacro(Deramp, double);
97 
101  void GenerateInputRequestedRegion() override;
102 
103 protected:
105  ~FrostImageFilter() override
106  {
107  }
108  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
109 
118  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId) override;
119 
120 private:
121  FrostImageFilter(const Self&) = delete;
122  void operator=(const Self&) = delete;
123 
126 
128  double m_Deramp;
129 };
130 } // end namespace otb
131 
132 #ifndef OTB_MANUAL_INSTANTIATION
133 #include "otbFrostImageFilter.hxx"
134 #endif
135 
136 #endif
otb::FrostImageFilter::OutputImageType
TOutputImage OutputImageType
Definition: otbFrostImageFilter.h:59
otb::FrostImageFilter::OutputImageRegionType
OutputImageType::RegionType OutputImageRegionType
Definition: otbFrostImageFilter.h:81
otbFrostImageFilter.hxx
otb::FrostImageFilter::OutputPixelType
OutputImageType::PixelType OutputPixelType
Definition: otbFrostImageFilter.h:75
otb::FrostImageFilter
Anti-speckle image filter.
Definition: otbFrostImageFilter.h:47
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::FrostImageFilter::Superclass
itk::ImageToImageFilter< InputImageType, OutputImageType > Superclass
Definition: otbFrostImageFilter.h:63
otb::FrostImageFilter::InputImageRegionType
InputImageType::RegionType InputImageRegionType
Definition: otbFrostImageFilter.h:80
otb::FrostImageFilter::m_Radius
SizeType m_Radius
Definition: otbFrostImageFilter.h:125
otb::FrostImageFilter::InputPixelType
InputImageType::PixelType InputPixelType
Definition: otbFrostImageFilter.h:71
otb::FrostImageFilter::InputImageType
TInputImage InputImageType
Definition: otbFrostImageFilter.h:56
otb::FrostImageFilter::SizeType
InputImageType::SizeType SizeType
Definition: otbFrostImageFilter.h:84
otb::FrostImageFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbFrostImageFilter.h:65
otb::FrostImageFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbFrostImageFilter.h:64
otb::FrostImageFilter::Self
FrostImageFilter Self
Definition: otbFrostImageFilter.h:62
otb::FrostImageFilter::InputRealType
itk::NumericTraits< InputPixelType >::RealType InputRealType
Definition: otbFrostImageFilter.h:78
otb::FrostImageFilter::~FrostImageFilter
~FrostImageFilter() override
Definition: otbFrostImageFilter.h:105
otb::FrostImageFilter::m_Deramp
double m_Deramp
Definition: otbFrostImageFilter.h:128