OTB  6.1.0
Orfeo Toolbox
otbFrostImageFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2017 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,
52  unsigned int,
53  TInputImage::ImageDimension);
54  itkStaticConstMacro(OutputImageDimension,
55  unsigned int,
56  TOutputImage::ImageDimension);
58 
60  typedef TInputImage InputImageType;
61 
63  typedef TOutputImage OutputImageType;
64 
70 
72  itkNewMacro(Self);
73 
75  itkTypeMacro(FrostImageFilter, ImageToImageFilter);
76 
78  typedef typename InputImageType::PixelType InputPixelType;
79  typedef typename OutputImageType::PixelType OutputPixelType;
80 
83 
84  typedef typename InputImageType::RegionType InputImageRegionType;
85  typedef typename OutputImageType::RegionType OutputImageRegionType;
86 
89 
91  itkSetMacro(Radius, SizeType);
92 
94  itkGetConstReferenceMacro(Radius, SizeType);
95 
97  itkSetMacro(Deramp, double);
98 
100  itkGetConstReferenceMacro(Deramp, double);
101 
105  void GenerateInputRequestedRegion()
106  throw(itk::InvalidRequestedRegionError) ITK_OVERRIDE;
107 
108 protected:
110  ~FrostImageFilter() ITK_OVERRIDE {}
111  void PrintSelf(std::ostream& os, itk::Indent indent) const ITK_OVERRIDE;
112 
121  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
122  itk::ThreadIdType threadId) ITK_OVERRIDE;
123 
124 private:
125  FrostImageFilter(const Self &); //purposely not implemented
126  void operator =(const Self&); //purposely not implemented
127 
130 
132  double m_Deramp;
133 };
134 } // end namespace otb
135 
136 #ifndef OTB_MANUAL_INSTANTIATION
137 #include "otbFrostImageFilter.txx"
138 #endif
139 
140 #endif
itk::NumericTraits< InputPixelType >::RealType InputRealType
itk::Size< Monteverdi_DIMENSION > SizeType
Definition: mvdTypes.h:146
itk::SmartPointer< const Self > ConstPointer
itk::SmartPointer< Self > Pointer
Anti-speckle image filter.
OutputImageType::RegionType OutputImageRegionType
InputImageType::SizeType SizeType
OutputImageType::PixelType OutputPixelType
InputImageType::PixelType InputPixelType
unsigned int ThreadIdType
itk::ImageToImageFilter< InputImageType, OutputImageType > Superclass
InputImageType::RegionType InputImageRegionType