NorMIT-nav  22.09
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 void clearActiveTool() = 0;
65  virtual ToolPtr getFirstProbe() = 0;
66 
67  virtual ToolPtr getReferenceTool() const = 0;
68  virtual ToolPtr getManualTool() = 0;
69 
70  virtual ToolMap getTools() = 0;
71 
72  virtual bool isPlaybackMode() const = 0;
73  virtual void setPlaybackMode(PlaybackTimePtr controller) = 0;
74 
75  virtual SessionToolHistoryMap getSessionHistory(double startTime, double stopTime) = 0;
76  virtual void runDummyTool(DummyToolPtr tool) = 0;
77  virtual std::vector<TrackerConfigurationPtr> getConfigurations() = 0;
78  //virtual TrackerConfigurationPtr getConfiguration(QString trackingSystemImplementation) = 0;//Set as private in TrackingImplService for now
79  virtual TrackerConfigurationPtr getConfiguration() = 0;
80  virtual void setCurrentTrackingSystemImplementation(QString trackingSystemImplementation) = 0;
81  virtual QString getCurrentTrackingSystemImplementation() = 0;
82 
83  virtual void installTrackingSystem(TrackingSystemServicePtr system) = 0;
84  virtual void unInstallTrackingSystem(TrackingSystemServicePtr system) = 0;
85  virtual std::vector<TrackingSystemServicePtr> getTrackingSystems() = 0;
86  virtual void resetTimeSynchronization() = 0;
87 
88  virtual bool isNull() = 0;
89  static TrackingServicePtr getNullObject();
90 
91 signals:
92  void stateChanged();
93  void activeToolChanged(const QString& uId);
94 
95 };
96 
97 } //cx
98 Q_DECLARE_INTERFACE(cx::TrackingService, TrackingService_iid)
99 
100 #endif // CXTRACKINGSERVICE_H
cx::ToolMap
std::map< QString, ToolPtr > ToolMap
Definition: cxRecordSessionSelector.h:32
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::TrackerConfigurationPtr
boost::shared_ptr< class TrackerConfiguration > TrackerConfigurationPtr
Definition: cxTrackerConfiguration.h:24
cx::PlaybackTimePtr
boost::shared_ptr< class PlaybackTime > PlaybackTimePtr
Definition: cxTrackingSystemBronchoscopyService.h:42
cx::SessionToolHistoryMap
std::map< ToolPtr, TimedTransformMap > SessionToolHistoryMap
Definition: cxTrackingService.h:31
TrackingService_iid
#define TrackingService_iid
Definition: cxTrackingService.h:22
cx::TrackingServicePtr
boost::shared_ptr< class TrackingService > TrackingServicePtr
Definition: cxToolFilterWidget.h:27
cx::TimedTransformMap
std::map< double, Transform3D > TimedTransformMap
Definition: cxRecordSession.h:36
cx::TrackingSystemServicePtr
boost::shared_ptr< class TrackingSystemService > TrackingSystemServicePtr
Definition: cxTrackingImplService.h:36
cxTool.h
cx::ManualToolPtr
boost::shared_ptr< class ManualTool > ManualToolPtr
Definition: cxForwardDeclarations.h:43
cx::Tool::State
State
Definition: cxTool.h:72
cx::LandmarksPtr
boost::shared_ptr< class Landmarks > LandmarksPtr
Definition: cxData.h:41
cx::ToolPtr
boost::shared_ptr< class Tool > ToolPtr
Definition: cxVideoConnectionWidget.h:43
cx::TrackingService::~TrackingService
virtual ~TrackingService()
Definition: cxTrackingService.h:56
cx::TrackingService
Service providing tools and tracking systems.
Definition: cxTrackingService.h:49
cxTransform3D.h
cx::DummyToolPtr
boost::shared_ptr< class DummyTool > DummyToolPtr
Definition: cxForwardDeclarations.h:44
cx::TrackingService::ToolMap
std::map< QString, ToolPtr > ToolMap
Definition: cxTrackingService.h:54