00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkCurvatureFlowImageFilter_h_
00018 #define __itkCurvatureFlowImageFilter_h_
00019
00020 #include "itkDenseFiniteDifferenceImageFilter.h"
00021 #include "itkCurvatureFlowFunction.h"
00022
00023 namespace itk {
00024
00087 template <class TInputImage, class TOutputImage>
00088 class CurvatureFlowImageFilter
00089 : public DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>
00090 {
00091 public:
00093 typedef CurvatureFlowImageFilter Self;
00094 typedef DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>
00095 Superclass;
00096 typedef SmartPointer<Self> Pointer;
00097 typedef SmartPointer<const Self> ConstPointer;
00098
00100 itkNewMacro(Self);
00101
00103 itkTypeMacro(CurvatureFlowImageFilter,
00104 DenseFiniteDifferenceImageFilter);
00105
00107 typedef typename Superclass::InputImageType InputImageType;
00108
00110 typedef typename Superclass::OutputImageType OutputImageType;
00111 typedef typename OutputImageType::Pointer OutputImagePointer;
00112
00114 typedef typename Superclass::FiniteDifferenceFunctionType
00115 FiniteDifferenceFunctionType;
00116
00118 typedef CurvatureFlowFunction<OutputImageType>
00119 CurvatureFlowFunctionType;
00120
00123 itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension);
00124
00127 typedef typename Superclass::PixelType PixelType;
00128
00130 typedef typename Superclass::TimeStepType TimeStepType;
00131
00133 itkSetMacro(NumberOfIterations, unsigned int);
00134
00136 itkGetMacro(NumberOfIterations, unsigned int);
00137
00139 itkSetMacro(TimeStep, TimeStepType);
00140
00142 itkGetMacro(TimeStep, TimeStepType);
00143
00144 protected:
00145 CurvatureFlowImageFilter();
00146 ~CurvatureFlowImageFilter() {}
00147 void PrintSelf(std::ostream& os, Indent indent) const;
00148
00151 virtual bool Halt()
00152 {
00153 if (this->GetElapsedIterations() == m_NumberOfIterations) return true;
00154 else return false;
00155 }
00156
00159 virtual void InitializeIteration();
00160
00164 virtual void EnlargeOutputRequestedRegion(DataObject *);
00165
00169 virtual void GenerateInputRequestedRegion();
00170
00171 private:
00172 CurvatureFlowImageFilter(const Self&);
00173 void operator=(const Self&);
00174
00175 unsigned int m_NumberOfIterations;
00176 TimeStepType m_TimeStep;
00177
00178 };
00179
00180 }
00181
00182 #ifndef ITK_MANUAL_INSTANTIATION
00183 #include "itkCurvatureFlowImageFilter.txx"
00184 #endif
00185
00186 #endif