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