#ifndef __creaImageIOImageReader_h_INCLUDED__ #define __creaImageIOImageReader_h_INCLUDED__ #include #include #include #include namespace creaImageIO { //===================================================================== class SpecificImageReader; //===================================================================== //===================================================================== class ImageReader { public: ImageReader(); ~ImageReader(); // Returns the known extensions /*static*/ const std::vector& GetKnownExtensions() { return mKnownExtensions; } // Returns true iff the file is readable /*static*/ bool CanRead( const std::string& filename, const std::string& exclude = ""); // Reads the file. Returns an "Unreadable image" picture if fails /*static*/ vtkImageData* Read( const std::string& filename, const std::string& exclude = ""); void ReadDicomInfo(const std::string& filename, DicomNode* image); protected: /*static*/ void Register(SpecificImageReader*); /*static*/ std::vector mReader; /*static*/ std::vector mKnownExtensions; /*static*/ vtkImageData* mUnreadableImage; /*static*/ std::string mLastFilename; /*static*/ SpecificImageReader* mLastReader; private: }; // class ImageReader //===================================================================== } // namespace creaImageIO #endif // #ifndef __creaImageIOImageReader_h_INCLUDED__