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

itkCurvatureAnisotropicDiffusionImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkCurvatureAnisotropicDiffusionImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2006/03/27 17:01:04 $
00007   Version:   $Revision: 1.31 $
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 __itkCurvatureAnisotropicDiffusionImageFilter_h_
00018 #define __itkCurvatureAnisotropicDiffusionImageFilter_h_
00019 
00020 #include "itkAnisotropicDiffusionImageFilter.h"
00021 #include "itkCurvatureNDAnisotropicDiffusionFunction.h"
00022 #include "itkMacro.h"
00023 namespace itk {
00024 
00054 template <class TInputImage, class TOutputImage>
00055 class ITK_EXPORT CurvatureAnisotropicDiffusionImageFilter
00056   : public AnisotropicDiffusionImageFilter<TInputImage, TOutputImage>
00057 {
00058 public:
00059 
00061   typedef CurvatureAnisotropicDiffusionImageFilter Self;
00062   typedef AnisotropicDiffusionImageFilter<TInputImage, TOutputImage>
00063   Superclass;
00064   typedef SmartPointer<Self> Pointer;
00065   typedef SmartPointer<const Self> ConstPointer;
00066 
00068   itkNewMacro(Self);
00069 
00071   itkTypeMacro(CurvatureAnisotropicDiffusionImageFilter,
00072                AnisotropicDiffusionImageFilter);
00073 
00075   typedef typename Superclass::UpdateBufferType UpdateBufferType;
00076 
00078   itkStaticConstMacro(ImageDimension, unsigned int,
00079                       Superclass::ImageDimension);
00080 
00081 #ifdef ITK_USE_CONCEPT_CHECKING
00082 
00083   itkConceptMacro(OutputHasNumericTraitsCheck,
00084     (Concept::HasNumericTraits<typename TOutputImage::PixelType>));
00085 
00087 #endif
00088 
00089 protected:
00090   CurvatureAnisotropicDiffusionImageFilter()
00091   {
00092     typename CurvatureNDAnisotropicDiffusionFunction<UpdateBufferType>::Pointer q
00093       = CurvatureNDAnisotropicDiffusionFunction<UpdateBufferType>::New();
00094     this->SetDifferenceFunction(q);
00095   }
00096   ~CurvatureAnisotropicDiffusionImageFilter() {}
00097 
00098   virtual void InitializeIteration()
00099   {
00100     Superclass::InitializeIteration();
00101     if (this->GetTimeStep() >  0.5 / vcl_pow(2.0, static_cast<double>(ImageDimension))  )
00102       {
00103       itkWarningMacro(<< "Anisotropic diffusion is using a time step which may introduce instability into the solution." );
00104       }
00105   }
00106   
00107 private:
00108   CurvatureAnisotropicDiffusionImageFilter(const Self&); //purposely not implemented
00109   void operator=(const Self&); //purposely not implemented
00110 
00111 };
00112 
00113 } // end namspace itk
00114 
00115 #endif
00116 

Generated at Tue Jul 29 19:41:20 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000