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> 38 namespace firevision {
48 RefThread(
ImageWidget *widget,
unsigned int refresh_delay);
49 void set_delay(
unsigned int refresh_delay);
50 void save_on_refresh(
bool enabled,
51 std::string path =
"",
52 Glib::ustring type =
"",
53 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);
78 unsigned int refresh_delay = 0,
79 unsigned int width = 0,
80 unsigned int height = 0);
81 ImageWidget(BaseObjectType *cobject, Glib::RefPtr<Gtk::Builder> builder);
83 ImageWidget(BaseObjectType *cobject, Glib::RefPtr<Gnome::Glade::Xml> refxml);
89 void set_size(
unsigned int width,
unsigned int height);
90 virtual bool show(colorspace_t colorspace,
91 unsigned char *buffer,
92 unsigned int width = 0,
93 unsigned int height = 0);
99 void set_rgb(
unsigned int x,
unsigned int y,
unsigned char r,
unsigned char g,
unsigned char b);
100 void set_rgb(
unsigned int x,
unsigned int y,
RGB_t rgb);
101 bool save_image(std::string filename, Glib::ustring type)
const throw();
103 std::string path =
"",
104 Glib::ustring type =
"",
105 unsigned int img_num = 0);
107 sigc::signal<void, colorspace_t, unsigned char *, unsigned int, unsigned int> &
signal_show();
113 unsigned int height_;
115 Glib::RefPtr<Gdk::Pixbuf> pixbuf_;
117 RefThread * refresh_thread_;
120 bool cam_has_buffer_;
121 bool cam_has_timestamp_;
124 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.