Go to the documentation of this file.00001 #ifndef ColorImageRGB8_H
00002 #define ColorImageRGB8_H
00003
00004 #include "ImageSuperClasses.h"
00005 #include "MultiElementImage.h"
00006
00007 namespace puma2 {
00008
00009 typedef unsigned char byte;
00010
00015 class ColorImageRGB8 :
00016 public MultiElementImage<byte,3>
00017 {
00018 public:
00019
00023 ColorImageRGB8(int x = 0, int y = 0);
00024
00035 ColorImageRGB8(int x, int y, ColorImageRGB8 * m, int xo, int yo);
00036
00044 void assign(int i, int j, int n, int v);
00045
00054 void assign(int x, int y, int r, int g, int b);
00055
00056 void operator= (const ColorImageRGB8 & o);
00057
00058
00060 double getElementTypeMinimum() const { return 0; };
00061
00063 double getElementTypeMaximum() const { return 255; };
00064
00066 void readFromFile(const char * fileName);
00068 void writeToFile(const char * fileName) const;
00069 typedef byte B3[3];
00070 protected:
00071 void reset();
00072 };
00073 template <> inline void Vector<ColorImageRGB8::B3>::copy(const ColorImageRGB8::B3& f, ColorImageRGB8::B3& t)
00074 {
00075 t[0] = f[0];
00076 t[1] = f[1];
00077 t[2] = f[2];
00078
00079 }
00080
00081 }
00082 #endif
00083