PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
vtkPlusEpiphanVideoSource.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 __vtkPlusEpiphanVideoSource_h
8 #define __vtkPlusEpiphanVideoSource_h
9 
10 // Local includes
11 #include "igsioCommon.h"
12 #include "vtkPlusDataCollectionExport.h"
13 #include "vtkPlusDevice.h"
14 
15 // Epiphan includes
16 #include <v2u_defs.h>
17 
23 class vtkPlusDataCollectionExport vtkPlusEpiphanVideoSource : public vtkPlusDevice
24 {
25 public:
28  virtual void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
29 
30  virtual bool IsTracker() const;
31 
33  virtual PlusStatus ReadConfiguration(vtkXMLDataElement* config);
35  virtual PlusStatus WriteConfiguration(vtkXMLDataElement* config);
36 
45  vtkSetStdStringMacro(GrabberLocation);
47  vtkGetStdStringMacro(GrabberLocation);
48 
54  void SetClipRectangleSize(const std::array<int, 3>& size);
59  std::array<int, 3> GetClipRectangleSize() const;
60 
65  void SetClipRectangleOrigin(const std::array<int, 3>& origin);
70  std::array<int, 3> GetClipRectangleOrigin() const;
71 
75  virtual PlusStatus NotifyConfigured();
76 
77 protected:
82 
84  virtual PlusStatus InternalConnect();
85 
88 
91 
94 
97 
98  vtkSetStdStringMacro(ScaleMode);
99  vtkSetStdStringMacro(RotationMode);
100 
101 protected:
102  std::array<int, 3> ClipRectangleOrigin; // Crop rectangle origin for the grabber (in pixels, done in hardware)
103  std::array<int, 3> ClipRectangleSize; // Crop rectangle size for the grabber (in pixels, done in hardware). If it is (0,0) then the whole frame will be captured.
104  std::string GrabberLocation; // String to specify the framegrabber to connect to (auto-detection is attempted if unspecified)
105  void* FrameGrabber; // Epiphan Pointer to the grabber
106  FrameSizeType FrameSize; // Frame size of the captured image, third dimension is set to 1
107  US_IMAGE_TYPE CaptureImageType; // The type of image to capture from the hardware
108  V2URect* CropRectangle; // Dimensions to request from framegrabber
109 
110  std::string RotationMode;
111  V2URotationMode Rotation; // Rotation of the acquired image
112  std::string ScaleMode;
113  V2UScaleMode Scale; // Scaling of the acquired image
114 
115 private:
116  vtkPlusEpiphanVideoSource(const vtkPlusEpiphanVideoSource&); // Not implemented.
117  void operator=(const vtkPlusEpiphanVideoSource&); // Not implemented.
118 };
119 
120 #endif
virtual void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
virtual PlusStatus InternalStopRecording()
Abstract interface for tracker and video devices.
Definition: vtkPlusDevice.h:60
std::array< int, 3 > ClipRectangleOrigin
virtual PlusStatus InternalConnect()
igsioStatus PlusStatus
Definition: PlusCommon.h:40
std::array< int, 3 > ClipRectangleSize
virtual bool IsTracker() const
#define VTK_OVERRIDE
Definition: PlusCommon.h:49
virtual PlusStatus ReadConfiguration(vtkXMLDataElement *)
virtual PlusStatus WriteConfiguration(vtkXMLDataElement *)
virtual PlusStatus InternalStartRecording()
enum v2u_scale_mode V2UScaleMode
virtual PlusStatus NotifyConfigured()
Class for providing video input interfaces between VTK and Epiphan frame grabber device.
virtual PlusStatus InternalDisconnect()
enum v2u_rotation_mode V2URotationMode
virtual PlusStatus InternalUpdate()
static vtkPlusDevice * New()