1 #ifndef __cpExtensions__DataStructures__Simple3DCurve__h__
2 #define __cpExtensions__DataStructures__Simple3DCurve__h__
4 #include <cpExtensions/Config.h>
5 #include <itkDataObject.h>
6 #include <itkObjectFactory.h>
10 namespace cpExtensions
12 namespace DataStructures
16 template< class _TScalar >
17 class cpExtensions_EXPORT Simple3DCurve
18 : public itk::DataObject
21 typedef Simple3DCurve Self;
22 typedef itk::DataObject Superclass;
23 typedef itk::SmartPointer< Self > Pointer;
24 typedef itk::SmartPointer< const Self > ConstPointer;
26 typedef itk::Matrix< _TScalar, 3, 3 > TMatrix;
27 typedef itk::Point< _TScalar, 3 > TPoint;
28 typedef typename TPoint::VectorType TVector;
32 itkTypeMacro( Simple3DCurve, itk::DataObject );
35 template< class _TVector >
36 inline void AddPoint( const _TVector& v )
42 this->m_Points.push_back( p );
46 virtual void Modified( ) const cpExtensions_OVERRIDE;
48 unsigned long GetNumberOfPoints( ) const;
49 const TMatrix& GetFrame( unsigned int id ) const;
50 const TPoint& GetPoint( unsigned int id ) const;
51 TVector GetVector( unsigned int id ) const;
55 virtual ~Simple3DCurve( );
58 // Purposely not implemented
59 Simple3DCurve( const Self& other );
60 Self& operator=( const Self& other );
63 std::vector< TPoint > m_Points;
64 mutable std::vector< TMatrix > m_Frames;
65 mutable bool m_FramesUpdated;
72 #endif // __cpExtensions__DataStructures__Simple3DCurve__h__