1 #ifndef __creaImageIOImageReader_h_INCLUDED__
2 #define __creaImageIOImageReader_h_INCLUDED__
4 #include <creaImageIOAbstractImageReader.h>
12 * \brief Generic image reader which uses all the specific concrete image reader of the lib (tif, jpg, dicom, ...)
14 class ImageReader : virtual public AbstractImageReader
20 /// Pushes back all kwown extensions (without dot) in the vector given
21 void PushBackExtensions(std::vector<std::string>&);
23 /// Returns true iff the file is readable
24 bool CanRead( const std::string& filename);
25 /// Reads and returns the image data.
26 /// Returns an "Unreadable image" picture if fails
27 vtkImageData* ReadImage( const std::string& filename);
29 /// Reads the attributes of the image.
30 /// Requested attributes names are provided as keys
31 /// in a string to string map
32 /// On return, the values of the map are the values
33 /// of the attributes (empty string if not available).
34 void ReadAttributes(const std::string& filename,
35 tree::AttributeMapType& attr);
37 /// Exclude specific readers
43 void Register(AbstractImageReader*);
45 std::vector<AbstractImageReader*> mReader;
46 vtkImageData* mUnreadableImage;
48 std::string mLastFilename;
49 AbstractImageReader* mLastReader;
53 }; // class ImageReader
54 //=====================================================================
58 } // namespace creaImageIO
62 #endif // #ifndef __creaImageIOImageReader_h_INCLUDED__