CustusX  22.04-rc5
An IGT application
cxTrackingServiceProxy.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 CXTRACKINGSERVICEPROXY_H
13 #define CXTRACKINGSERVICEPROXY_H
14 
15 #include "cxResourceExport.h"
16 
17 #include "cxTrackingService.h"
19 class ctkPluginContext;
20 
21 namespace cx
22 {
23 
27 class cxResource_EXPORT TrackingServiceProxy : public TrackingService
28 {
29 public:
30  static TrackingServicePtr create(ctkPluginContext *pluginContext);
31  TrackingServiceProxy(ctkPluginContext *pluginContext);
32 
33  virtual Tool::State getState() const;
34  virtual void setState(const Tool::State val);
35 
36  virtual ToolPtr getTool(const QString& uid);
37  virtual ToolPtr getActiveTool();
38  virtual void setActiveTool(const QString& uid);
39  virtual void clearActiveTool();
40  virtual ToolPtr getFirstProbe();
41 
42  virtual ToolPtr getReferenceTool() const;
43  virtual ToolPtr getManualTool();
44 
45  virtual ToolMap getTools();
46 
47  virtual bool isPlaybackMode() const;
48  virtual void setPlaybackMode(PlaybackTimePtr controller);
49 
50  virtual SessionToolHistoryMap getSessionHistory(double startTime, double stopTime);
51  virtual void runDummyTool(DummyToolPtr tool);
52  virtual std::vector<TrackerConfigurationPtr> getConfigurations();
53  //virtual TrackerConfigurationPtr getConfiguration(QString trackingSystemImplementation);
54  virtual TrackerConfigurationPtr getConfiguration();
55  virtual void setCurrentTrackingSystemImplementation(QString trackingSystemImplementation);
56  virtual QString getCurrentTrackingSystemImplementation();
57 
58  virtual void installTrackingSystem(TrackingSystemServicePtr system);
59  virtual void unInstallTrackingSystem(TrackingSystemServicePtr system);
60  virtual std::vector<TrackingSystemServicePtr> getTrackingSystems();
61  virtual void resetTimeSynchronization();
62 
63  bool isNull();
64 
65 private:
66  void initServiceListener();
67  void onServiceAdded(TrackingService* service);
68  void onServiceRemoved(TrackingService *service);
69 
70  ctkPluginContext *mPluginContext;
71  TrackingServicePtr mTrackingService;
72  boost::shared_ptr<ServiceTrackerListener<TrackingService> > mServiceListener;
73 };
74 } //cx
75 #endif // CXTRACKINGSERVICEPROXY_H
std::map< ToolPtr, TimedTransformMap > SessionToolHistoryMap
boost::shared_ptr< class TrackingService > TrackingServicePtr
boost::shared_ptr< class PlaybackTime > PlaybackTimePtr
boost::shared_ptr< class DummyTool > DummyToolPtr
boost::shared_ptr< class TrackerConfiguration > TrackerConfigurationPtr
Service providing tools and tracking systems.
std::map< QString, ToolPtr > ToolMap
Namespace for all CustusX production code.
boost::shared_ptr< class Tool > ToolPtr
boost::shared_ptr< class TrackingSystemService > TrackingSystemServicePtr