00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkAnisotropicDiffusionImageFilter_h_
00018 #define __itkAnisotropicDiffusionImageFilter_h_
00019
00020 #include "itkDenseFiniteDifferenceImageFilter.h"
00021 #include "itkAnisotropicDiffusionFunction.h"
00022 #include "itkNumericTraits.h"
00023
00024 #define ITK_LEAN_AND_MEAN
00025
00026 namespace itk {
00027
00071 template <class TInputImage, class TOutputImage>
00072 class ITK_EXPORT AnisotropicDiffusionImageFilter
00073 : public DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>
00074 {
00075 public:
00077 typedef AnisotropicDiffusionImageFilter Self;
00078 typedef DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>
00079 Superclass;
00080 typedef SmartPointer<Self> Pointer;
00081 typedef SmartPointer<const Self> ConstPointer;
00082
00084 itkTypeMacro(AnisotropicDiffusionImageFilter,
00085 DenseFiniteDifferenceImageFilter);
00086
00088 typedef typename Superclass::InputImageType InputImageType;
00089 typedef typename Superclass::OutputImageType OutputImageType;
00090 typedef typename Superclass::UpdateBufferType UpdateBufferType;
00091
00094 itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension);
00095
00098 typedef typename Superclass::PixelType PixelType;
00099 typedef typename Superclass::TimeStepType TimeStepType;
00100
00102 itkSetMacro(TimeStep, TimeStepType);
00103 itkGetMacro(TimeStep, TimeStepType);
00104
00107 itkSetMacro(ConductanceParameter, double);
00108 itkGetMacro(ConductanceParameter, double);
00109
00112 itkSetMacro(ConductanceScalingUpdateInterval, unsigned int);
00113 itkGetMacro(ConductanceScalingUpdateInterval, unsigned int);
00114
00117 itkSetMacro(ConductanceScalingParameter, double);
00118 itkGetMacro(ConductanceScalingParameter, double);
00119
00127 void SetFixedAverageGradientMagnitude(double a)
00128 {
00129 m_FixedAverageGradientMagnitude= a;
00130 this->Modified();
00131 m_GradientMagnitudeIsFixed = true;
00132 }
00133 itkGetMacro(FixedAverageGradientMagnitude, double);
00134
00135 protected:
00136 AnisotropicDiffusionImageFilter();
00137 ~AnisotropicDiffusionImageFilter() {}
00138 void PrintSelf(std::ostream& os, Indent indent) const;
00139
00142
00143
00145 virtual void InitializeIteration();
00146
00147 bool m_GradientMagnitudeIsFixed;
00148
00149 private:
00150 AnisotropicDiffusionImageFilter(const Self&);
00151 void operator=(const Self&);
00152
00153 double m_ConductanceParameter;
00154 double m_ConductanceScalingParameter;
00155 unsigned int m_ConductanceScalingUpdateInterval;
00156 double m_FixedAverageGradientMagnitude;
00157
00158 TimeStepType m_TimeStep;
00159
00160 };
00161
00162 }
00163
00164 #ifndef ITK_MANUAL_INSTANTIATION
00165 #include "itkAnisotropicDiffusionImageFilter.txx"
00166 #endif
00167
00168 #undef ITK_LEAN_AND_MEAN
00169
00170 #endif