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) {}
43 /// Another function to read attributes for a file
44 virtual void getAttributes(const std::string filename, std::map <std::string , std::string> &infos, std::vector<std::string> i_attr){}
47 /// Set the reader's name
48 void SetName(const std::string& s) { mName = s; }
52 //=====================================================================
56 } // namespace creaImageIO
60 #endif // #ifndef __creaImageIOAbstractImageReader_h_INCLUDED__