00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkPolyLineParametricPath.h,v $ 00005 Language: C++ 00006 Date: $Date: 2006/02/06 22:01:58 $ 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 __itkPolyLineParametricPathPath_h 00018 #define __itkPolyLineParametricPathPath_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 //virtual VectorType EvaluateDerivative(const InputType & input) const; 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&); //purposely not implemented 00131 void operator=(const Self&); //purposely not implemented 00132 00133 VertexListPointer m_VertexList; 00134 }; 00135 00136 } // end namespace itk 00137 00138 #ifndef ITK_MANUAL_INSTANTIATION 00139 #include "itkPolyLineParametricPath.txx" 00140 #endif 00141 00142 #endif 00143