Go to the documentation of this file.
15 #ifndef __LARCAFFE_Image2D_H__
16 #define __LARCAFFE_Image2D_H__
27 class Image2D :
protected std::vector<float> {
31 Image2D(
size_t width_npixel=0,
size_t height_npixel=0);
38 float pixel(
size_t w,
size_t h)
const;
42 size_t index(
size_t w,
size_t h )
const;
44 void copy(
size_t w,
size_t h,
const float* src,
size_t num_pixel);
45 void copy(
size_t w,
size_t h,
const std::vector<float>& src,
size_t num_pixel=0);
46 void copy(
size_t w,
size_t h,
const short* src,
size_t num_pixel);
47 void copy(
size_t w,
size_t h,
const std::vector<short>& src,
size_t num_pixel=0);
52 void resize(
size_t width_npixel,
size_t height_npixel );
53 void set_pixel(
size_t w,
size_t h,
float value );
54 void paint(
float value);
56 void compress(
size_t width_npixel,
size_t height_npixel);