PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
vtkPlusNVidiaDVPVideoSourceWin32.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 __vtkPlusNvidiaDVPVideoSource_h
8 #define __vtkPlusNvidiaDVPVideoSource_h
9 
10 #include "vtkPlusDataCollectionExport.h"
11 
12 #include "vtkPlusDevice.h"
13 #include "nvCommon.h"
14 #include "nvSDIin.h"
15 #include "nvConfigure.h"
16 
17 class CNvGpu;
18 
24 class vtkPlusDataCollectionExport vtkPlusNvidiaDVPVideoSource : public vtkPlusDevice
25 {
26 public:
29  virtual void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
30 
32  virtual PlusStatus ReadConfiguration(vtkXMLDataElement* config);
34  virtual PlusStatus WriteConfiguration(vtkXMLDataElement* config);
35 
37  virtual bool IsTracker() const;
38 
40  virtual PlusStatus NotifyConfigured();
41 
43  vtkGetMacro(EnableGPUCPUCopy, bool);
44 
45 protected:
47  vtkSetMacro(EnableGPUCPUCopy, bool);
48 
50  virtual ~vtkPlusNvidiaDVPVideoSource();
51 
52  virtual PlusStatus InternalConnect();
54  virtual PlusStatus InternalUpdate();
55 
56  HRESULT SetupSDIDevices();
57  GLboolean SetupGL();
58  GLboolean CleanupGL();
59  HRESULT CleanupSDIDevices();
60  HRESULT StartSDIPipeline();
61  HRESULT StopSDIPipeline();
62  GLenum CaptureVideo();
63  HRESULT CopyGPUToCPU();
64  void Shutdown();
65 
66 protected:
67  HRESULT SetupSDIinGL();
68  HRESULT SetupSDIinDevices();
69  HRESULT CleanupSDIinGL();
70 
71 protected:
73 
75  HDC HandleDC;
76 
78  HGLRC HandleGLRC;
79 
82 
85 
86  FrameSizeType VideoSize;
87 
89  unsigned char* CPUFrame;
90 
91  GLuint VideoBufferObject[MAX_VIDEO_STREAMS];
93  int NumFrames;
94 
96  uint64_t FrameNumber;
97 
99  bool EnableGPUCPUCopy;
100 
103 
104 private:
105  vtkPlusNvidiaDVPVideoSource(const vtkPlusNvidiaDVPVideoSource&); // Not implemented.
106  void operator=(const vtkPlusNvidiaDVPVideoSource&); // Not implemented.
107 };
108 
109 #endif
110 
vtkPlusDataSource * OutputDataSource
Data source for CPU output (if enabled)
virtual void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
Abstract interface for tracker and video devices.
Definition: vtkPlusDevice.h:60
virtual PlusStatus InternalConnect()
igsioStatus PlusStatus
Definition: PlusCommon.h:40
virtual bool IsTracker() const
CNvSDIin NvSDIin
Capture interface class.
#define VTK_OVERRIDE
Definition: PlusCommon.h:49
virtual PlusStatus ReadConfiguration(vtkXMLDataElement *)
#define MAX_VIDEO_STREAMS
Definition: nvSDIin.h:55
nvOptions NvOptions
Options to configure capture.
unsigned long FrameNumber
virtual PlusStatus WriteConfiguration(vtkXMLDataElement *)
unsigned char * CPUFrame
CPU memory storage of image.
virtual PlusStatus NotifyConfigured()
virtual PlusStatus InternalDisconnect()
virtual PlusStatus InternalUpdate()
Class for providing VTK video input interface from an NVidia digital video platform interface.
static vtkPlusDevice * New()
Interface to a 3D positioning tool, video source, or generalized data stream.