00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _itkPath_h
00019 #define _itkPath_h
00020
00021
00022 #include "itkDataObject.h"
00023 #include "itkIndex.h"
00024 #include "itkOffset.h"
00025 #include "itkNumericTraits.h"
00026
00027 namespace itk
00028 {
00029
00030
00050 template <class TInput, class TOutput, unsigned int VDimension>
00051 class ITK_EXPORT Path : public DataObject
00052 {
00053 public:
00055 typedef Path Self;
00056 typedef DataObject Superclass;
00057 typedef SmartPointer<Self> Pointer;
00058 typedef SmartPointer<const Self> ConstPointer;
00059
00061 itkTypeMacro(Path, FunctionBase);
00062
00064 typedef TInput InputType;
00065
00067 typedef TOutput OutputType;
00068
00069
00071 typedef Index< VDimension > IndexType;
00072 typedef Offset< VDimension > OffsetType;
00073
00074
00078 virtual inline InputType StartOfInput() const
00079 {
00080 return NumericTraits<InputType>::Zero;
00081 }
00082
00085 virtual inline InputType EndOfInput() const
00086 {
00087 return NumericTraits<InputType>::One;
00088 }
00089
00092 virtual OutputType Evaluate( const InputType & input ) const = 0;
00093
00095 virtual IndexType EvaluateToIndex( const InputType & input ) const = 0;
00096
00105 virtual OffsetType IncrementInput(InputType & input) const = 0;
00106
00107
00108 protected:
00109 Path();
00110 ~Path(){}
00111
00112 void PrintSelf(std::ostream& os, Indent indent) const;
00113
00114 itkGetConstMacro(ZeroOffset,OffsetType);
00115 itkGetConstMacro(ZeroIndex,IndexType);
00116
00117 private:
00118 Path(const Self&);
00119 void operator=(const Self&);
00120
00121
00122 OffsetType m_ZeroOffset;
00123 IndexType m_ZeroIndex;
00124
00125 };
00126
00127 }
00128
00129 #ifndef ITK_MANUAL_INSTANTIATION
00130 #include "itkPath.txx"
00131 #endif
00132
00133 #endif