X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpExtensions%2FDataStructures%2FPolyLineParametricPath.h;h=7f122000948b60793d6f995152980e75939efd55;hb=80ac2c55630c2a345a2102f0be86843147a398cc;hp=e8046eac90e76207393d1dcd66ed2e837d6761d0;hpb=8eaa2cf759c39233848cdd5b8346faccbea4c172;p=cpPlugins.git diff --git a/lib/cpExtensions/DataStructures/PolyLineParametricPath.h b/lib/cpExtensions/DataStructures/PolyLineParametricPath.h index e8046ea..7f12200 100644 --- a/lib/cpExtensions/DataStructures/PolyLineParametricPath.h +++ b/lib/cpExtensions/DataStructures/PolyLineParametricPath.h @@ -3,6 +3,7 @@ #include #include +#include namespace cpExtensions { @@ -25,6 +26,10 @@ namespace cpExtensions typedef typename TImageBase::PointType TPoint; typedef typename TImageBase::DirectionType TDirection; typedef typename Superclass::ContinuousIndexType TContinuousIndex; + typedef typename TContinuousIndex::IndexType TIndex; + + typedef typename TPoint::VectorType TVector; + typedef cpExtensions::Algorithms::BezierCurveFunction< TVector > TBezier; public: itkNewMacro( Self ); @@ -38,9 +43,12 @@ namespace cpExtensions itkSetMacro( Origin, TPoint ); public: + void AddVertex( const TContinuousIndex& vertex ); unsigned long GetSize( ) const; - TContinuousIndex GetVertex( unsigned long i ) const; + TContinuousIndex GetContinuousVertex( unsigned long i ) const; + TIndex 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 +77,8 @@ namespace cpExtensions Self& operator=( const Self& other ); protected: + typename TBezier::Pointer m_Bezier; + TSpacing m_Spacing; TPoint m_Origin; TDirection m_Direction;