]> Creatis software - cpPlugins.git/blobdiff - lib/cpExtensions/DataStructures/PolyLineParametricPath.h
PolyLine updated.
[cpPlugins.git] / lib / cpExtensions / DataStructures / PolyLineParametricPath.h
index e8046eac90e76207393d1dcd66ed2e837d6761d0..3358d0fc4c13d130b6bb34b6ce23068c9eb8c2d3 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <itkPolyLineParametricPath.h>
 #include <itkImageBase.h>
+#include <cpExtensions/Algorithms/BezierCurveFunction.h>
 
 namespace cpExtensions
 {
@@ -26,6 +27,9 @@ namespace cpExtensions
       typedef typename TImageBase::DirectionType       TDirection;
       typedef typename Superclass::ContinuousIndexType TContinuousIndex;
 
+      typedef typename TPoint::VectorType TVector;
+      typedef cpExtensions::Algorithms::BezierCurveFunction< TVector > TBezier;
+
     public:
       itkNewMacro( Self );
       itkTypeMacro( PolyLineParametricPath, itk::PolyLineParametricPath );
@@ -38,9 +42,11 @@ namespace cpExtensions
       itkSetMacro( Origin, TPoint );
 
     public:
+      void AddVertex( const TContinuousIndex& vertex );
       unsigned long GetSize( ) const;
       TContinuousIndex GetVertex( unsigned long i ) const;
       TPoint GetPoint( unsigned long i ) const;
+      TPoint GetSmoothPoint( double u ) const;
 
       virtual void SetSpacing( const TSpacing& spac );
       virtual void SetSpacing( const double spac[ _VDim ] );
@@ -69,6 +75,8 @@ namespace cpExtensions
       Self& operator=( const Self& other );
 
     protected:
+      typename TBezier::Pointer m_Bezier;
       TSpacing   m_Spacing;
       TPoint     m_Origin;
       TDirection m_Direction;