00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkFiniteDifferenceSparseImageFunction_h_
00018 #define __itkFiniteDifferenceSparseImageFunction_h_
00019
00020 #include "itkFiniteDifferenceFunction.h"
00021
00022 namespace itk {
00023
00044 template <class TSparseImageType>
00045 class ITK_EXPORT FiniteDifferenceSparseImageFunction
00046 :public FiniteDifferenceFunction <TSparseImageType>
00047 {
00048 public:
00049
00051 typedef FiniteDifferenceSparseImageFunction Self;
00052 typedef FiniteDifferenceFunction<TSparseImageType> Superclass;
00053 typedef SmartPointer<Self> Pointer;
00054 typedef SmartPointer<const Self> ConstPointer;
00055
00057 itkTypeMacro( FiniteDifferenceSparseImageFunction, FiniteDifferenceFunction );
00058
00060 itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension);
00061
00063 typedef typename Superclass::PixelType PixelType;
00064 typedef typename Superclass::TimeStepType TimeStepType;
00065 typedef typename Superclass::RadiusType RadiusType;
00066 typedef typename Superclass::NeighborhoodType NeighborhoodType;
00067 typedef typename Superclass::FloatOffsetType FloatOffsetType;
00068 typedef typename Superclass::ImageType SparseImageType;
00069
00071 typedef typename SparseImageType::IndexType IndexType;
00072
00074 typedef typename SparseImageType::NodeType NodeType;
00075
00077 typedef typename NodeType::NodeDataType NodeDataType;
00078
00083 virtual PixelType ComputeUpdate(const NeighborhoodType&,
00084 void*,
00085 const FloatOffsetType&)
00086 {
00087 return static_cast<PixelType>(0);
00088 }
00089
00092 virtual NodeDataType
00093 ComputeSparseUpdate(NeighborhoodType &neighborhood,
00094 void *globalData,
00095 const FloatOffsetType &offset = FloatOffsetType(0.0))
00096 const = 0;
00097
00107 virtual void PrecomputeSparseUpdate( NeighborhoodType& ) const {};
00108
00109 protected:
00110 FiniteDifferenceSparseImageFunction() {};
00111 ~FiniteDifferenceSparseImageFunction() {};
00112 void PrintSelf(std::ostream& os, Indent indent) const;
00113
00114 private:
00115 FiniteDifferenceSparseImageFunction(const Self&);
00116 void operator=(const Self&);
00117 };
00118
00119 }
00120
00121 #ifndef ITK_MANUAL_INSTANTIATION
00122 #include "itkFiniteDifferenceSparseImageFunction.txx"
00123 #endif
00124
00125 #endif
00126