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

itkFiniteDifferenceFunction.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkFiniteDifferenceFunction.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:29:07 $ 00007 Version: $Revision: 1.14 $ 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 __itkFiniteDifferenceFunction_h_ 00018 #define __itkFiniteDifferenceFunction_h_ 00019 00020 #include "itkLightObject.h" 00021 #include "itkConstNeighborhoodIterator.h" 00022 #include "itkZeroFluxNeumannBoundaryCondition.h" 00023 #include "itkVector.h" 00024 00025 namespace itk { 00026 00063 template<class TImageType> 00064 class ITK_EXPORT FiniteDifferenceFunction : public LightObject 00065 { 00066 public: 00068 typedef FiniteDifferenceFunction Self; 00069 typedef LightObject Superclass; 00070 00071 typedef SmartPointer<Self> Pointer; 00072 typedef SmartPointer<const Self> ConstPointer; 00073 00075 itkTypeMacro( FiniteDifferenceFunction, LightObject ); 00076 00078 typedef TImageType ImageType; 00079 typedef typename ImageType::PixelType PixelType; 00080 00082 itkStaticConstMacro(ImageDimension, unsigned int, ImageType::ImageDimension); 00083 00085 typedef double TimeStepType; 00086 00089 typedef ZeroFluxNeumannBoundaryCondition<ImageType> 00090 DefaultBoundaryConditionType; 00091 00093 typedef typename ConstNeighborhoodIterator<TImageType>::RadiusType RadiusType; 00094 00097 typedef ConstNeighborhoodIterator<TImageType, DefaultBoundaryConditionType> NeighborhoodType; 00098 00101 typedef Vector<float,itkGetStaticConstMacro(ImageDimension)> FloatOffsetType; 00102 00112 virtual void InitializeIteration() {}; 00113 00127 virtual PixelType ComputeUpdate(const NeighborhoodType &neighborhood, 00128 void *globalData, 00129 const FloatOffsetType &offset = FloatOffsetType(0.0)) = 0; 00130 00131 00134 void SetRadius(const RadiusType &r) 00135 { m_Radius = r; } 00136 00139 const RadiusType &GetRadius() const 00140 { return m_Radius; } 00141 00148 virtual TimeStepType ComputeGlobalTimeStep(void *GlobalData) const =0; 00149 00157 virtual void *GetGlobalDataPointer() const =0; 00158 00164 virtual void ReleaseGlobalDataPointer(void *GlobalData) const =0; 00165 00166 protected: 00167 FiniteDifferenceFunction() 00168 { 00169 // initialize variables 00170 m_Radius.Fill( 0 ); 00171 } 00172 00173 ~FiniteDifferenceFunction() {} 00174 void PrintSelf(std::ostream& os, Indent indent) const; 00175 00176 RadiusType m_Radius; 00177 00178 private: 00179 FiniteDifferenceFunction(const Self&); //purposely not implemented 00180 void operator=(const Self&); //purposely not implemented 00181 }; 00182 00183 } // end namespace itk 00184 00185 #ifndef ITK_MANUAL_INSTANTIATION 00186 #include "itkFiniteDifferenceFunction.txx" 00187 #endif 00188 00189 #endif

Generated at Sat Mar 31 02:18:32 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000