ANIMA  4.0
animaNonLocalMeansTemporalImageFilter.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <iostream>
4 #include <itkImageToImageFilter.h>
5 #include <itkVectorImage.h>
6 #include <itkImage.h>
7 #include <itkVector.h>
8 #include <itkObject.h>
9 
10 
11 namespace anima
12 {
13 
14 template <class TInputImage >
16  public itk::ImageToImageFilter < TInputImage, TInputImage >
17 {
18 public:
19 
21  typedef typename TInputImage::PixelType InputPixelType;
22  typedef double OutputPixelType;
23 
25  typedef TInputImage InputImageType;
26  typedef typename InputImageType::Pointer InputImagePointer;
27  typedef typename InputImageType::RegionType InputImageRegionType;
28  typedef typename InputImageType::IndexType InputImageIndexType;
29 
30  typedef InputImageType OutputImageType;
31  typedef typename OutputImageType::Pointer OutputImagePointer;
32  typedef typename OutputImageType::RegionType OutputImageRegionType;
33 
36  typedef itk::ImageToImageFilter< InputImageType, OutputImageType> Superclass;
37 
39  typedef itk::SmartPointer<Self> Pointer;
40  typedef itk::SmartPointer<const Self> ConstPointer;
41 
43  itkNewMacro(Self)
44 
45 
46  itkTypeMacro(NonLocalMeansTemporalImageFilter, itk::ImageToImageFilter)
47 
48 
49  itkStaticConstMacro(InputImageDimension, unsigned int,
50  TInputImage::ImageDimension);
51  itkStaticConstMacro(OutputImageDimension, unsigned int,
52  TInputImage::ImageDimension);
53 
55  enum WEIGHT
56  {
58  };
59 
60  itkSetMacro(PatchHalfSize, unsigned int)
61  itkSetMacro(SearchNeighborhood, unsigned int)
62  itkSetMacro(SearchStepSize, unsigned int)
63  itkSetMacro(WeightThreshold, double)
64  itkSetMacro(BetaParameter, double)
65  itkSetMacro(MeanMinThreshold, double)
66  itkSetMacro(VarMinThreshold, double)
67  itkSetMacro(WeightMethod, WEIGHT)
68 
69 protected:
71  m_MeanMinThreshold(0.95),
72  m_VarMinThreshold(0.5),
73  m_WeightThreshold(0.0),
74  m_BetaParameter(1.0),
75  m_PatchHalfSize(1),
76  m_SearchStepSize(1),
77  m_SearchNeighborhood(5),
78  m_WeightMethod(EXP)
79  {}
80 
82 
83  void GenerateData() ITK_OVERRIDE;
84 
85 private:
86  ITK_DISALLOW_COPY_AND_ASSIGN(NonLocalMeansTemporalImageFilter);
87 
88  double m_MeanMinThreshold;
89  double m_VarMinThreshold;
90  double m_WeightThreshold;
91  double m_BetaParameter;
92 
93  unsigned int m_PatchHalfSize;
94  unsigned int m_SearchStepSize;
95  unsigned int m_SearchNeighborhood;
96  WEIGHT m_WeightMethod;
97 };
98 
99 } //end of namespace anima
100 
itk::ImageToImageFilter< InputImageType, OutputImageType > Superclass