1 #ifndef __creaImageIOAbstractImageReader_h_INCLUDED__
2 #define __creaImageIOAbstractImageReader_h_INCLUDED__
5 #include <vtkImageData.h>
9 #include "creaImageIOTreeAttributeMapType.h"
19 //=====================================================================
20 /// Abstract image reader
21 class AbstractImageReader
24 AbstractImageReader() {}
25 virtual ~AbstractImageReader() {}
27 /// Get the reader's name
28 const std::string& GetName() const { return mName; }
30 /// Add file extensions read by the reader
31 virtual void PushBackExtensions(std::vector<std::string>&) {}
33 /// Test if file is read by this reader
34 virtual bool CanRead(const std::string& filename) { return false; }
36 /// return for a file a 2D VTkImage
37 virtual vtkImageData* ReadImage(const std::string& filename) { return 0; }
39 /// Read the attributes for a file
40 virtual void ReadAttributes(const std::string& filename,
41 tree::AttributeMapType& attr) {}
45 /// Set the reader's name
46 void SetName(const std::string& s) { mName = s; }
50 //=====================================================================
54 } // namespace creaImageIO
58 #endif // #ifndef __creaImageIOAbstractImageReader_h_INCLUDED__