OTB  10.0.0
Orfeo Toolbox
otbFrostImageFilter.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 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 DynamicThreadedGenerateData(const OutputImageRegionType& outputRegionForThread) 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
Anti-speckle image filter.
itk::NumericTraits< InputPixelType >::RealType InputRealType
itk::ImageToImageFilter< InputImageType, OutputImageType > Superclass
InputImageType::SizeType SizeType
InputImageType::RegionType InputImageRegionType
OutputImageType::RegionType OutputImageRegionType
void operator=(const Self &)=delete
OutputImageType::PixelType OutputPixelType
itk::SmartPointer< Self > Pointer
FrostImageFilter(const Self &)=delete
InputImageType::PixelType InputPixelType
itk::SmartPointer< const Self > ConstPointer
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.