#include <itkMath.h>
#include <itkNumericTraits.h>
+// -------------------------------------------------------------------------
+template< unsigned int _VDim >
+void cpExtensions::DataStructures::PolyLineParametricPath< _VDim >::
+AddVertex( const TContinuousIndex& vertex )
+{
+ this->Superclass::AddVertex( vertex );
+ this->m_Bezier->AddPoint(
+ this->GetPoint( this->GetSize( ) - 1 ).GetVectorFromOrigin( )
+ );
+ this->Modified( );
+}
+
// -------------------------------------------------------------------------
template< unsigned int _VDim >
unsigned long cpExtensions::DataStructures::PolyLineParametricPath< _VDim >::
return( pnt );
}
+// -------------------------------------------------------------------------
+template< unsigned int _VDim >
+typename cpExtensions::DataStructures::PolyLineParametricPath< _VDim >::
+TPoint cpExtensions::DataStructures::PolyLineParametricPath< _VDim >::
+GetSmoothPoint( double u ) const
+{
+ TPoint p;
+ p.Fill( 0 );
+ p += this->m_Bezier->Evaluate( u );
+ return( p );
+}
+
// -------------------------------------------------------------------------
template< unsigned int _VDim >
void cpExtensions::DataStructures::PolyLineParametricPath< _VDim >::
PolyLineParametricPath( )
: Superclass( )
{
+ this->m_Bezier = TBezier::New( );
+
this->m_Spacing.Fill( 1.0 );
this->m_Origin.Fill( 0.0 );
this->m_Direction.SetIdentity( );