Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef MITKMIRCOBIRDTRACKINGDEVICE_H_HEADER_INCLUDED
18 #define MITKMIRCOBIRDTRACKINGDEVICE_H_HEADER_INCLUDED
19 
20 #include "mitkTrackingDevice.h"
21 
22 #include <MitkIGTExports.h>
23 #include <itkMultiThreader.h>
24 
25 #include <list>
26 
27 #include "mitkTrackingTypes.h"
28 #include "mitkMicroBirdTool.h"
29 
30 #include "PCIBird3.h"
31 
32 namespace mitk {
44  class MITKIGT_EXPORT MicroBirdTrackingDevice : public TrackingDevice
45  {
46  public:
48  itkFactorylessNewMacro(Self)
49  itkCloneMacro(Self)
50 
51 
54  itkSetMacro(Type,TrackingDeviceType);
55 
59  virtual bool OpenConnection();
60 
64  virtual bool CloseConnection();
65 
71  virtual bool StartTracking();
72 
76  virtual bool StopTracking();
77 
81  virtual TrackingTool* GetTool(unsigned int toolNumber);
82 
86  virtual unsigned int GetToolCount() const;
87 
91  itkGetStringMacro(ErrorMessage);
92 
93  protected:
94  void HandleError(int errorCode);
95  bool CompareError(int errorCode, int errorConstant);
96 
98  typedef std::vector<ToolType::Pointer> ToolContainerType;
100  virtual ~MicroBirdTrackingDevice();
101 
105  ToolType* GetMicroBirdTool(unsigned int toolNumber);
106 
107  virtual void InvalidateAll();
108  bool SwitchTransmitter(bool switchOn);
109 
115  virtual void TrackTools();
116 
117  static ITK_THREAD_RETURN_TYPE ThreadStartTracking(void* data);
118 
119  itkSetStringMacro(ErrorMessage);
120 
122  ToolContainerType m_Tools;
123 
124  std::string m_ErrorMessage;
125 
128 
129  //DOUBLE_POSITION_MATRIX_TIME_Q_RECORD record, *pRecord; ///< One tracking data record (matrix orientation format)
130  DOUBLE_POSITION_QUATERNION_TIME_Q_RECORD record, *pRecord;
131  SYSTEM_CONFIGURATION m_SystemConfig;
132  SENSOR_CONFIGURATION *m_SensorConfig;
133  TRANSMITTER_CONFIGURATION *m_TransmitterConfig;
134  BOOL m_metric;
136  double m_pl;
138  AGC_MODE_TYPE m_agc;
139  };
140 } // namespace mitk
141 #endif /* MITKMIRCOBIRDTRACKINGDEVICE_H_HEADER_INCLUDED*/
Interface for all Tracking Tools.
itk::SmartPointer< Self > Pointer
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
implements TrackingTool interface
BOOL m_metric
Specifies whether metric measurement is used.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
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