PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
vtkPlus3dConnexionTracker.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 __vtkPlus3dConnexionTracker_h
8 #define __vtkPlus3dConnexionTracker_h
9 
10 #include "vtkPlusDataCollectionExport.h"
11 #include "vtkIGSIORecursiveCriticalSection.h"
12 #include "vtkPlusDevice.h"
13 
14 class vtkPlusDataSource;
15 class vtkMatrix4x4;
16 
25 class vtkPlusDataCollectionExport vtkPlus3dConnexionTracker : public vtkPlusDevice
26 {
27 public:
28 
31 
34 
37 
41  PlusStatus Probe();
42 
49 
51  PlusStatus ReadConfiguration( vtkXMLDataElement* config );
52 
54  PlusStatus WriteConfiguration( vtkXMLDataElement* config );
55 
57  void ProcessDeviceInputEvent( LPARAM lParam );
58 
60  void OnCaptureWindowDestroy();
61 
63  {
65  JOYSTICK_MODE
66  };
67 
68  virtual bool IsTracker() const { return true; }
69 
70 protected:
71 
74 
77 
80 
82  PlusStatus RegisterDevice();
83 
85  void UnregisterDevice();
86 
88  PlusStatus CreateCaptureWindow();
89 
91  void DestroyCaptureWindow();
92 
93 private: // Functions.
94 
96  void operator=( const vtkPlus3dConnexionTracker& );
97 
98 private: // Variables.
99 
100  vtkPlusDataSource* SpaceNavigatorTool;
101  vtkMatrix4x4* LatestMouseTransform;
102  vtkMatrix4x4* DeviceToTrackerTransform;
103  double TranslationScales[3];
104  double RotationScales[3];
105 
106  OperatingModeType OperatingMode;
107 
109  vtkSmartPointer<vtkIGSIORecursiveCriticalSection> Mutex;
110 
111  std::string CaptureWindowClassName;
112  HWND CaptureWindowHandle;
113 
115  PRAWINPUTDEVICE RegisteredRawInputDevices;
117  unsigned int NumberOfRegisteredRawInputDevices;
118 
119 };
120 
121 #endif
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 Probe()
virtual PlusStatus ReadConfiguration(vtkXMLDataElement *)
virtual PlusStatus WriteConfiguration(vtkXMLDataElement *)
Interface for 3D Connexion 3D mouse devices.
virtual PlusStatus InternalStartRecording()
virtual PlusStatus InternalDisconnect()
virtual PlusStatus InternalUpdate()
static vtkPlusDevice * New()
Interface to a 3D positioning tool, video source, or generalized data stream.