X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpExtensions%2FIO%2FMeshReader.h;fp=lib%2FcpExtensions%2FIO%2FMeshReader.h;h=94880a9644f67ed4f0065128a62e0eb9dc84a9d5;hb=2361f4f97631e09d88d8a5510a369817dcaa19db;hp=0000000000000000000000000000000000000000;hpb=e18f55af541dba9026284beb6f12ef06b12e6f47;p=cpPlugins.git diff --git a/lib/cpExtensions/IO/MeshReader.h b/lib/cpExtensions/IO/MeshReader.h new file mode 100644 index 0000000..94880a9 --- /dev/null +++ b/lib/cpExtensions/IO/MeshReader.h @@ -0,0 +1,62 @@ +#ifndef __CPEXTENSIONS__IO__MESHREADER__H__ +#define __CPEXTENSIONS__IO__MESHREADER__H__ + +#include +#include + +namespace cpExtensions + { + namespace IO + { + /** + */ + template< typename M > + class MeshReader + : public itk::MeshSource< M > + { + public: + typedef MeshReader Self; + typedef itk::MeshSource< M > Superclass; + typedef itk::SmartPointer< Self > Pointer; + typedef itk::SmartPointer< const Self > ConstPointer; + + typedef M MeshType; + + public: + itkNewMacro( Self ); + itkTypeMacro( MeshReader, itkMeshSource ); + + itkSetStringMacro( FileName ); + itkGetStringMacro( FileName ); + + public: + virtual itk::ModifiedTimeType GetMTime( ) const; + + protected: + MeshReader( ); + virtual ~MeshReader( ); + + virtual void GenerateData( ); + + template< class R > + void _Read( ); + + private: + // Purposely not implemented + MeshReader( const Self& ); + Self& operator=( const Self & ); + + protected: + typename Superclass::Pointer m_Reader; + std::string m_FileName; + }; + + } // ecapseman + +} // ecapseman + +#include + +#endif // __CPEXTENSIONS__IO__MESHREADER__H__ + +// eof - $RCSfile$