1 // =========================================================================
2 // @author Leonardo Florez Valencia
3 // @email florez-l@javeriana.edu.co
4 // =========================================================================
5 #ifndef __ivq__ITK__ImagePath__h__
6 #define __ivq__ITK__ImagePath__h__
8 #include <itkPolyLineParametricPath.h>
9 #include <itkImageBase.h>
17 template< unsigned int _VDim >
19 : public itk::PolyLineParametricPath< _VDim >
22 typedef ImagePath Self;
23 typedef itk::PolyLineParametricPath< _VDim > Superclass;
24 typedef itk::SmartPointer< Self > Pointer;
25 typedef itk::SmartPointer< const Self > ConstPointer;
27 itkStaticConstMacro( Dimension, unsigned int, _VDim );
29 typedef itk::ImageBase< _VDim > TImageBase;
30 typedef typename TImageBase::SpacingType TSpacing;
31 typedef typename TImageBase::PointType TPoint;
32 typedef typename TImageBase::DirectionType TDirection;
33 typedef typename Superclass::ContinuousIndexType TContinuousIndex;
34 typedef typename TContinuousIndex::IndexType TIndex;
38 itkTypeMacro( ImagePath, itk::PolyLineParametricPath );
40 itkGetConstReferenceMacro( Spacing, TSpacing );
41 itkGetConstReferenceMacro( Origin, TPoint );
42 itkGetConstReferenceMacro( Direction, TDirection );
43 itkGetConstReferenceMacro( InverseDirection, TDirection );
45 itkSetMacro( Origin, TPoint );
48 unsigned long GetSize( ) const;
49 TContinuousIndex GetContinuousVertex( unsigned long i ) const;
50 TIndex GetVertex( unsigned long i ) const;
51 TPoint GetPoint( unsigned long i ) const;
53 virtual void SetSpacing( const TSpacing& spac );
54 virtual void SetSpacing( const double spac[ _VDim ] );
55 virtual void SetSpacing( const float spac[ _VDim ] );
56 virtual void SetOrigin( const double ori[ _VDim ] );
57 virtual void SetOrigin( const float ori[ _VDim ] );
58 virtual void SetDirection( const TDirection& dir );
59 virtual void SetReferenceImage( const TImageBase* image );
61 virtual void Graft( itk::DataObject* o );
65 virtual ~ImagePath( );
67 virtual void _ComputeIndexToPhysicalPointMatrices( );
70 // Purposely not implemented
71 ImagePath( const Self& other );
72 Self& operator=( const Self& other );
77 TDirection m_Direction;
78 TDirection m_InverseDirection;
79 TDirection m_IndexToPhysicalPoint;
80 TDirection m_PhysicalPointToIndex;
87 #ifndef ITK_MANUAL_INSTANTIATION
88 # include <ivq/ITK/Image/Path.hxx>
89 #endif // ITK_MANUAL_INSTANTIATION
90 #endif // __ivq__ITK__ImagePath__h__