00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkVectorCurvatureAnisotropicDiffusionImageFilter_h_
00018 #define __itkVectorCurvatureAnisotropicDiffusionImageFilter_h_
00019
00020 #include "itkExceptionObject.h"
00021 #include "itkAnisotropicDiffusionImageFilter.h"
00022 #include "itkVectorCurvatureNDAnisotropicDiffusionFunction.h"
00023
00024 namespace itk {
00025
00060 template <class TInputImage, class TOutputImage>
00061 class ITK_EXPORT VectorCurvatureAnisotropicDiffusionImageFilter
00062 : public AnisotropicDiffusionImageFilter<TInputImage, TOutputImage>
00063 {
00064 public:
00066 typedef VectorCurvatureAnisotropicDiffusionImageFilter Self;
00067 typedef AnisotropicDiffusionImageFilter<TInputImage, TOutputImage>
00068 Superclass;
00069 typedef SmartPointer<Self> Pointer;
00070 typedef SmartPointer<const Self> ConstPointer;
00071
00073 itkNewMacro(Self);
00074
00076 itkTypeMacro(VectorCurvatureAnisotropicDiffusionImageFilter,
00077 AnisotropicDiffusionImageFilter);
00078
00080 typedef typename Superclass::UpdateBufferType UpdateBufferType;
00081
00083 itkStaticConstMacro(ImageDimension, unsigned int,
00084 Superclass::ImageDimension );
00085
00086 #ifdef ITK_USE_CONCEPT_CHECKING
00087
00088 itkConceptMacro(InputHasNumericTraitsCheck,
00089 (Concept::HasNumericTraits<typename TInputImage::PixelType::ValueType>));
00090 itkConceptMacro(OutputHasNumericTraitsCheck,
00091 (Concept::HasNumericTraits<typename TOutputImage::PixelType::ValueType>));
00092
00094 #endif
00095
00096 protected:
00097 VectorCurvatureAnisotropicDiffusionImageFilter()
00098 {
00099 typename VectorCurvatureNDAnisotropicDiffusionFunction<UpdateBufferType>::Pointer q
00100 = VectorCurvatureNDAnisotropicDiffusionFunction<UpdateBufferType>::New();
00101 this->SetDifferenceFunction(q);
00102 }
00103 ~VectorCurvatureAnisotropicDiffusionImageFilter() {}
00104
00105 virtual void InitializeIteration()
00106 {
00107 Superclass::InitializeIteration();
00108 if (this->GetTimeStep() > 0.5 / vcl_pow(2.0, static_cast<double>(ImageDimension)) )
00109 {
00110 itkWarningMacro(<< "Anisotropic diffusion has attempted to use a time step which may introduce instability into the solution." );
00111 }
00112 }
00113
00114 void PrintSelf(std::ostream& os, Indent indent) const
00115 { Superclass::PrintSelf(os,indent); }
00116 private:
00117 VectorCurvatureAnisotropicDiffusionImageFilter(const Self&);
00118 void operator=(const Self&);
00119 };
00120
00121 }
00122
00123 #endif
00124