OTB  5.5.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 
43 template <class TInputImage, class TOutputImage>
44 class ITK_EXPORT FrostImageFilter : public itk::ImageToImageFilter<TInputImage, TOutputImage>
45 {
46 public:
48  itkStaticConstMacro(InputImageDimension,
49  unsigned int,
50  TInputImage::ImageDimension);
51  itkStaticConstMacro(OutputImageDimension,
52  unsigned int,
53  TOutputImage::ImageDimension);
55 
57  typedef TInputImage InputImageType;
58 
60  typedef TOutputImage OutputImageType;
61 
67 
69  itkNewMacro(Self);
70 
72  itkTypeMacro(FrostImageFilter, ImageToImageFilter);
73 
75  typedef typename InputImageType::PixelType InputPixelType;
76  typedef typename OutputImageType::PixelType OutputPixelType;
77 
80 
81  typedef typename InputImageType::RegionType InputImageRegionType;
82  typedef typename OutputImageType::RegionType OutputImageRegionType;
83 
85  typedef typename InputImageType::SizeType SizeType;
86 
88  itkSetMacro(Radius, SizeType);
89 
91  itkGetConstReferenceMacro(Radius, SizeType);
92 
94  itkSetMacro(Deramp, double);
95 
97  itkGetConstReferenceMacro(Deramp, double);
98 
102  virtual void GenerateInputRequestedRegion()
103  throw(itk::InvalidRequestedRegionError);
104 
105 protected:
107  virtual ~FrostImageFilter() {}
108  void PrintSelf(std::ostream& os, itk::Indent indent) const;
109 
118  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
119  itk::ThreadIdType threadId);
120 
121 private:
122  FrostImageFilter(const Self &); //purposely not implemented
123  void operator =(const Self&); //purposely not implemented
124 
127 
129  double m_Deramp;
130 };
131 } // end namespace otb
132 
133 #ifndef OTB_MANUAL_INSTANTIATION
134 #include "otbFrostImageFilter.txx"
135 #endif
136 
137 #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
unsigned int ThreadIdType
itk::ImageToImageFilter< InputImageType, OutputImageType > Superclass
InputImageType::RegionType InputImageRegionType