]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/Extensions/IO/MeshReader.h
2e75bf337294761fb8b4e41aafabb3628e79716b
[cpPlugins.git] / lib / cpPlugins / Extensions / IO / MeshReader.h
1 #ifndef __CPPLUGINS__EXTENSIONS__IO__MESHREADER__H__
2 #define __CPPLUGINS__EXTENSIONS__IO__MESHREADER__H__
3
4 #include <string>
5 #include <itkMeshSource.h>
6
7 namespace cpPlugins
8 {
9   namespace Extensions
10   {
11     namespace IO
12     {
13       /**
14        */
15       template< typename M >
16       class MeshReader
17         : public itk::MeshSource< M >
18       {
19       public:
20         typedef MeshReader                      Self;
21         typedef itk::MeshSource< M >            Superclass;
22         typedef itk::SmartPointer< Self >       Pointer;
23         typedef itk::SmartPointer< const Self > ConstPointer;
24
25         typedef M MeshType;
26
27       public:
28         itkNewMacro( Self );
29         itkTypeMacro( MeshReader, itkMeshSource );
30
31         itkSetStringMacro( FileName );
32         itkGetStringMacro( FileName );
33
34       public:
35         virtual itk::ModifiedTimeType GetMTime( ) const;
36
37       protected:
38         MeshReader( );
39         virtual ~MeshReader( );
40
41         virtual void GenerateData( );
42
43         template< class R >
44         void _Read( );
45
46       private:
47         // Purposely not implemented
48         MeshReader( const Self& );
49         Self& operator=( const Self & );
50
51       protected:
52         typename Superclass::Pointer m_Reader;
53         std::string m_FileName;
54       };
55
56     } // ecapseman
57
58   } // ecapseman
59
60 } // ecapseman
61
62 #include <cpPlugins/Extensions/IO/MeshReader.hxx>
63
64 #endif // __CPPLUGINS__EXTENSIONS__IO__MESHREADER__H__
65
66 // eof - $RCSfile$