MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkPolhemusTool.cpp
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found in the LICENSE file.
10
11============================================================================*/
12
13#include "mitkPolhemusTool.h"
14
15mitk::PolhemusTool::PolhemusTool()
16 : TrackingTool(),
17 m_ToolPort(-1),
18 m_DistortionLevel(DistortionLevel::UNDEFINED)
19{
20}
21
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
virtual int GetToolPort()
Sets the port of the tool. (e.g. 1 for port "SENS 1" etc.)
void SetDistortionLevel(const int level)
Sets the distortion level by mapping the integer value (read from the response frame) to the correspo...
DistortionLevel GetDistortionLevel() const
Returns the distortion level.
virtual void SetToolPort(int _ToolPort)
Sets the port of the tool. (e.g. 1 for port "SENS 1" etc.)