]> Creatis software - cpPlugins.git/blob - lib/cpExtensions/DataStructures/PolyLineParametricPath.h
PolyLineParametricPath support added
[cpPlugins.git] / lib / cpExtensions / DataStructures / PolyLineParametricPath.h
1 #ifndef __CPEXTENSIONS__DATASTRUCTURES__POLYLINEPARAMETRICPATH__H__
2 #define __CPEXTENSIONS__DATASTRUCTURES__POLYLINEPARAMETRICPATH__H__
3
4 #include <itkPolyLineParametricPath.h>
5 #include <itkImageBase.h>
6
7 namespace cpExtensions
8 {
9   namespace DataStructures
10   {
11     /**
12      */
13     template< unsigned int _NDim >
14     class PolyLineParametricPath
15       : public itk::PolyLineParametricPath< _NDim >
16     {
17     public:
18       typedef PolyLineParametricPath               Self;
19       typedef itk::PolyLineParametricPath< _NDim > Superclass;
20       typedef itk::SmartPointer< Self >            Pointer;
21       typedef itk::SmartPointer< const Self >      ConstPointer;
22
23       typedef itk::ImageBase< _NDim > TImageBase;
24
25     public:
26       itkNewMacro( Self );
27       itkTypeMacro( PolyLineParametricPath, itk::PolyLineParametricPath );
28
29     public:
30       TImageBase* GetReferenceImage( )
31         { return( this->m_ReferenceImage ); }
32       const TImageBase* GetReferenceImage( ) const
33         { return( this->m_ReferenceImage ); }
34       void SetReferenceImage( const TImageBase* image )
35         {
36           this->m_ReferenceImage = TImageBase::New( );
37           this->m_ReferenceImage->SetDirection( image->GetDirection( ) );
38           this->m_ReferenceImage->SetOrigin( image->GetOrigin( ) );
39           this->m_ReferenceImage->SetSpacing( image->GetSpacing( ) );
40           this->Modified( );
41         }
42
43     protected:
44       PolyLineParametricPath( )          { }
45       virtual ~PolyLineParametricPath( ) { }
46
47     private:
48       // Purposely not implemented
49       PolyLineParametricPath( const Self& other );
50       Self& operator=( const Self& other );
51
52     protected:
53       typename TImageBase::Pointer m_ReferenceImage;
54     };
55
56   } // ecapseman
57
58 } // ecapseman
59
60 #endif // __CPEXTENSIONS__DATASTRUCTURES__POLYLINEPARAMETRICPATH__H__
61
62 // eof - $RCSfile$