Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
VideoSource_Controller_SwissRanger.hh
1 /*
2 This file is part of the BIAS library (Basic ImageAlgorithmS).
3 
4 Copyright (C) 2003-2009 (see file CONTACT for details)
5  Multimediale Systeme der Informationsverarbeitung
6  Institut fuer Informatik
7  Christian-Albrechts-Universitaet Kiel
8 
9 
10 BIAS is free software; you can redistribute it and/or modify
11 it under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
14 
15 BIAS is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU Lesser General Public License for more details.
19 
20 You should have received a copy of the GNU Lesser General Public License
21 along with BIAS; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 */
24 
25 #ifndef __VideoSource_Controller_SWISSRANGER_HH__
26 #define __VideoSource_Controller_SWISSRANGER_HH__
27 
28 #include <Gui/VideoSource_Controller_Base.hh>
29 #include <bias_config.h>
30 
31 #ifdef WIN32
32 #include <windows.h>
33 #endif
34 
35 #include <VideoSource/VideoSource_Base.hh>
36 
37 #ifdef BIAS_HAVE_SWISSRANGER
38 #include <VideoSource/VideoSource_SwissRanger.hh>
39 #endif
40 
41 
42 #include <Base/Image/ImageIO.hh>
43 #include <Base/Image/ImageConvert.hh>
44 #include <Image/Camera.hh>
45 #include <Image/StereoRedGreen.hh>
46 
47 
48 namespace BIAS {
49 
51 public:
52 
53  VideoSource_Controller_SwissRanger(VideoSource *cam, wxWindow *parent, const std::string& title="VideoSourceController SwissRanger");
55 
56  void Initialize();
57  void SetVideoSource(BIAS::VideoSource *cam);
58  void SetAmplitudeThresholdRange(unsigned int min,unsigned int max);
59  void SetSaturationThresholdRange(unsigned int min,unsigned int max);
60  void SetDistanceOffsetRange(unsigned int min,unsigned int max);
61  void SetIntegrationTimeRange(unsigned int min,unsigned int max);
62  void Update(); // trigger an update, useful for auto-mode
63 
64  wxBoxSizer *vBox;
65 
66  enum {
76  ID_CHECK_SHOWDEPTH
77  };
78 
79 private:
80 
81  void OnEscape(wxCommandEvent& event);
82  void OnHide(wxCommandEvent& event);
83  void OnClose(wxCloseEvent& event);
84  void OnAmplitude(wxScrollEvent& event);
85  void OnSaturation(wxScrollEvent& event);
86  void OnModulation(wxScrollEvent& event);
87  void OnDistance(wxScrollEvent& event) ;
88  void OnIntegration(wxScrollEvent& event) ;
89  void OnModFreq(wxCommandEvent& event) ;
90  void OnUpdate(wxCommandEvent& event) ;
91  void OnCheckEnsureLatest(wxCommandEvent& event);
92  void OnCheckShowDepth(wxCommandEvent& event);
93 
94 protected:
95 
97 
98  wxSlider *SliderAmplitude;
99  wxSlider *SliderSaturation;
100  wxSlider *SliderIntegration;
101  wxTextCtrl *mIntTimeMs,*mSaturation,*mAmplitude,*mDistance;
103  wxComboBox *comboBoxModFreq;
104  wxCheckBox *checkBoxEnsureLatest;
105  wxCheckBox *checkBoxShowDepth;
106  wxBoxSizer *sliderBox_ShGa;
107  wxButton *showButton;
108  wxButton *update_Button;
109 
112 
113  unsigned short min_amplitudeThreshold_, max_amplitudeThreshold_;
114  unsigned short min_saturationThreshold_, max_saturationThreshold_;
115  unsigned char min_integrationTime_, max_integrationTime_;
116  unsigned short min_distanceOffset_, max_distanceOffset_;
117 
118  DECLARE_EVENT_TABLE()
119 
120 private:
121  };
122 
123 }
124 #endif
Defines a common interface to different devices.
Support for SwissRanger usb cam.