X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src2%2FcreaImageIOAbstractImageReader.h;h=3957f3a7d652456127bcbf461fea6d38cc9f8a7e;hb=6ce1377c642f91e9b173b8a5440543eb5320fcd5;hp=e5585606f9fdee1a840ab3eadcc90b9904895966;hpb=f130d194cc0f1c9380f3907a45020e199e4b5c0a;p=creaImageIO.git diff --git a/src2/creaImageIOAbstractImageReader.h b/src2/creaImageIOAbstractImageReader.h index e558560..3957f3a 100644 --- a/src2/creaImageIOAbstractImageReader.h +++ b/src2/creaImageIOAbstractImageReader.h @@ -6,7 +6,7 @@ #include #include #include -#include +#include "creaImageIOTreeAttributeMapType.h" namespace creaImageIO { @@ -24,14 +24,25 @@ namespace creaImageIO AbstractImageReader() {} virtual ~AbstractImageReader() {} + /// Get the reader's name const std::string& GetName() const { return mName; } + + /// Add file extensions read by the reader virtual void PushBackExtensions(std::vector&) {} + + /// Test if file is read by this reader virtual bool CanRead(const std::string& filename) { return false; } - virtual vtkImageData* ReadImage(const std::string& filename) { return 0; } + + /// return for a file a 2D VTkImage + virtual vtkImageData* ReadImage(const std::string& filename) { return 0; } + + /// Read the attributes for a file virtual void ReadAttributes(const std::string& filename, tree::AttributeMapType& attr) {} protected: + + /// Set the reader's name void SetName(const std::string& s) { mName = s; } private: std::string mName;