Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkVectorCurvatureAnisotropicDiffusionImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkVectorCurvatureAnisotropicDiffusionImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2003/09/10 14:28:59 $
00007   Version:   $Revision: 1.16 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
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 protected:
00087   VectorCurvatureAnisotropicDiffusionImageFilter()
00088   {
00089     typename VectorCurvatureNDAnisotropicDiffusionFunction<UpdateBufferType>::Pointer q
00090       = VectorCurvatureNDAnisotropicDiffusionFunction<UpdateBufferType>::New();
00091     this->SetDifferenceFunction(q);
00092   }
00093   ~VectorCurvatureAnisotropicDiffusionImageFilter() {}
00094 
00095   virtual void InitializeIteration()
00096   {
00097     Superclass::InitializeIteration();
00098     if (this->GetTimeStep() >  0.5 / pow(2.0, static_cast<double>(ImageDimension))  )
00099       {
00100       itkWarningMacro(<< "Anisotropic diffusion has attempted to use a time step which may introduce instability into the solution." );
00101       }
00102   }
00103   
00104   void PrintSelf(std::ostream& os, Indent indent) const
00105   { Superclass::PrintSelf(os,indent);  }
00106 private:
00107   VectorCurvatureAnisotropicDiffusionImageFilter(const Self&); //purposely not implemented
00108   void operator=(const Self&); //purposely not implemented
00109 };
00110 
00111 } // end namspace itk
00112 
00113 #endif

Generated at Thu May 25 00:11:34 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000