1 /* =======================================================================
2 * @author: Leonardo Florez-Valencia
3 * @email: florez-l@javeriana.edu.co
4 * =======================================================================
7 #ifndef __ivq__ITK__Simple3DCurve__h__
8 #define __ivq__ITK__Simple3DCurve__h__
10 #include <ivq/ivq_export.h>
12 #include <itkDataObject.h>
13 #include <itkObjectFactory.h>
14 #include <itkMatrix.h>
23 template< class _TScalar >
24 class IVQ_EXPORT Simple3DCurve
25 : public itk::DataObject
28 typedef Simple3DCurve Self;
29 typedef itk::DataObject Superclass;
30 typedef itk::SmartPointer< Self > Pointer;
31 typedef itk::SmartPointer< const Self > ConstPointer;
33 typedef _TScalar TScalar;
34 typedef itk::Matrix< TScalar, 3, 3 > TMatrix;
35 typedef itk::Point< TScalar, 3 > TPoint;
36 typedef typename TPoint::VectorType TVector;
40 itkTypeMacro( ivq::ITK::Simple3DCurve, itk::DataObject );
43 template< class _TVector >
44 inline void AddPoint( const _TVector& v )
50 this->m_Points.push_back( p );
54 virtual void Modified( ) const override;
56 void Smooth( const unsigned int& kernel_size = 1 );
57 unsigned long GetNumberOfPoints( ) const;
58 const TMatrix& GetFrame( unsigned int id ) const;
59 const TPoint& GetPoint( unsigned int id ) const;
60 TVector GetVector( unsigned int id ) const;
64 virtual ~Simple3DCurve( );
67 // Purposely not implemented
68 Simple3DCurve( const Self& other );
69 Self& operator=( const Self& other );
72 std::vector< TPoint > m_Points;
73 mutable std::vector< TMatrix > m_Frames;
74 mutable bool m_FramesUpdated;
81 #endif // __ivq__ITK__Simple3DCurve__h__