Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
mitkTrackingDevice.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 
18 #ifndef MITKTRACKINGDEVICE_H_HEADER_INCLUDED_C1C2FCD2
19 #define MITKTRACKINGDEVICE_H_HEADER_INCLUDED_C1C2FCD2
20 
21 #include <MitkIGTExports.h>
22 #include "itkObject.h"
23 #include "mitkCommon.h"
24 #include "mitkTrackingTypes.h"
25 #include "itkFastMutexLock.h"
26 
27 
28 namespace mitk {
29  class TrackingTool; // interface for a tool that can be tracked by the TrackingDevice
30 
38  class MITKIGT_EXPORT TrackingDevice : public itk::Object
39  {
40  public:
42 
56  enum RotationMode {RotationStandard, RotationTransposed};
57 
58  enum TrackingDeviceState {Setup, Ready, Tracking};
59 
65  virtual bool OpenConnection() = 0;
66 
73  virtual bool CloseConnection() = 0;
74 
82  virtual bool StartTracking() = 0;
83 
91  virtual bool StopTracking();
92 
98  virtual TrackingTool* GetTool(unsigned int toolNumber) const = 0;
99 
106  virtual mitk::TrackingTool* GetToolByName(std::string name) const;
107 
111  virtual unsigned int GetToolCount() const = 0;
112 
119  virtual void SetRotationMode(RotationMode r);
120 
124  itkGetConstMacro(RotationMode,RotationMode);
125 
129  TrackingDeviceState GetState() const;
130 
134  TrackingDeviceType GetType() const;
138  void SetType(TrackingDeviceType type);
139 
143  TrackingDeviceData GetData() const;
147  void SetData(TrackingDeviceData data);
148 
164  virtual bool IsDeviceInstalled();
165 
166  private:
167  TrackingDeviceState m_State;
168  protected:
169 
173  void SetState(TrackingDeviceState state);
174 
175 
176  TrackingDevice();
177  virtual ~TrackingDevice();
178 
180 
186  };
187 } // namespace mitk
188 
189 #endif /* MITKTRACKINGDEVICE_H_HEADER_INCLUDED_C1C2FCD2 */
RotationMode m_RotationMode
defines the rotation mode Standard or Transposed, Standard is default
Interface for all Tracking Tools.
itk::SmartPointer< Self > Pointer
itk::FastMutexLock::Pointer m_TrackingFinishedMutex
mutex to manage control flow of StopTracking()
DataCollection - Class to facilitate loading/accessing structured data.
T::Pointer GetData(const std::string &name)
itk::FastMutexLock::Pointer m_StateMutex
mutex to control access to m_State
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:53
bool m_StopTracking
signal stop to tracking thread
Interface for all Tracking Devices.
TrackingDeviceData m_Data
current device Data
std::string TrackingDeviceType
itk::FastMutexLock::Pointer m_StopTrackingMutex
mutex to control access to m_StopTracking
static void Setup()