00001 00009 #ifndef IMAGE_READER_H 00010 #define IMAGE_READER_H 00011 00012 #include "GrayLevelImage8.h" 00013 #include "GrayLevelImage16.h" 00014 #include "ColorImageRGB8.h" 00015 #include "ColorImageRGBa8.h" 00016 00017 #include <cstdio> 00018 00019 namespace puma2 { 00020 00028 class ImageReader { 00029 private: // should never be instantiated 00030 ImageReader () {}; 00031 ~ImageReader () {}; 00032 00033 public: 00041 static bool readImage(GrayLevelImage8 &img, std::string filename); 00042 00043 static bool readImage(GrayLevelImage16 &img, std::string filename); 00044 00052 static bool readImage(ColorImageRGB8 &img, std::string filename); 00053 00061 static bool loadJPEGImage(ColorImageRGB8 &img, byte* ptr, size_t numBytes); 00062 00072 static bool readImage(ColorImageRGBa8 &img, std::string filename); 00073 }; 00074 00075 } 00076 00077 #endif /* IMAGE_READER_H */