Medical Imaging Interaction Toolkit  2021.02.99-e55a5d2f
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 MITKMIRCOBIRDTRACKINGDEVICE_H_HEADER_INCLUDED
14 #define MITKMIRCOBIRDTRACKINGDEVICE_H_HEADER_INCLUDED
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 {
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;
118  ToolContainerType m_Tools;
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 /* MITKMIRCOBIRDTRACKINGDEVICE_H_HEADER_INCLUDED*/
Interface for all Tracking Tools.
std::vector< ToolType::Pointer > ToolContainerType
superclass for specific MIRCOBIRD tracking Devices
DataCollection - Class to facilitate loading/accessing structured data.
itk::FastMutexLock::Pointer m_ToolsMutex
bool m_agcModeBoth
AGC (automatic gain control) mode flag.
itk::MultiThreader::Pointer m_MultiThreader
#define MITKIGT_EXPORT
BOOL m_metric
Specifies whether metric measurement is used.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
SENSOR_CONFIGURATION * m_SensorConfig
The sensor configuration - used to get and set the sensor properties.
Interface for all Tracking Devices.
SYSTEM_CONFIGURATION m_SystemConfig
The system configuration - used to specify its use.
double m_measurementRate
Specifies the measurement rate - default set to maximum.
double m_pl
Specifies the power line frequency (Europe 50Hz, USA 60Hz)
std::string TrackingDeviceType
TRANSMITTER_CONFIGURATION * m_TransmitterConfig
The transmitter configuration - used to get and set the transmitter properties.
DOUBLE_POSITION_QUATERNION_TIME_Q_RECORD record