OTB  5.0.0
Orfeo Toolbox
otbFrostImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ORFEO Toolbox
4  Language: C++
5  Date: $Date$
6  Version: $Revision$
7 
8 
9  Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
10  See OTBCopyright.txt for details.
11 
12 
13  This software is distributed WITHOUT ANY WARRANTY; without even
14  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  PURPOSE. See the above copyright notices for more information.
16 
17 =========================================================================*/
18 #ifndef __otbFrostImageFilter_h
19 #define __otbFrostImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 #include "itkImage.h"
23 #include "itkNumericTraits.h"
24 
25 namespace otb
26 {
27 
48 template <class TInputImage, class TOutputImage>
49 class ITK_EXPORT FrostImageFilter : public itk::ImageToImageFilter<TInputImage, TOutputImage>
50 {
51 public:
53  itkStaticConstMacro(InputImageDimension,
54  unsigned int,
55  TInputImage::ImageDimension);
56  itkStaticConstMacro(OutputImageDimension,
57  unsigned int,
58  TOutputImage::ImageDimension);
60 
62  typedef TInputImage InputImageType;
63 
65  typedef TOutputImage OutputImageType;
66 
72 
74  itkNewMacro(Self);
75 
77  itkTypeMacro(FrostImageFilter, ImageToImageFilter);
78 
80  typedef typename InputImageType::PixelType InputPixelType;
81  typedef typename OutputImageType::PixelType OutputPixelType;
82 
85 
86  typedef typename InputImageType::RegionType InputImageRegionType;
87  typedef typename OutputImageType::RegionType OutputImageRegionType;
88 
90  typedef typename InputImageType::SizeType SizeType;
91 
93  itkSetMacro(Radius, SizeType);
94 
96  itkGetConstReferenceMacro(Radius, SizeType);
97 
99  itkSetMacro(Deramp, double);
100 
102  itkGetConstReferenceMacro(Deramp, double);
103 
107  virtual void GenerateInputRequestedRegion()
108  throw(itk::InvalidRequestedRegionError);
109 
110 protected:
112  virtual ~FrostImageFilter() {}
113  void PrintSelf(std::ostream& os, itk::Indent indent) const;
114 
123  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
124  itk::ThreadIdType threadId);
125 
126 private:
127  FrostImageFilter(const Self &); //purposely not implemented
128  void operator =(const Self&); //purposely not implemented
129 
132 
134  double m_Deramp;
135 };
136 } // end namespace otb
137 
138 #ifndef OTB_MANUAL_INSTANTIATION
139 #include "otbFrostImageFilter.txx"
140 #endif
141 
142 #endif
itk::NumericTraits< InputPixelType >::RealType InputRealType
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
itk::ImageToImageFilter< InputImageType, OutputImageType > Superclass
InputImageType::RegionType InputImageRegionType
unsigned int ThreadIdType