PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
vtkPlusICCapturingSource.h
Go to the documentation of this file.
1 /*=Plus=header=begin======================================================
2 Program: Plus
3 Copyright (c) Laboratory for Percutaneous Surgery. All rights reserved.
4 See License.txt for details.
5 =========================================================Plus=header=end*/
6 
7 #ifndef __vtkPlusICCapturingSource_h
8 #define __vtkPlusICCapturingSource_h
9 
10 #include "vtkPlusDataCollectionExport.h"
11 
12 #include "vtkPlusDevice.h"
14 
15 class vtkPlusDataCollectionExport vtkPlusICCapturingSource;
16 
22 class vtkPlusDataCollectionExport vtkPlusICCapturingSourceCleanup
23 {
24 public:
27 };
28 
34 class vtkPlusDataCollectionExport vtkPlusICCapturingSource : public vtkPlusDevice
35 {
36 public:
38  virtual void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
45  static vtkPlusICCapturingSource* New();
47  static vtkPlusICCapturingSource* GetInstance();
48 
50  static void SetInstance(vtkPlusICCapturingSource* instance);
51 
52  //BTX
58  //ETX
59 
61  virtual std::string GetSdkVersion(); virtual PlusStatus ReadConfiguration(vtkXMLDataElement* config);
64  virtual PlusStatus WriteConfiguration(vtkXMLDataElement* config);
65 
67  vtkSetStringMacro(DeviceName);
69  vtkGetStringMacro(DeviceName);
70 
72  vtkSetStringMacro(VideoNorm);
74  vtkGetStringMacro(VideoNorm);
75 
77  vtkSetStringMacro(VideoFormat);
79  vtkGetStringMacro(VideoFormat);
80 
82  vtkSetStringMacro(InputChannel);
84  vtkGetStringMacro(InputChannel);
85 
87  vtkSetMacro(ICBufferSize, int);
89  vtkGetMacro(ICBufferSize, int);
90 
92  void SetFrameSize(const FrameSizeType& frameSize);
93  void SetFrameSize(unsigned int i, unsigned int j, unsigned int k);
95  FrameSizeType GetFrameSize() const;
96 
98  virtual PlusStatus NotifyConfigured();
99 
100  virtual bool IsTracker() const { return false; }
101 
102  void GetListOfCaptureDevices(std::vector< std::string >& deviceNames);
103 
104  void GetListOfCaptureVideoNorms(std::vector< std::string >& videoNorms, const std::string& deviceName);
105 
107  void GetListOfCaptureVideoModes(std::vector< std::string >& videoModes, const std::string& deviceName, const std::string& videoNorm);
108 
110  void LogListOfCaptureDevices();
111 
112 protected:
117 
119  virtual PlusStatus InternalConnect();
120 
122  virtual PlusStatus InternalDisconnect();
123 
126 
129 
131  PlusStatus AddFrameToBuffer(unsigned char* data, unsigned long size, unsigned long frameNumber);
132 
134  void ParseDShowLibVideoFormatString(const char* videoFormatFrameSizeString);
135 
137  std::string GetDShowLibVideoFormatString();
138 
142 
144  char* DeviceName;
145 
147  char* VideoNorm;
148 
150  char* VideoFormat;
151 
154 
157 
159  FrameSizeType FrameSize;
160 
161 private:
162  static vtkPlusICCapturingSource* Instance;
163  static bool vtkPlusICCapturingSourceNewFrameCallback(unsigned char* data, unsigned long size, unsigned long frameNumber);
164  vtkPlusICCapturingSource(const vtkPlusICCapturingSource&); // Not implemented.
165  void operator=(const vtkPlusICCapturingSource&); // Not implemented.
166 };
167 
168 #endif
const uint32_t * data
Definition: phidget22.h:3971
virtual void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
virtual PlusStatus InternalStopRecording()
Abstract interface for tracker and video devices.
Definition: vtkPlusDevice.h:60
static vtkPlusICCapturingSourceCleanup Cleanup
virtual PlusStatus InternalConnect()
igsioStatus PlusStatus
Definition: PlusCommon.h:40
for i
virtual std::string GetSdkVersion()
Class for providing video input interfaces between VTK and ICCapturing frame grabber device.
Class that listens for incoming framegrabber images.
#define VTK_OVERRIDE
Definition: PlusCommon.h:49
virtual PlusStatus ReadConfiguration(vtkXMLDataElement *)
virtual PlusStatus WriteConfiguration(vtkXMLDataElement *)
const char ** deviceName
Definition: phidget22.h:1316
virtual PlusStatus InternalStartRecording()
Class that cleans up (deletes singleton instance of) vtkPlusICCapturingSource when destroyed.
class vtkPlusDataCollectionExport vtkPlusICCapturingSource
virtual PlusStatus NotifyConfigured()
virtual PlusStatus InternalDisconnect()
ICCapturingListener * FrameGrabberListener
static vtkPlusDevice * New()