Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkPath_h
00018 #define __itkPath_h
00019
00020 #include "itkDataObject.h"
00021 #include "itkIndex.h"
00022 #include "itkOffset.h"
00023 #include "itkNumericTraits.h"
00024
00025 namespace itk
00026 {
00027
00028
00048 template <class TInput, class TOutput, unsigned int VDimension>
00049 class ITK_EXPORT Path : public DataObject
00050 {
00051 public:
00053 typedef Path Self;
00054 typedef DataObject Superclass;
00055 typedef SmartPointer<Self> Pointer;
00056 typedef SmartPointer<const Self> ConstPointer;
00057
00059 itkStaticConstMacro(PathDimension, unsigned int, VDimension);
00060
00062 itkTypeMacro(Path, FunctionBase);
00063
00065 typedef TInput InputType;
00066
00068 typedef TOutput OutputType;
00069
00070
00072 typedef Index< VDimension > IndexType;
00073 typedef Offset< VDimension > OffsetType;
00074
00075
00079 virtual inline InputType StartOfInput() const
00080 {
00081 return NumericTraits<InputType>::Zero;
00082 }
00083
00086 virtual inline InputType EndOfInput() const
00087 {
00088 return NumericTraits<InputType>::One;
00089 }
00090
00093 virtual OutputType Evaluate( const InputType & input ) const = 0;
00094
00096 virtual IndexType EvaluateToIndex( const InputType & input ) const = 0;
00097
00106 virtual OffsetType IncrementInput(InputType & input) const = 0;
00107
00108
00109 protected:
00110 Path();
00111 ~Path(){}
00112
00113 void PrintSelf(std::ostream& os, Indent indent) const;
00114
00115 itkGetConstMacro(ZeroOffset,OffsetType);
00116 itkGetConstMacro(ZeroIndex,IndexType);
00117
00118 private:
00119 Path(const Self&);
00120 void operator=(const Self&);
00121
00122
00123 OffsetType m_ZeroOffset;
00124 IndexType m_ZeroIndex;
00125
00126 };
00127
00128 }
00129
00130
00131 #define ITK_TEMPLATE_Path(_, EXPORT, x, y) namespace itk { \
00132 _(3(class EXPORT Path< ITK_TEMPLATE_3 x >)) \
00133 namespace Templates { typedef Path< ITK_TEMPLATE_3 x > Path##y; } \
00134 }
00135
00136 #if ITK_TEMPLATE_EXPLICIT
00137 # include "Templates/itkPath+-.h"
00138 #endif
00139
00140 #if ITK_TEMPLATE_TXX
00141 # include "itkPath.txx"
00142 #endif
00143
00144 #endif
00145