itkPolyLineParametricPath.h
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 __itkPolyLineParametricPath_h
00018 #define __itkPolyLineParametricPath_h
00019
00020 #include "itkParametricPath.h"
00021 #include "itkVectorContainer.h"
00022 #include "itkContinuousIndex.h"
00023 #include "itkIndex.h"
00024 #include "itkOffset.h"
00025 #include "itkVector.h"
00026
00027 namespace itk
00028 {
00029
00030
00054 template <unsigned int VDimension>
00055 class ITK_EXPORT PolyLineParametricPath : public
00056 ParametricPath< VDimension >
00057 {
00058 public:
00060 typedef PolyLineParametricPath Self;
00061 typedef ParametricPath<VDimension> Superclass;
00062 typedef SmartPointer<Self> Pointer;
00063 typedef SmartPointer<const Self> ConstPointer;
00064
00066 itkTypeMacro(PolyLineParametricPath, ParametricPath);
00067
00069 typedef typename Superclass::InputType InputType;
00070
00072 typedef typename Superclass::OutputType OutputType;
00073
00074
00076 typedef ContinuousIndex<double,VDimension> ContinuousIndexType;
00077 typedef Index< VDimension > IndexType;
00078 typedef Offset< VDimension > OffsetType;
00079 typedef Point<double,VDimension> PointType;
00080 typedef Vector<double,VDimension> VectorType;
00081 typedef ContinuousIndexType VertexType;
00082 typedef VectorContainer<unsigned, VertexType> VertexListType;
00083 typedef typename VertexListType::Pointer VertexListPointer;
00084
00085
00087 virtual OutputType Evaluate( const InputType & input ) const;
00088
00091
00092
00097 inline void AddVertex( const ContinuousIndexType & vertex )
00098 {
00099 m_VertexList->InsertElement( m_VertexList->Size(), vertex );
00100 this->Modified();
00101 }
00103
00107 virtual inline InputType EndOfInput() const
00108 {
00109 return m_VertexList->Size() - 1;
00110 }
00111
00113 itkNewMacro( Self );
00114
00116 virtual void Initialize(void)
00117 {
00118 m_VertexList->Initialize();
00119 }
00120
00122 itkGetConstObjectMacro( VertexList, VertexListType );
00123
00124 protected:
00125 PolyLineParametricPath();
00126 ~PolyLineParametricPath(){}
00127 void PrintSelf(std::ostream& os, Indent indent) const;
00128
00129 private:
00130 PolyLineParametricPath(const Self&);
00131 void operator=(const Self&);
00132
00133 VertexListPointer m_VertexList;
00134 };
00135
00136 }
00137
00138
00139 #define ITK_TEMPLATE_PolyLineParametricPath(_, EXPORT, x, y) namespace itk { \
00140 _(1(class EXPORT PolyLineParametricPath< ITK_TEMPLATE_1 x >)) \
00141 namespace Templates { typedef PolyLineParametricPath< ITK_TEMPLATE_1 x > \
00142 PolyLineParametricPath##y; } \
00143 }
00144
00145 #if ITK_TEMPLATE_EXPLICIT
00146 # include "Templates/itkPolyLineParametricPath+-.h"
00147 #endif
00148
00149 #if ITK_TEMPLATE_TXX
00150 # include "itkPolyLineParametricPath.txx"
00151 #endif
00152
00153 #endif
00154