22 #ifndef __FIREVISION_FVWIDGETS_IMAGE_WIDGET_H_ 23 #define __FIREVISION_FVWIDGETS_IMAGE_WIDGET_H_ 25 #include <core/threading/thread.h> 26 #include <fvutils/color/colorspaces.h> 27 #include <fvutils/color/rgb.h> 31 # include <libglademm/xml.h> 51 RefThread(
ImageWidget *widget,
unsigned int refresh_delay);
52 void set_delay(
unsigned int refresh_delay);
53 void save_on_refresh(
bool enabled, std::string path =
"", Glib::ustring type =
"",
unsigned int img_num = 0);
56 unsigned int get_img_num();
60 void perform_refresh();
65 unsigned int __refresh_delay;
66 unsigned int __loop_cnt;
67 Glib::Dispatcher __dispatcher;
70 std::string __save_path;
71 Glib::ustring __save_type;
72 unsigned int __save_num;
76 ImageWidget(
unsigned int width,
unsigned int height);
77 ImageWidget(
Camera *cam,
unsigned int refresh_delay = 0,
unsigned int width = 0,
unsigned int height = 0);
78 ImageWidget(BaseObjectType* cobject, Glib::RefPtr<Gtk::Builder> builder);
80 ImageWidget(BaseObjectType* cobject, Glib::RefPtr<Gnome::Glade::Xml> refxml);
84 void set_camera(
Camera *cam,
unsigned int refresh_delay = 0);
85 void enable_camera(
bool enable);
86 void set_size(
unsigned int width,
unsigned int height);
87 virtual bool show(colorspace_t colorspace,
unsigned char *buffer,
unsigned int width = 0,
unsigned int height = 0);
88 void set_refresh_delay(
unsigned int refresh_delay);
90 unsigned int get_width()
const;
91 unsigned int get_height()
const;
92 Glib::RefPtr<Gdk::Pixbuf> get_buffer()
const;
93 void set_rgb(
unsigned int x,
unsigned int y,
unsigned char r,
unsigned char g,
unsigned char b);
94 void set_rgb(
unsigned int x,
unsigned int y,
RGB_t rgb);
95 bool save_image(std::string filename, Glib::ustring type)
const throw();
96 void save_on_refresh_cam(
bool enabled, std::string path =
"", Glib::ustring type =
"",
unsigned int img_num = 0);
97 unsigned int get_image_num();
98 sigc::signal<void, colorspace_t, unsigned char *, unsigned int, unsigned int> & signal_show();
103 unsigned int __width;
104 unsigned int __height;
106 Glib::RefPtr<Gdk::Pixbuf> __pixbuf;
108 RefThread *__refresh_thread;
111 bool __cam_has_buffer;
112 bool __cam_has_timestamp;
115 sigc::signal<void, colorspace_t, unsigned char *, unsigned int, unsigned int> __signal_show;
Structure defining an RGB pixel (in R-G-B byte ordering).
Camera interface for image aquiring devices in FireVision.
Fawkes library namespace.
Thread class encapsulation of pthreads.
Mutex mutual exclusion lock.