CustusX  22.04-rc5
An IGT application
cxDummyToolManager.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 
13 #ifndef CXDUMMYTOOLMANAGER_H_
14 #define CXDUMMYTOOLMANAGER_H_
15 
16 #include "cxResourceExport.h"
17 
18 #include "cxTrackingService.h"
19 #include "cxDummyTool.h"
20 
21 namespace cx
22 {
23 
31 class cxResource_EXPORT DummyToolManager : public TrackingService
32 {
33  Q_OBJECT
34 
35 public:
36  typedef boost::shared_ptr<DummyToolManager> DummyToolManagerPtr;
37  static DummyToolManagerPtr create();
38 
39  virtual ~DummyToolManager();
40 
41  typedef std::map<QString, DummyToolPtr> DummyToolMap;
42 
43  virtual Tool::State getState() const;
44  virtual void setState(const Tool::State val);
45 
46  virtual ToolMap getTools();
47  virtual ToolPtr getTool(const QString& uid);
48 
49  virtual ToolPtr getActiveTool();
50  virtual void setActiveTool(const QString& uid);
51  virtual void clearActiveTool();
52 
53  virtual Transform3D get_rMpr() const;
54  virtual void set_rMpr(const Transform3D& val);
55  virtual ToolPtr getReferenceTool() const;
56 
57  virtual ToolPtr getManualTool() { return ToolPtr(); }
58 // virtual void savePositionHistory() {}
59 // virtual void loadPositionHistory() {}
60 // virtual void addXml(QDomNode& parentNode) {}
61 // virtual void parseXml(QDomNode& dataNode) {}
62 // virtual void clear() {}
63  virtual SessionToolHistoryMap getSessionHistory(double startTime, double stopTime) { return SessionToolHistoryMap(); }
64 
65  virtual bool isPlaybackMode() const { return false; }
66  virtual void setPlaybackMode(PlaybackTimePtr controller) {}
67 // virtual void setLoggingFolder(QString loggingFolder) {}
68  virtual void runDummyTool(DummyToolPtr tool) {}
69  virtual bool isNull() { return false; }
70 
71  void addTool(DummyToolPtr tool);
72  virtual ToolPtr getFirstProbe() { return ToolPtr(); }
73  virtual std::vector<TrackerConfigurationPtr> getConfigurations();
74  //virtual TrackerConfigurationPtr getConfiguration(QString trackingSystemImplementation);
75  virtual TrackerConfigurationPtr getConfiguration();
76  virtual void setCurrentTrackingSystemImplementation(QString trackingSystemImplementation);
77  virtual QString getCurrentTrackingSystemImplementation();
78 
79  virtual void installTrackingSystem(TrackingSystemServicePtr system);
80  virtual void unInstallTrackingSystem(TrackingSystemServicePtr system);
81  virtual std::vector<TrackingSystemServicePtr> getTrackingSystems();
82  virtual void resetTimeSynchronization();
83 
84 private:
85  typedef DummyToolMap::iterator DummyToolMapIter;
86  typedef DummyToolMap::const_iterator DummyToolMapConstIter;
87 
89 
90  DummyToolMap mDummyTools;
91  DummyToolPtr mActiveTool;
92  DummyToolPtr mReferenceTool;
93 
94  virtual void startTracking();
95  virtual void stopTracking();
96 
97  Transform3D m_rMpr;
98 // double mToolTipOffset; ///< Common tool tip offset for all tools
99 
100 // bool mConfigured;
101 // bool mInitialized;
102 // bool mIsTracking;
103  Tool::State mState;
104 };
105 
106 }//namespace cx
107 
108 #endif /* CXDUMMYTOOLMANAGER_H_ */
boost::shared_ptr< DummyToolManager > DummyToolManagerPtr
std::map< ToolPtr, TimedTransformMap > SessionToolHistoryMap
virtual ToolPtr getManualTool()
a mouse-controllable virtual tool that is available even when not tracking.
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
virtual SessionToolHistoryMap getSessionHistory(double startTime, double stopTime)
boost::shared_ptr< class PlaybackTime > PlaybackTimePtr
virtual ToolPtr getFirstProbe()
get the active probe or any if none active
boost::shared_ptr< class DummyTool > DummyToolPtr
boost::shared_ptr< class TrackerConfiguration > TrackerConfigurationPtr
std::map< QString, DummyToolPtr > DummyToolMap
virtual void runDummyTool(DummyToolPtr tool)
Service providing tools and tracking systems.
virtual bool isPlaybackMode() const
std::map< QString, ToolPtr > ToolMap
Implementation of a ToolManager used for testing.
virtual void setPlaybackMode(PlaybackTimePtr controller)
Namespace for all CustusX production code.
boost::shared_ptr< class Tool > ToolPtr
boost::shared_ptr< class TrackingSystemService > TrackingSystemServicePtr