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
namespace itk {
00025
00069
template <
class TInputImage,
class TOutputImage>
00070 class ITK_EXPORT AnisotropicDiffusionImageFilter
00071 :
public DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>
00072 {
00073
public:
00075 typedef AnisotropicDiffusionImageFilter
Self;
00076
typedef DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>
00077 Superclass;
00078 typedef SmartPointer<Self> Pointer;
00079 typedef SmartPointer<const Self> ConstPointer;
00080
00082
itkTypeMacro(AnisotropicDiffusionImageFilter,
00083
DenseFiniteDifferenceImageFilter);
00084
00086 typedef typename Superclass::InputImageType
InputImageType;
00087 typedef typename Superclass::OutputImageType
OutputImageType;
00088 typedef typename Superclass::UpdateBufferType
UpdateBufferType;
00089
00092
itkStaticConstMacro(ImageDimension,
unsigned int,Superclass::ImageDimension);
00093
00096 typedef typename Superclass::PixelType
PixelType;
00097 typedef typename Superclass::TimeStepType
TimeStepType;
00098
00100
itkSetMacro(NumberOfIterations,
unsigned int);
00101
itkGetMacro(NumberOfIterations,
unsigned int);
00102
00104
itkSetMacro(TimeStep,
TimeStepType);
00105
itkGetMacro(TimeStep,
TimeStepType);
00106
00109
itkSetMacro(ConductanceParameter,
double);
00110
itkGetMacro(ConductanceParameter,
double);
00111
00114
itkSetMacro(ConductanceScalingUpdateInterval,
unsigned int);
00115
itkGetMacro(ConductanceScalingUpdateInterval,
unsigned int);
00116
00119
itkSetMacro(ConductanceScalingParameter,
double);
00120
itkGetMacro(ConductanceScalingParameter,
double);
00121
00129
void SetFixedAverageGradientMagnitude(
double a)
00130 {
00131 m_FixedAverageGradientMagnitude= a;
00132 this->Modified();
00133 m_GradientMagnitudeIsFixed =
true;
00134 }
00135
itkGetMacro(FixedAverageGradientMagnitude,
double);
00136
00137
protected:
00138 AnisotropicDiffusionImageFilter();
00139 ~AnisotropicDiffusionImageFilter() {}
00140
void PrintSelf(std::ostream& os, Indent indent)
const;
00141
00144
virtual bool Halt();
00145
00147
virtual void InitializeIteration();
00148
00149
bool m_GradientMagnitudeIsFixed;
00150
00151
private:
00152 AnisotropicDiffusionImageFilter(
const Self&);
00153
void operator=(
const Self&);
00154
00155 double m_ConductanceParameter;
00156
double m_ConductanceScalingParameter;
00157
unsigned int m_NumberOfIterations;
00158
unsigned int m_ConductanceScalingUpdateInterval;
00159
double m_FixedAverageGradientMagnitude;
00160
00161
TimeStepType m_TimeStep;
00162
00163 };
00164
00165 }
00166
00167
#ifndef ITK_MANUAL_INSTANTIATION
00168
#include "itkAnisotropicDiffusionImageFilter.txx"
00169
#endif
00170
00171
#endif