00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkFiniteDifferenceSparseImageFunction.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:29:07 $ 00007 Version: $Revision: 1.7 $ 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 __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&); //purposely not implemented 00115 void operator=(const Self&); //purposely not implemented 00116 }; 00117 00118 } // end namespace itk 00119 00120 #ifndef ITK_MANUAL_INSTANTIATION 00121 #include "itkFiniteDifferenceSparseImageFunction.txx" 00122 #endif 00123 00124 #endif