CustusX  2021.04.22-dev+develop.337f9
An IGT application
cxTrackingService.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 CXTRACKINGSERVICE_H
13 #define CXTRACKINGSERVICE_H
14 
15 #include "cxResourceExport.h"
16 
17 #include <QObject>
18 #include <boost/shared_ptr.hpp>
19 #include "cxTransform3D.h"
20 #include "cxTool.h"
21 
22 #define TrackingService_iid "cx::TrackingService"
23 
24 class QDomNode;
25 
26 namespace cx
27 {
28 
29 typedef std::map<double, Transform3D> TimedTransformMap;
30 typedef boost::shared_ptr<class Tool> ToolPtr;
31 typedef std::map<ToolPtr, TimedTransformMap> SessionToolHistoryMap;
32 typedef boost::shared_ptr<class Landmarks> LandmarksPtr;
33 typedef boost::shared_ptr<class PlaybackTime> PlaybackTimePtr;
34 typedef boost::shared_ptr<class TrackerConfiguration> TrackerConfigurationPtr;
35 
36 typedef boost::shared_ptr<class TrackingSystemService> TrackingSystemServicePtr;
37 typedef boost::shared_ptr<class TrackingService> TrackingServicePtr;
38 typedef boost::shared_ptr<class DummyTool> DummyToolPtr;
39 typedef boost::shared_ptr<class ManualTool> ManualToolPtr;
40 
49 class cxResource_EXPORT TrackingService : public QObject
50 {
51  Q_OBJECT
52 
53 public:
54  typedef std::map<QString, ToolPtr> ToolMap;
55 
56  virtual ~TrackingService() {}
57 
58  virtual Tool::State getState() const = 0;
59  virtual void setState(const Tool::State val) = 0;
60 
61  virtual ToolPtr getTool(const QString& uid) = 0;
62  virtual ToolPtr getActiveTool() = 0;
63  virtual void setActiveTool(const QString& uid) = 0;
64  virtual ToolPtr getFirstProbe() = 0;
65 
66  virtual ToolPtr getReferenceTool() const = 0;
67  virtual ToolPtr getManualTool() = 0;
68 
69  virtual ToolMap getTools() = 0;
70 
71  virtual bool isPlaybackMode() const = 0;
72  virtual void setPlaybackMode(PlaybackTimePtr controller) = 0;
73 
74  virtual SessionToolHistoryMap getSessionHistory(double startTime, double stopTime) = 0;
75  virtual void runDummyTool(DummyToolPtr tool) = 0;
76  virtual TrackerConfigurationPtr getConfiguration() = 0;
77 
78  virtual void installTrackingSystem(TrackingSystemServicePtr system) = 0;
79  virtual void unInstallTrackingSystem(TrackingSystemServicePtr system) = 0;
80  virtual std::vector<TrackingSystemServicePtr> getTrackingSystems() = 0;
81 
82  virtual bool isNull() = 0;
83  static TrackingServicePtr getNullObject();
84 
85 signals:
86  void stateChanged();
87  void activeToolChanged(const QString& uId);
88 
89 };
90 
91 } //cx
92 Q_DECLARE_INTERFACE(cx::TrackingService, TrackingService_iid)
93 
94 #endif // CXTRACKINGSERVICE_H
std::map< ToolPtr, TimedTransformMap > SessionToolHistoryMap
boost::shared_ptr< class TrackingService > TrackingServicePtr
boost::shared_ptr< class ManualTool > ManualToolPtr
boost::shared_ptr< class Landmarks > LandmarksPtr
Definition: cxData.h:41
boost::shared_ptr< class PlaybackTime > PlaybackTimePtr
boost::shared_ptr< class DummyTool > DummyToolPtr
boost::shared_ptr< class TrackerConfiguration > TrackerConfigurationPtr
#define TrackingService_iid
Service providing tools and tracking systems.
std::map< QString, ToolPtr > ToolMap
std::map< double, Transform3D > TimedTransformMap
Namespace for all CustusX production code.
boost::shared_ptr< class Tool > ToolPtr
boost::shared_ptr< class TrackingSystemService > TrackingSystemServicePtr