NorMIT-nav
22.09
An IGT application
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
z
Functions
a
b
c
d
e
f
g
i
l
m
o
p
q
r
s
t
u
v
w
Variables
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Variables
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Typedefs
a
b
c
d
e
f
i
j
l
m
n
o
p
r
s
t
v
Enumerations
Enumerator
a
c
d
g
h
i
l
n
p
r
s
t
u
v
Related Functions
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Functions
a
b
c
d
e
f
g
i
l
m
n
o
p
q
r
s
t
v
Variables
c
f
i
l
m
o
p
q
r
s
t
v
Typedefs
c
d
f
h
m
o
p
q
s
u
v
Macros
_
a
b
c
d
e
f
g
i
m
n
o
p
r
s
t
u
v
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
cxTrackingSystemDummyService.cpp
Go to the documentation of this file.
1
/*=========================================================================
2
This file is part of CustusX, an Image Guided Therapy Application.
3
4
Copyright (c) SINTEF Department of Medical Technology.
5
All rights reserved.
6
7
CustusX is released under a BSD 3-Clause license.
8
9
See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10
=========================================================================*/
11
#include "
cxTrackingSystemDummyService.h
"
12
13
#include "
cxDummyTool.h
"
14
#include "
cxLogger.h
"
15
#include "
cxTrackerConfiguration.h
"
16
17
namespace
cx
18
{
19
20
TrackingSystemDummyService::TrackingSystemDummyService
(
DummyToolPtr
tool)
21
{
22
mState =
Tool::tsINITIALIZED
;
23
24
if
(tool)
25
{
26
mTools.push_back(tool);
27
report
(
"Running dummy tool "
+ tool->getUid());
28
}
29
}
30
31
TrackingSystemDummyService::~TrackingSystemDummyService
()
32
{
33
34
}
35
36
std::vector<ToolPtr>
TrackingSystemDummyService::getTools
()
37
{
38
std::vector<ToolPtr> retval;
39
std::copy(mTools.begin(), mTools.end(), back_inserter(retval));
40
return
retval;
41
}
42
43
Tool::State
TrackingSystemDummyService::getState
()
const
44
{
45
return
mState;
46
}
47
48
void
TrackingSystemDummyService::setState
(
const
Tool::State
val)
49
{
50
if
(mState==val)
51
return
;
52
mState = val;
53
54
if
(mState>=
Tool::tsTRACKING
)
55
{
56
for
(
unsigned
i=0; i<mTools.size(); ++i)
57
{
58
mTools[i]->setVisible(
true
);
59
mTools[i]->startTracking(30);
60
}
61
}
62
else
63
{
64
for
(
unsigned
i=0; i<mTools.size(); ++i)
65
{
66
mTools[i]->setVisible(
false
);
67
mTools[i]->stopTracking();
68
}
69
}
70
71
emit
stateChanged
();
72
}
73
74
void
TrackingSystemDummyService::setLoggingFolder
(QString loggingFolder)
75
{
76
77
}
78
79
TrackerConfigurationPtr
TrackingSystemDummyService::getConfiguration
()
80
{
81
return
TrackerConfiguration::getNullObject
();
82
}
83
84
//void ToolManagerUsingIGSTK::runDummyTool(DummyToolPtr tool)
85
//{
86
// TrackingSystemServicePtr dummySystem;
87
// dummySystem.reset(new TrackingSystemDummyService(tool));
88
// this->installTrackingSystem(dummySystem);
89
// this->setActiveTool(tool->getUid());
90
// dummySystem->setState(Tool::tsTRACKING);
91
92
// report("Running dummy tool " + tool->getUid());
93
94
// mTools[tool->getUid()] = tool;
95
// tool->setVisible(true);
96
// connect(tool.get(), SIGNAL(toolVisible(bool)), this, SLOT(dominantCheckSlot()));
97
// tool->startTracking(30);
98
// this->setActiveTool(tool->getUid());
99
100
// report("Dummy: Config/Init/Track started in toolManager");
101
// mState = Tool::tsCONFIGURED;
102
// emit configured();
103
// emit stateChanged();
104
105
// this->initializedSlot(true);
106
// this->trackerTrackingSlot(true);
107
//}
108
109
}
// namespace cx
cx::TrackingSystemDummyService::setState
virtual void setState(const Tool::State val)
asynchronously request a state. Wait for signal stateChanged()
Definition:
cxTrackingSystemDummyService.cpp:48
cxLogger.h
cx
Namespace for all CustusX production code.
Definition:
cx_dev_group_definitions.h:13
cx::TrackerConfiguration::getNullObject
static TrackerConfigurationPtr getNullObject()
Definition:
cxTrackerConfiguration.cpp:21
cx::TrackerConfigurationPtr
boost::shared_ptr< class TrackerConfiguration > TrackerConfigurationPtr
Definition:
cxTrackerConfiguration.h:24
cx::report
void report(QString msg)
Definition:
cxLogger.cpp:69
cxDummyTool.h
cx::TrackingSystemDummyService::~TrackingSystemDummyService
virtual ~TrackingSystemDummyService()
Definition:
cxTrackingSystemDummyService.cpp:31
cx::TrackingSystemDummyService::getState
virtual Tool::State getState() const
Definition:
cxTrackingSystemDummyService.cpp:43
cx::TrackingSystemDummyService::getTools
virtual std::vector< ToolPtr > getTools()
Definition:
cxTrackingSystemDummyService.cpp:36
cx::TrackingSystemDummyService::TrackingSystemDummyService
TrackingSystemDummyService(DummyToolPtr tool)
Definition:
cxTrackingSystemDummyService.cpp:20
cx::TrackingSystemDummyService::setLoggingFolder
virtual void setLoggingFolder(QString loggingFolder)
Definition:
cxTrackingSystemDummyService.cpp:74
cx::TrackingSystemService::stateChanged
void stateChanged()
Reset time synchronization. Used for resetting time synchronization of incoming timestamps in OpenIGT...
cx::Tool::State
State
Definition:
cxTool.h:72
cxTrackingSystemDummyService.h
cx::Tool::tsINITIALIZED
@ tsINITIALIZED
connected to hardware, if any, ready to use
Definition:
cxTool.h:76
cxTrackerConfiguration.h
cx::Tool::tsTRACKING
@ tsTRACKING
emitting tracking data
Definition:
cxTool.h:77
cx::DummyToolPtr
boost::shared_ptr< class DummyTool > DummyToolPtr
Definition:
cxForwardDeclarations.h:44
cx::TrackingSystemDummyService::getConfiguration
virtual TrackerConfigurationPtr getConfiguration()
Definition:
cxTrackingSystemDummyService.cpp:79
CX
source
plugins
org.custusx.core.tracking
cxTrackingSystemDummyService.cpp
Generated on Tue Sep 13 2022 11:06:13 for NorMIT-nav by
1.8.17