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 _TScalar TScalar;
27 typedef itk::Matrix< TScalar, 3, 3 > TMatrix;
28 typedef itk::Point< TScalar, 3 > TPoint;
29 typedef typename TPoint::VectorType TVector;
33 itkTypeMacro( Simple3DCurve, itk::DataObject );
36 template< class _TVector >
37 inline void AddPoint( const _TVector& v )
43 this->m_Points.push_back( p );
47 virtual void Modified( ) const cpExtensions_OVERRIDE;
49 unsigned long GetNumberOfPoints( ) const;
50 const TMatrix& GetFrame( unsigned int id ) const;
51 const TPoint& GetPoint( unsigned int id ) const;
52 TVector GetVector( unsigned int id ) const;
56 virtual ~Simple3DCurve( );
59 // Purposely not implemented
60 Simple3DCurve( const Self& other );
61 Self& operator=( const Self& other );
64 std::vector< TPoint > m_Points;
65 mutable std::vector< TMatrix > m_Frames;
66 mutable bool m_FramesUpdated;
73 #endif // __cpExtensions__DataStructures__Simple3DCurve__h__