27 #ifndef IMG_RASTER_IMAGE_H
28 #define IMG_RASTER_IMAGE_H
34 namespace ost {
namespace img {
61 typedef unsigned char uchar;
74 Pixel(uchar rr,uchar gg,uchar bb): r(rr), g(gg), b(bb) {}
76 Pixel(uchar rgb[3]) {r=rgb[0]; g=rgb[1]; b=rgb[2];}
80 RasterImage(
unsigned int width,
unsigned int height);
91 void SetPixel(
unsigned int x,
unsigned int y,
const Pixel& p);
93 Pixel GetPixel(
unsigned int x,
unsigned int y)
const;
107 Mode mode=GREY,
bool fast_low_mag_flag=
true,
bool fast_high_mag_flag=
true);
109 Mode mode,
bool fast_low_mag_flag,
bool fast_high_mag_flag,
int x1,
int y1,
int x2,
int y2);
113 unsigned int width_,height_;
117 int wh2i(
int w,
int h)
const {
return h*width_+w;}
uchar * ReleaseDataPtr()
Release data pointer.
boost::shared_ptr< NormalizerImpl > NormalizerPtr
Pixel()
default constructor
Abstract base class for data.
unsigned int GetHeight() const
unsigned int GetWidth() const
uchar * GetDataPtr() const
Get raw data pointer (consecutive unsigned char triplets)
Pixel(const Pixel &p)
copy-constructor
Pixel(uchar rgb[3])
initialize with array
Pixel(uchar rr, uchar gg, uchar bb)
initialize with three uchar
#define DLLEXPORT_OST_IMG_BASE
ImageStateConstModIPAlgorithm< FillFnc > Fill