Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkPolhemusTool.cpp
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 #include "mitkPolhemusTool.h"
14 
16  : TrackingTool(),
17  m_ToolPort(-1),
18  m_DistortionLevel(DistortionLevel::UNDEFINED)
19 {
20 }
21 
23 {
24 }
25 
27 {
28  this->m_ToolPort = _ToolPort;
29 }
30 
32 {
33  return this->m_ToolPort;
34 }
35 
37 {
38  if (level == 0)
39  {
40  m_DistortionLevel = DistortionLevel::NO_DISTORTION;
41  }
42  else if (level == 1)
43  {
44  m_DistortionLevel = DistortionLevel::MINOR_DISTORTION;
45  }
46  else if (level == 2)
47  {
48  m_DistortionLevel = DistortionLevel::SIGNIFICANT_DISTORTION;
49  }
50  else
51  {
52  m_DistortionLevel = DistortionLevel::UNDEFINED;
53  }
54 }
55 
57 {
58  return m_DistortionLevel;
59 }
Interface for all Tracking Tools.
DistortionLevel GetDistortionLevel() const
Returns the distortion level.
DistortionLevel m_DistortionLevel
void SetDistortionLevel(const int level)
Sets the distortion level by mapping the integer value (read from the response frame) to the correspo...
virtual int GetToolPort()
Sets the port of the tool. (e.g. 1 for port "SENS 1" etc.)
virtual void SetToolPort(int _ToolPort)
Sets the port of the tool. (e.g. 1 for port "SENS 1" etc.)