]> Creatis software - cpPlugins.git/blob - lib/cpExtensions/Algorithms/PolyLineParametricPathWriter.h
...
[cpPlugins.git] / lib / cpExtensions / Algorithms / PolyLineParametricPathWriter.h
1 // -------------------------------------------------------------------------
2 // @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
3 // -------------------------------------------------------------------------
4
5 #ifndef __cpExtensions__Algorithms__PolyLineParametricPathWriter__h__
6 #define __cpExtensions__Algorithms__PolyLineParametricPathWriter__h__
7
8 #include <itkProcessObject.h>
9 #include <itkImage.h>
10
11 // -------------------------------------------------------------------------
12 namespace cpExtensions
13 {
14   namespace Algorithms
15   {
16     /**
17      */
18     template< class _TPolyLine, class _TImage = itk::Image< unsigned char, _TPolyLine::PathDimension > >
19     class PolyLineParametricPathWriter
20       : public itk::ProcessObject
21     {
22     public:
23       // Basic types
24       typedef PolyLineParametricPathWriter Self;
25       typedef itk::ProcessObject                    Superclass;
26       typedef itk::SmartPointer< Self >             Pointer;
27       typedef itk::SmartPointer< const Self >       ConstPointer;
28
29     public:
30       itkNewMacro( Self );
31       itkTypeMacro( PolyLineParametricPathWriter, itk::ProcessObject );
32
33       itkGetConstMacro( FileName, std::string );
34       itkGetConstMacro( NumberOfPoints, long );
35
36       itkSetMacro( FileName, std::string );
37       itkSetMacro( NumberOfPoints, long );
38
39     public:
40       void SetInput( const _TPolyLine* input );
41       const _TPolyLine* GetInput( );
42
43       void SetImage( const _TImage* image );
44       const _TImage* GetImage( );
45
46       virtual void Update( );
47
48     protected:
49       PolyLineParametricPathWriter( );
50       virtual ~PolyLineParametricPathWriter( );
51
52       virtual void GenerateData( ) override;
53
54     private:
55       // Purposely not implemented
56       PolyLineParametricPathWriter( const Self& );
57       void operator=( const Self& );
58
59     protected:
60       std::string m_FileName;
61       long m_NumberOfPoints;
62     };
63
64   } // ecapseman
65
66 } // ecapseman
67
68 #ifndef ITK_MANUAL_INSTANTIATION
69 #  include <cpExtensions/Algorithms/PolyLineParametricPathWriter.hxx>
70 #endif // ITK_MANUAL_INSTANTIATION
71
72 #endif // __cpExtensions__Algorithms__PolyLineParametricPathWriter__h__
73
74 // eof - $RCSfile$