Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkTotalVariationDenoisingImageFilter_h
00019 #define __itkTotalVariationDenoisingImageFilter_h
00020
00021 #include "itkTotalVariationSingleIterationImageFilter.h"
00022 #include "itkImageToImageFilter.h"
00023 #include "itkCastImageFilter.h"
00024 #include "itkImage.h"
00025
00026 namespace itk
00027 {
00040 template <class TInputImage, class TOutputImage>
00041 class TotalVariationDenoisingImageFilter :
00042 public ImageToImageFilter< TInputImage, TOutputImage >
00043 {
00044 public:
00046 itkStaticConstMacro(InputImageDimension, unsigned int,
00047 TInputImage::ImageDimension);
00048 itkStaticConstMacro(OutputImageDimension, unsigned int,
00049 TOutputImage::ImageDimension);
00050
00052 typedef TInputImage InputImageType;
00053 typedef TOutputImage OutputImageType;
00054
00056 typedef TotalVariationDenoisingImageFilter Self;
00057 typedef ImageToImageFilter< InputImageType, OutputImageType> Superclass;
00058 typedef SmartPointer<Self> Pointer;
00059 typedef SmartPointer<const Self> ConstPointer;
00060
00062 itkNewMacro(Self);
00063
00065 itkTypeMacro(TotalVariationDenoisingImageFilter, ImageToImageFilter);
00066
00068 typedef typename InputImageType::PixelType InputPixelType;
00069 typedef typename OutputImageType::PixelType OutputPixelType;
00070
00071 typedef typename InputImageType::RegionType InputImageRegionType;
00072 typedef typename OutputImageType::RegionType OutputImageRegionType;
00073
00074 typedef typename InputImageType::SizeType InputSizeType;
00075
00076 typedef TotalVariationSingleIterationImageFilter<TOutputImage, TOutputImage>
00077 SingleIterationFilterType;
00078
00079 typedef typename itk::CastImageFilter< TInputImage, TOutputImage > CastType;
00080
00081 itkSetMacro(Lambda, double);
00082 itkGetMacro(Lambda, double);
00083
00084 itkSetMacro(NumberIterations, int);
00085 itkGetMacro(NumberIterations, int);
00086
00087 protected:
00088 TotalVariationDenoisingImageFilter();
00089 virtual ~TotalVariationDenoisingImageFilter() {}
00090 void PrintSelf(std::ostream& os, Indent indent) const;
00091
00092 void GenerateData();
00093
00094 double m_Lambda;
00095
00096 int m_NumberIterations;
00097
00098 private:
00099 TotalVariationDenoisingImageFilter(const Self&);
00100 void operator=(const Self&);
00101 };
00102
00103 }
00104
00105 #ifndef ITK_MANUAL_INSTANTIATION
00106 #include "itkTotalVariationDenoisingImageFilter.txx"
00107 #endif
00108
00109 #endif //__itkTotalVariationDenoisingImageFilter__