1 #ifndef __cpExtensions__DataStructures__PolyLineParametricPath__h__
2 #define __cpExtensions__DataStructures__PolyLineParametricPath__h__
4 #include <itkPolyLineParametricPath.h>
5 #include <itkImageBase.h>
9 namespace DataStructures
13 template< unsigned int _VDim >
14 class PolyLineParametricPath
15 : public itk::PolyLineParametricPath< _VDim >
18 typedef PolyLineParametricPath Self;
19 typedef itk::PolyLineParametricPath< _VDim > Superclass;
20 typedef itk::SmartPointer< Self > Pointer;
21 typedef itk::SmartPointer< const Self > ConstPointer;
23 typedef itk::ImageBase< _VDim > TImageBase;
24 typedef typename TImageBase::SpacingType TSpacing;
25 typedef typename TImageBase::PointType TPoint;
26 typedef typename TImageBase::DirectionType TDirection;
27 typedef typename Superclass::ContinuousIndexType TContinuousIndex;
31 itkTypeMacro( PolyLineParametricPath, itk::PolyLineParametricPath );
33 itkGetConstReferenceMacro( Spacing, TSpacing );
34 itkGetConstReferenceMacro( Origin, TPoint );
35 itkGetConstReferenceMacro( Direction, TDirection );
36 itkGetConstReferenceMacro( InverseDirection, TDirection );
38 itkSetMacro( Origin, TPoint );
41 unsigned long GetSize( ) const;
42 TContinuousIndex GetVertex( unsigned long i ) const;
43 TPoint GetPoint( unsigned long i ) const;
45 virtual void SetSpacing( const TSpacing& spac );
46 virtual void SetSpacing( const double spac[ _VDim ] );
47 virtual void SetSpacing( const float spac[ _VDim ] );
48 virtual void SetOrigin( const double ori[ _VDim ] );
49 virtual void SetOrigin( const float ori[ _VDim ] );
50 virtual void SetDirection( const TDirection& dir );
52 template< class _TRefImage >
53 inline void SetReferenceImage( const _TRefImage* image )
55 this->SetSpacing( image->GetSpacing( ) );
56 this->SetOrigin( image->GetOrigin( ) );
57 this->SetDirection( image->GetDirection( ) );
61 PolyLineParametricPath( );
62 virtual ~PolyLineParametricPath( );
64 virtual void _ComputeIndexToPhysicalPointMatrices( );
67 // Purposely not implemented
68 PolyLineParametricPath( const Self& other );
69 Self& operator=( const Self& other );
74 TDirection m_Direction;
75 TDirection m_InverseDirection;
76 TDirection m_IndexToPhysicalPoint;
77 TDirection m_PhysicalPointToIndex;
84 #ifndef ITK_MANUAL_INSTANTIATION
85 # include <cpExtensions/DataStructures/PolyLineParametricPath.hxx>
86 #endif // ITK_MANUAL_INSTANTIATION
88 #endif // __cpExtensions__DataStructures__PolyLineParametricPath__h__