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: 2008-10-17 16:30:54 $
00007   Version:   $Revision: 1.19 $
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 #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 private:
00115   VectorCurvatureAnisotropicDiffusionImageFilter(const Self&); //purposely not implemented
00116   void operator=(const Self&); //purposely not implemented
00117 };
00118 
00119 } // end namspace itk
00120 
00121 #endif
00122 

Generated at Fri Apr 16 19:54:05 2010 for ITK by doxygen 1.6.1 written by Dimitri van Heesch, © 1997-2000