00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef _DISPLAY_IMAGE_FRAME_H_
00020 #define _DISPLAY_IMAGE_FRAME_H_
00021
00022 #if defined(__GNUG__) && !defined(__APPLE__)
00023 #pragma interface "display_image_frame.cpp"
00024 #endif
00025
00026
00027 #include <cv.h>
00028 #include <highgui.h>
00029
00030 #include "display_canvas.h"
00031
00036
00037 #include "wx/frame.h"
00039
00044
00045
00046
00051
00052 #define ID_DISPLAY_FRAME 10046
00053 #define SYMBOL_DISPLAYIMAGEFRAME_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
00054 #define SYMBOL_DISPLAYIMAGEFRAME_TITLE _("Display Image Frame")
00055 #define SYMBOL_DISPLAYIMAGEFRAME_IDNAME ID_DISPLAY_FRAME
00056 #define SYMBOL_DISPLAYIMAGEFRAME_SIZE wxSize(400, 300)
00057 #define SYMBOL_DISPLAYIMAGEFRAME_POSITION wxDefaultPosition
00058 #define ID_PANEL 10047
00060
00061
00065 #ifndef wxCLOSE_BOX
00066 #define wxCLOSE_BOX 0x1000
00067 #endif
00068 #ifndef wxFIXED_MINSIZE
00069 #define wxFIXED_MINSIZE 0
00070 #endif
00071
00076 class DisplayImageFrame: public wxFrame
00077 {
00078 DECLARE_CLASS( DisplayImageFrame )
00079 DECLARE_EVENT_TABLE()
00080
00081 public:
00083 DisplayImageFrame( );
00084 virtual ~DisplayImageFrame( );
00085 DisplayImageFrame( wxWindow* parent,
00086 int stream_id,
00087 const wxSize& size = SYMBOL_DISPLAYIMAGEFRAME_SIZE,
00088 wxWindowID id = SYMBOL_DISPLAYIMAGEFRAME_IDNAME,
00089 const wxString& caption = SYMBOL_DISPLAYIMAGEFRAME_TITLE,
00090 const wxPoint& pos = SYMBOL_DISPLAYIMAGEFRAME_POSITION,
00091 long style = SYMBOL_DISPLAYIMAGEFRAME_STYLE );
00092
00093 bool Create( wxWindow* parent,
00094 wxWindowID id = SYMBOL_DISPLAYIMAGEFRAME_IDNAME,
00095 const wxString& caption = SYMBOL_DISPLAYIMAGEFRAME_TITLE,
00096 const wxPoint& pos = SYMBOL_DISPLAYIMAGEFRAME_POSITION,
00097 const wxSize& size = SYMBOL_DISPLAYIMAGEFRAME_SIZE,
00098 long style = SYMBOL_DISPLAYIMAGEFRAME_STYLE );
00099
00101 void CreateControls();
00102
00104
00106 void OnCloseWindow( wxCloseEvent& event );
00107
00109
00111
00113 wxBitmap GetBitmapResource( const wxString& name );
00114
00116 wxIcon GetIconResource( const wxString& name );
00118
00120 static bool ShowToolTips();
00121
00124
00125
00126 void DisplayIplImage( IplImage *image );
00127
00128 private:
00129 DisplayCanvas *_display_canvas;
00130 bool _can_display;
00131 int _window_width;
00132 int _window_height;
00133 int _stream_id;
00134 wxPanel* itemPanel2;
00135 };
00136
00137 #endif
00138