00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkPolyLineParametricPath.h,v $ 00005 Language: C++ 00006 Date: $Date: 2005/07/13 22:32:22 $ 00007 Version: $Revision: 1.6 $ 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 00018 #ifndef _itkPolyLineParametricPathPath_h 00019 #define _itkPolyLineParametricPathPath_h 00020 00021 #include "itkParametricPath.h" 00022 #include "itkVectorContainer.h" 00023 #include "itkContinuousIndex.h" 00024 #include "itkIndex.h" 00025 #include "itkOffset.h" 00026 #include "itkVector.h" 00027 00028 namespace itk 00029 { 00030 00031 00055 template <unsigned int VDimension> 00056 class ITK_EXPORT PolyLineParametricPath : public 00057 ParametricPath< VDimension > 00058 { 00059 public: 00061 typedef PolyLineParametricPath Self; 00062 typedef ParametricPath<VDimension> Superclass; 00063 typedef SmartPointer<Self> Pointer; 00064 typedef SmartPointer<const Self> ConstPointer; 00065 00067 itkTypeMacro(PolyLineParametricPath, ParametricPath); 00068 00070 typedef typename Superclass::InputType InputType; 00071 00073 typedef typename Superclass::OutputType OutputType; 00074 00075 00077 typedef ContinuousIndex<double,VDimension> ContinuousIndexType; 00078 typedef Index< VDimension > IndexType; 00079 typedef Offset< VDimension > OffsetType; 00080 typedef Point<double,VDimension> PointType; 00081 typedef Vector<double,VDimension> VectorType; 00082 typedef ContinuousIndexType VertexType; 00083 typedef VectorContainer<unsigned, VertexType> VertexListType; 00084 typedef typename VertexListType::Pointer VertexListPointer; 00085 00086 00088 virtual OutputType Evaluate( const InputType & input ) const; 00089 00091 // * input. This is an exact, algebraic function. */ 00092 //virtual VectorType EvaluateDerivative(const InputType & input) const; 00093 00098 inline void AddVertex( const ContinuousIndexType & vertex ) 00099 { 00100 m_VertexList->InsertElement( m_VertexList->Size(), vertex ); 00101 this->Modified(); 00102 } 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&); //purposely not implemented 00131 void operator=(const Self&); //purposely not implemented 00132 00133 VertexListPointer m_VertexList; 00134 }; 00135 00136 } // namespace itk 00137 00138 #ifndef ITK_MANUAL_INSTANTIATION 00139 #include "itkPolyLineParametricPath.txx" 00140 #endif 00141 00142 #endif