1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
6 #ifndef __fpa__Image__PolyLineParametricPath__h__
7 #define __fpa__Image__PolyLineParametricPath__h__
9 #include <itkPolyLineParametricPath.h>
10 #include <itkImageBase.h>
18 template< unsigned int _VDim >
19 class PolyLineParametricPath
20 : public itk::PolyLineParametricPath< _VDim >
23 typedef PolyLineParametricPath Self;
24 typedef itk::PolyLineParametricPath< _VDim > Superclass;
25 typedef itk::SmartPointer< Self > Pointer;
26 typedef itk::SmartPointer< const Self > ConstPointer;
28 typedef itk::ImageBase< _VDim > TImageBase;
29 typedef typename TImageBase::SpacingType TSpacing;
30 typedef typename TImageBase::PointType TPoint;
31 typedef typename TImageBase::DirectionType TDirection;
32 typedef typename Superclass::ContinuousIndexType TContinuousIndex;
33 typedef typename TContinuousIndex::IndexType TIndex;
37 itkTypeMacro( PolyLineParametricPath, itk::PolyLineParametricPath );
39 itkGetConstReferenceMacro( Spacing, TSpacing );
40 itkGetConstReferenceMacro( Origin, TPoint );
41 itkGetConstReferenceMacro( Direction, TDirection );
42 itkGetConstReferenceMacro( InverseDirection, TDirection );
44 itkSetMacro( Origin, TPoint );
47 unsigned long GetSize( ) const;
48 TContinuousIndex GetContinuousVertex( unsigned long i ) const;
49 TIndex GetVertex( unsigned long i ) const;
50 TPoint GetPoint( unsigned long i ) const;
52 virtual void SetSpacing( const TSpacing& spac );
53 virtual void SetSpacing( const double spac[ _VDim ] );
54 virtual void SetSpacing( const float spac[ _VDim ] );
55 virtual void SetOrigin( const double ori[ _VDim ] );
56 virtual void SetOrigin( const float ori[ _VDim ] );
57 virtual void SetDirection( const TDirection& dir );
59 template< class _TRefImage >
60 inline void SetReferenceImage( const _TRefImage* image )
62 this->SetSpacing( image->GetSpacing( ) );
63 this->SetOrigin( image->GetOrigin( ) );
64 this->SetDirection( image->GetDirection( ) );
68 PolyLineParametricPath( );
69 virtual ~PolyLineParametricPath( );
71 virtual void _ComputeIndexToPhysicalPointMatrices( );
74 // Purposely not implemented
75 PolyLineParametricPath( const Self& other );
76 Self& operator=( const Self& other );
81 TDirection m_Direction;
82 TDirection m_InverseDirection;
83 TDirection m_IndexToPhysicalPoint;
84 TDirection m_PhysicalPointToIndex;
91 #ifndef ITK_MANUAL_INSTANTIATION
92 # include <fpa/Image/PolyLineParametricPath.hxx>
93 #endif // ITK_MANUAL_INSTANTIATION
95 #endif // __fpa__Image__PolyLineParametricPath__h__