Go to the documentation of this file.00001 #ifndef __creaImageIOAbstractImageReader_h_INCLUDED__
00002 #define __creaImageIOAbstractImageReader_h_INCLUDED__
00003
00004
00005 #include <vtkImageData.h>
00006 #include <string>
00007 #include <map>
00008 #include <vector>
00009 #include "creaImageIOTreeAttributeMapType.h"
00010
00011 namespace creaImageIO
00012 {
00013
00014
00019
00021 class AbstractImageReader
00022 {
00023 public:
00024 AbstractImageReader() {}
00025 virtual ~AbstractImageReader() {}
00026
00028 const std::string& GetName() const { return mName; }
00029
00031 virtual void PushBackExtensions(std::vector<std::string>&) {}
00032
00034 virtual bool CanRead(const std::string& filename) { return false; }
00035
00037 virtual vtkImageData* ReadImage(const std::string& filename) { return 0; }
00038
00040 virtual void ReadAttributes(const std::string& filename,
00041 tree::AttributeMapType& attr) {}
00042
00044 virtual void getAttributes(const std::string filename, std::map <std::string , std::string> &infos, std::vector<std::string> i_attr){}
00045 protected:
00046
00048 void SetName(const std::string& s) { mName = s; }
00049 private:
00050 std::string mName;
00051 };
00052
00053
00054
00055
00056 }
00057
00058
00059
00060 #endif // #ifndef __creaImageIOAbstractImageReader_h_INCLUDED__