Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
mitkMicroBirdTrackingDevice.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found 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 
28 namespace mitk {
40  class MITKIGT_EXPORT MicroBirdTrackingDevice : public TrackingDevice
41  {
42  public:
44  itkFactorylessNewMacro(Self);
45  itkCloneMacro(Self);
46 
50  itkSetMacro(Type,TrackingDeviceType);
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;
96  virtual ~MicroBirdTrackingDevice();
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
mitk::MicroBirdTrackingDevice::m_TransmitterConfig
TRANSMITTER_CONFIGURATION * m_TransmitterConfig
The transmitter configuration - used to get and set the transmitter properties.
Definition: mitkMicroBirdTrackingDevice.h:129
mitkMicroBirdTool.h
mitk::MicroBirdTrackingDevice::m_metric
BOOL m_metric
Specifies whether metric measurement is used.
Definition: mitkMicroBirdTrackingDevice.h:130
mitk::MicroBirdTrackingDevice::m_Tools
ToolContainerType m_Tools
Definition: mitkMicroBirdTrackingDevice.h:118
mitk::MicroBirdTrackingDevice::m_pl
double m_pl
Specifies the power line frequency (Europe 50Hz, USA 60Hz)
Definition: mitkMicroBirdTrackingDevice.h:132
mitk::MicroBirdTrackingDevice
superclass for specific MIRCOBIRD tracking Devices
Definition: mitkMicroBirdTrackingDevice.h:40
mitk::MicroBirdTrackingDevice::m_measurementRate
double m_measurementRate
Specifies the measurement rate - default set to maximum.
Definition: mitkMicroBirdTrackingDevice.h:131
mitk::MicroBirdTrackingDevice::m_SensorConfig
SENSOR_CONFIGURATION * m_SensorConfig
The sensor configuration - used to get and set the sensor properties.
Definition: mitkMicroBirdTrackingDevice.h:128
mitk::MicroBirdTrackingDevice::m_ThreadID
int m_ThreadID
Definition: mitkMicroBirdTrackingDevice.h:123
mitk
DataCollection - Class to facilitate loading/accessing structured data.
Definition: RenderingTests.dox:1
mitk::MicroBirdTrackingDevice::record
DOUBLE_POSITION_QUATERNION_TIME_Q_RECORD record
Definition: mitkMicroBirdTrackingDevice.h:126
mitk::TrackingDevice
Interface for all Tracking Devices.
Definition: mitkTrackingDevice.h:34
mitk::MicroBirdTrackingDevice::ToolContainerType
std::vector< ToolType::Pointer > ToolContainerType
Definition: mitkMicroBirdTrackingDevice.h:94
mitk::MicroBirdTrackingDevice::m_agcModeBoth
bool m_agcModeBoth
AGC (automatic gain control) mode flag.
Definition: mitkMicroBirdTrackingDevice.h:133
mitk::MicroBirdTrackingDevice::m_MultiThreader
itk::MultiThreader::Pointer m_MultiThreader
Definition: mitkMicroBirdTrackingDevice.h:122
mitk::MicroBirdTrackingDevice::m_agc
AGC_MODE_TYPE m_agc
Definition: mitkMicroBirdTrackingDevice.h:134
mitk::MicroBirdTrackingDevice::m_SystemConfig
SYSTEM_CONFIGURATION m_SystemConfig
The system configuration - used to specify its use.
Definition: mitkMicroBirdTrackingDevice.h:127
mitk::TrackingTool
Interface for all Tracking Tools.
Definition: mitkTrackingTool.h:42
mitk::MicroBirdTrackingDevice::ToolType
TrackingTool ToolType
Definition: mitkMicroBirdTrackingDevice.h:93
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
mitkTrackingDevice.h
mitk::MicroBirdTrackingDevice::m_ErrorMessage
std::string m_ErrorMessage
Definition: mitkMicroBirdTrackingDevice.h:120
mitk::MicroBirdTrackingDevice::m_ToolsMutex
itk::FastMutexLock::Pointer m_ToolsMutex
Definition: mitkMicroBirdTrackingDevice.h:115
mitk::TrackingDeviceType
std::string TrackingDeviceType
Definition: mitkTrackingTypes.h:22
mitkTrackingTypes.h