PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
vtkPlusSpinnakerVideoSource.h
Go to the documentation of this file.
1 /*=Plus=header=begin======================================================
2  Progra : Plus
3  Copyright (c) Laboratory for Percutaneous Surgery. All rights reserved.
4  See License.txt for details.
5 =========================================================Plus=header=end*/
6 
7 #ifndef __vtkPlusSpinnakerVideoSource_h
8 #define __vtkPlusSpinnakerVideoSource_h
9 
10 #include "vtkPlusDataCollectionExport.h"
11 #include "vtkPlusDevice.h"
12 #include <string>
13 
19 class vtkPlusDataCollectionExport vtkPlusSpinnakerVideoSource : public vtkPlusDevice
20 {
21 public:
22 
24 
26  void PrintConfiguration(ostream& os, vtkIndent indent);
27  virtual void PrintSelf(ostream& os, vtkIndent indent);
28 
30  virtual PlusStatus ReadConfiguration(vtkXMLDataElement* config);
32  PlusStatus WriteConfiguration(vtkXMLDataElement* config);
33 
35  bool IsTracker() const { return false; }
36  bool IsVirtual() const { return false; }
37 
39  virtual PlusStatus NotifyConfigured();
40 
41  // available pixel encodings
43  {
44  RGB24 = 0,
45  MONO8
46  };
47 
48  // enums for camera controls
50  {
51  EXPOSURE_TIMED = 0,
53  EXPOSURE_AUTO_CONTINUOUS
54  };
55 
56  enum GAIN_MODE
57  {
58  GAIN_MANUAL = 0,
60  GAIN_AUTO_CONTINUOUS
61  };
62 
64  {
65  WB_MANUAL = 0,
67  WB_AUTO_CONTINUOUS
68  };
69 
70 protected:
76 
79 
81  virtual PlusStatus InternalUpdate();
82 
83  virtual PlusStatus InternalConnect();
85 
86  // methods to set & get camera parameters
87  vtkGetMacro(CameraNumber, unsigned int);
88  vtkSetMacro(CameraNumber, unsigned int);
89  vtkGetMacro(PixelEncoding, PIXEL_ENCODING);
90  vtkSetMacro(PixelEncoding, PIXEL_ENCODING);
91  PlusStatus SetFrameRate(int FrameRate);
92  EXPOSURE_MODE GetExposureMode() { return this->ExposureMode; }
93  PlusStatus SetExposureMode(EXPOSURE_MODE expMode);
94  vtkGetMacro(ExposureMicroSec, float);
95  PlusStatus SetExposureMicroSec(int exposureMicroSec);
96  GAIN_MODE GetGainMode() { return this->GainMode; }
97  PlusStatus SetGainMode(GAIN_MODE gainMode);
98  vtkGetMacro(GainDB, float);
99  PlusStatus SetGainDB(int gainDb);
100  WHITE_BALANCE_MODE GetWhiteBalanceMode() { return this->WhiteBalanceMode; }
101  PlusStatus SetWhiteBalanceMode(WHITE_BALANCE_MODE wbMode);
102  vtkGetMacro(WhiteBalanceRed, float);
103  vtkSetMacro(WhiteBalanceRed, float);
104  vtkGetMacro(WhiteBalanceBlue, float);
105  vtkSetMacro(WhiteBalanceBlue, float);
106 
107  // check camera parameters as set are valid
108  PlusStatus CheckCameraParameterValidity();
109 
110 protected:
113 
114  // frame configuration
117  FrameSizeType FrameSize;
119 
120  // camera configuration
124  float GainDB;
128 
129 private:
131  void operator=(const vtkPlusSpinnakerVideoSource&);
132 
133  class vtkInternal;
134  vtkInternal* Internal;
135 
136  unsigned long FrameNumber;
137 };
138 
139 #endif
virtual void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
virtual PlusStatus InternalStopRecording()
Abstract interface for tracker and video devices.
Definition: vtkPlusDevice.h:60
virtual PlusStatus InternalConnect()
igsioStatus PlusStatus
Definition: PlusCommon.h:40
virtual PlusStatus ReadConfiguration(vtkXMLDataElement *)
unsigned long FrameNumber
virtual PlusStatus WriteConfiguration(vtkXMLDataElement *)
virtual PlusStatus InternalStartRecording()
virtual PlusStatus NotifyConfigured()
virtual PlusStatus InternalDisconnect()
Interface class to Spinnaker API compatible Point Grey Cameras.
virtual PlusStatus InternalUpdate()
static vtkPlusDevice * New()