Orfeo ToolBox  4.2
Orfeo ToolBox is not a black box
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 
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);
57 
59  typedef TInputImage InputImageType;
61  typedef TOutputImage OutputImageType;
62 
68 
70  itkNewMacro(Self);
71 
73  itkTypeMacro(FrostImageFilter, ImageToImageFilter);
74 
76  typedef typename InputImageType::PixelType InputPixelType;
77  typedef typename OutputImageType::PixelType OutputPixelType;
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);
96  itkGetConstReferenceMacro(Deramp, double);
97 
101  virtual void GenerateInputRequestedRegion()
102  throw(itk::InvalidRequestedRegionError);
103 
104 protected:
106  virtual ~FrostImageFilter() {}
107  void PrintSelf(std::ostream& os, itk::Indent indent) const;
108 
117  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
118  itk::ThreadIdType threadId);
119 
120 private:
121  FrostImageFilter(const Self &); //purposely not implemented
122  void operator =(const Self&); //purposely not implemented
123 
127  double m_Deramp;
128 };
129 } // end namespace otb
130 
131 #ifndef OTB_MANUAL_INSTANTIATION
132 #include "otbFrostImageFilter.txx"
133 #endif
134 
135 #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