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