CustusX  22.04-rc5
An IGT application
cxIgstkTrackerThread.h
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 
12 #ifndef CXIGSTKTRACKERTHREAD_H_
13 #define CXIGSTKTRACKERTHREAD_H_
14 
15 #include "org_custusx_core_tracking_system_igstk_Export.h"
16 
17 #include <map>
18 #include <vector>
19 #include <QThread>
20 #include "cxIgstkTracker.h"
21 #include "cxIgstkTrackerThread.h"
22 #include "cxToolUsingIGSTK.h"
23 #include "cxIgstkTool.h"
24 #include "cxIgstkToolManager.h"
25 
26 namespace cx
27 {
44 class org_custusx_core_tracking_system_igstk_EXPORT IgstkTrackerThread: public QThread
45 {
46 Q_OBJECT
47 
48 public:
50  std::vector<ToolFileParser::ToolInternalStructurePtr> toolStructures,
51  ToolFileParser::ToolInternalStructurePtr referenceToolStructure);
52  virtual ~IgstkTrackerThread();
53 
54  void initialize(bool on);
55  void track(bool on);
56 
57  std::map<QString, IgstkToolPtr> getTools();
58  IgstkToolPtr getRefereceTool();
59 
60 signals:
61  void configured(bool on);
62  void initialized(bool on);
63  void tracking(bool on);
64  void error();
65 
66  void requestInitialize(bool on);
67  void requestTrack(bool on);
68 
69 private:
70  virtual void run();
71  void configure();
72  void deconfigure();
73 
74  ToolFileParser::TrackerInternalStructure mInitTrackerStructure;
75  std::vector<ToolFileParser::ToolInternalStructurePtr> mInitToolStructures;
76  ToolFileParser::ToolInternalStructurePtr mInitReferenceToolStructure;
77 
78  IgstkToolManagerPtr mManager;
79 };
80 typedef boost::shared_ptr<IgstkTrackerThread> IgstkTrackerThreadPtr;
81 
85 }
86 
87 #endif /* CXIGSTKTRACKERTHREAD_H_ */
boost::shared_ptr< ToolInternalStructure > ToolInternalStructurePtr
boost::shared_ptr< IgstkToolManager > IgstkToolManagerPtr
boost::shared_ptr< class IgstkTool > IgstkToolPtr
boost::shared_ptr< IgstkTrackerThread > IgstkTrackerThreadPtr
Thread containing all of IGSTK.
Namespace for all CustusX production code.