MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkMicroBirdTrackingDevice.h
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found in the LICENSE file.
10
11============================================================================*/
12
13#ifndef mitkMicroBirdTrackingDevice_h
14#define mitkMicroBirdTrackingDevice_h
15
16#include "mitkTrackingDevice.h"
17
18#include <MitkIGTExports.h>
19#include <itkMultiThreader.h>
20
21#include <list>
22
23#include "mitkTrackingTypes.h"
24#include "mitkMicroBirdTool.h"
25
26#include "PCIBird3.h"
27
28namespace mitk {
40 class MITKIGT_EXPORT MicroBirdTrackingDevice : public TrackingDevice
41 {
42 public:
46
51
55 virtual bool OpenConnection();
56
60 virtual bool CloseConnection();
61
67 virtual bool StartTracking();
68
72 virtual bool StopTracking();
73
77 virtual TrackingTool* GetTool(unsigned int toolNumber);
78
82 virtual unsigned int GetToolCount() const;
83
87 itkGetStringMacro(ErrorMessage);
88
89 protected:
90 void HandleError(int errorCode);
91 bool CompareError(int errorCode, int errorConstant);
92
94 typedef std::vector<ToolType::Pointer> ToolContainerType;
97
101 ToolType* GetMicroBirdTool(unsigned int toolNumber);
102
103 virtual void InvalidateAll();
104 bool SwitchTransmitter(bool switchOn);
105
111 virtual void TrackTools();
112
113 static ITK_THREAD_RETURN_TYPE ThreadStartTracking(void* data);
114
115 itkSetStringMacro(ErrorMessage);
116
117 itk::FastMutexLock::Pointer m_ToolsMutex;
119
120 std::string m_ErrorMessage;
121
122 itk::MultiThreader::Pointer m_MultiThreader;
124
125 //DOUBLE_POSITION_MATRIX_TIME_Q_RECORD record, *pRecord; ///< One tracking data record (matrix orientation format)
126 DOUBLE_POSITION_QUATERNION_TIME_Q_RECORD record, *pRecord;
127 SYSTEM_CONFIGURATION m_SystemConfig;
128 SENSOR_CONFIGURATION *m_SensorConfig;
129 TRANSMITTER_CONFIGURATION *m_TransmitterConfig;
130 BOOL m_metric;
132 double m_pl;
134 AGC_MODE_TYPE m_agc;
135 };
136} // namespace mitk
137#endif
superclass for specific MIRCOBIRD tracking Devices
SENSOR_CONFIGURATION * m_SensorConfig
The sensor configuration - used to get and set the sensor properties.
double m_pl
Specifies the power line frequency (Europe 50Hz, USA 60Hz)
BOOL m_metric
Specifies whether metric measurement is used.
std::vector< ToolType::Pointer > ToolContainerType
itkGetStringMacro(ErrorMessage)
returns description of most recent error.
mitkClassMacro(MicroBirdTrackingDevice, TrackingDevice)
itk::MultiThreader::Pointer m_MultiThreader
itkSetMacro(Type, TrackingDeviceType)
Set the type of the microBird Tracking Device because it can not yet handle this itself.
SYSTEM_CONFIGURATION m_SystemConfig
The system configuration - used to specify its use.
itk::FastMutexLock::Pointer m_ToolsMutex
TRANSMITTER_CONFIGURATION * m_TransmitterConfig
The transmitter configuration - used to get and set the transmitter properties.
double m_measurementRate
Specifies the measurement rate - default set to maximum.
DOUBLE_POSITION_QUATERNION_TIME_Q_RECORD * pRecord
One tracking data record (quaternion orientation format)
bool m_agcModeBoth
AGC (automatic gain control) mode flag.
Interface for all Tracking Devices.
Interface for all Tracking Tools.
IGT Exceptions.
std::string TrackingDeviceType