00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __FIREVISION_TOOLS_YUV_VIEWER_LOC_VIEWER_GUI_H_
00024 #define __FIREVISION_TOOLS_YUV_VIEWER_LOC_VIEWER_GUI_H_
00025
00026 #define LOC_PLUGIN_NAME "fvnao_loc"
00027 #define FUSE_PLUGIN_NAME "fvfountain"
00028 #define FOUNTAIN_PORT_PATH "/firevision/fountain/tcp_port"
00029
00030 #include <fvwidgets/image_widget.h>
00031 #include <fvutils/color/yuv.h>
00032
00033 #include <gtkmm.h>
00034 #include <libglademm/xml.h>
00035
00036 using namespace firevision;
00037
00038 class YuvViewerGtkWindow : public Gtk::Window
00039 {
00040 private:
00041 public:
00042 YuvViewerGtkWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml> ref_xml);
00043 virtual ~YuvViewerGtkWindow();
00044
00045 private:
00046 bool on_mouse_over_yuv(GdkEventMotion *event);
00047 bool on_click_on_yuv(GdkEventButton *event);
00048 void on_y_value_changed();
00049 void on_y_res_changed();
00050 void on_uv_res_changed();
00051 void calc_seg();
00052 Glib::ustring convert_float2str(float f, unsigned int width);
00053
00054 private:
00055
00056 Gtk::EventBox *__yuv_vp;
00057 Gtk::Viewport *__cur_vp;
00058 Gtk::Viewport *__seg_vp;
00059 Gtk::HScale *__y_scale;
00060 Gtk::Label *__u_value;
00061 Gtk::Label *__v_value;
00062 Gtk::SpinButton *__y_res;
00063 Gtk::SpinButton *__u_res;
00064 Gtk::SpinButton *__v_res;
00065
00066 ImageWidget *__yuv_widget;
00067 ImageWidget *__cur_widget;
00068 ImageWidget *__seg_widget;
00069
00070 unsigned char __yuv_buffer[256 * 256 * 2];
00071 unsigned char __cur_buffer[ 60 * 40 * 2];
00072 unsigned char __seg_buffer[256 * 256 * 2];
00073 };
00074
00075 #endif