Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
VideoSource_Controller_XB3.hh
1 #ifndef __VideoSource_Controller_XB3_HH__
2 #define __VideoSource_Controller_XB3_HH__
3 
4 #include <bias_config.h>
5 
6 #include <Base/Common/W32Compat.hh>
7 #include <VideoSource/VideoSource_Base.hh>
8 
9 #include <VideoSource/VideoSource_DCAM_BumbleBee.hh>
10 
11 #include <Base/Image/ImageIO.hh>
12 #include <Base/Image/ImageConvert.hh>
13 
14 #include <Image/Camera.hh>
15 #include <Image/StereoRedGreen.hh>
16 
17 #include <Gui/VideoSource_Controller_Base.hh>
18 
19 namespace BIAS {
20 
22 public:
23 
24  VideoSource_Controller_XB3(VideoSource *cam, wxWindow *parent, const std::string &title="VideoSourceConstroller XB3",
25  const unsigned int imageToShow=(unsigned int)0,
26  double minShutter=1.0, double maxShutter=80.0,
27  double minGain = 0.0,double maxGain=3000.0);
29 
30  void Initialize();
31 
32  void SetVideoSource(BIAS::VideoSource *cam);
33  void SetShutterRange(unsigned int min,unsigned int max);
34  void SetGainRange(unsigned int min,unsigned int max);
35  void Update(); // trigger an update, useful for auto-mode
36  int GetSelectedImage();
37 
38  wxBoxSizer *vBox;
39 
40  enum ids{
42  //All 16 FEATURES of DCAM
43  //GAIN, SHUTTER PANEL
50  //HUE, SATURATION
53 
54  //GAMMA, BRIGHTNESS
57 
68 
74  ID_CHECKBOX_RAW
75  };
76 
77 private:
78 
79  void OnEscape(wxCommandEvent& event);
80 
81  void OnHide(wxCommandEvent& event);
82  void OnClose(wxCloseEvent& event);
83  void OnWhiteBalance(wxCommandEvent& event);
84  void OnShutter(wxScrollEvent& event);
85  void OnGain(wxScrollEvent& event);
86  void OnAuto_Shutter(wxCommandEvent& event);
87  void OnAuto_Gain(wxCommandEvent& event);
88  void OnUpdate(wxCommandEvent& event) ;
89  void OnRadioButton(wxCommandEvent& event) ;
90 
91  void auto_on(int param);
92  void auto_off(int param);
93 
94 protected:
95 
97 
98  wxSlider *SliderGain;
99  wxSlider *SliderShutter;
100  wxBoxSizer *sliderBox_ShGa;
101  wxBoxSizer *layoutBox;
104  bool auto_gain;
105 
107 
108  wxButton *showButton;
109  wxButton *whiteBalanceButton;
110  wxButton *auto_sh_Button;
111  wxButton *auto_ga_Button;
112  wxButton *update_Button;
113 
114  wxRadioButton *left_CheckBox;
115  wxRadioButton *center_CheckBox;
116  wxRadioButton *right_CheckBox;
117  wxRadioButton *all_CheckBox;
118  wxRadioButton *raw_CheckBox;
119  double minShutter_, maxShutter_, minGain_,maxGain_;
120 
121  DECLARE_EVENT_TABLE()
122 
123 private:
124 
125  unsigned int ImageToShow_;
126  };
127 
128 }
129 #endif
Defines a common interface to different devices.
const float minShutter
const float minGain
const float maxGain
BIAS::VideoSource_DCAM_BumbleBee * Cam_
const float maxShutter