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:
00050 typedef FiniteDifferenceSparseImageFunction Self;
00051 typedef FiniteDifferenceFunction<TSparseImageType> Superclass;
00052 typedef SmartPointer<Self> Pointer;
00053 typedef SmartPointer<const Self> ConstPointer;
00054
00056 itkTypeMacro( FiniteDifferenceSparseImageFunction, FiniteDifferenceFunction );
00057
00059 itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension);
00060
00062 typedef typename Superclass::PixelType PixelType;
00063 typedef typename Superclass::TimeStepType TimeStepType;
00064 typedef typename Superclass::RadiusType RadiusType;
00065 typedef typename Superclass::NeighborhoodType NeighborhoodType;
00066 typedef typename Superclass::FloatOffsetType FloatOffsetType;
00067 typedef typename Superclass::ImageType SparseImageType;
00068
00070 typedef typename SparseImageType::IndexType IndexType;
00071
00073 typedef typename SparseImageType::NodeType NodeType;
00074
00076 typedef typename NodeType::NodeDataType NodeDataType;
00077
00082 virtual PixelType ComputeUpdate(const NeighborhoodType&,
00083 void*,
00084 const FloatOffsetType&)
00085 {
00086 return static_cast<PixelType>(0);
00087 }
00088
00091 virtual NodeDataType
00092 ComputeSparseUpdate(NeighborhoodType &neighborhood,
00093 void *globalData,
00094 const FloatOffsetType &offset = FloatOffsetType(0.0))
00095 const = 0;
00096
00106 virtual void PrecomputeSparseUpdate( NeighborhoodType& ) const {};
00107
00108 protected:
00109 FiniteDifferenceSparseImageFunction() {};
00110 ~FiniteDifferenceSparseImageFunction() {};
00111 void PrintSelf(std::ostream& os, Indent indent) const;
00112
00113 private:
00114 FiniteDifferenceSparseImageFunction(const Self&);
00115 void operator=(const Self&);
00116 };
00117
00118 }
00119
00120 #ifndef ITK_MANUAL_INSTANTIATION
00121 #include "itkFiniteDifferenceSparseImageFunction.txx"
00122 #endif
00123
00124 #endif