Fraxinus  18.10
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 
52  virtual Transform3D get_rMpr() const;
53  virtual void set_rMpr(const Transform3D& val);
54  virtual ToolPtr getReferenceTool() const;
55 
56  virtual ToolPtr getManualTool() { return ToolPtr(); }
57 // virtual void savePositionHistory() {}
58 // virtual void loadPositionHistory() {}
59 // virtual void addXml(QDomNode& parentNode) {}
60 // virtual void parseXml(QDomNode& dataNode) {}
61 // virtual void clear() {}
62  virtual SessionToolHistoryMap getSessionHistory(double startTime, double stopTime) { return SessionToolHistoryMap(); }
63 
64  virtual bool isPlaybackMode() const { return false; }
65  virtual void setPlaybackMode(PlaybackTimePtr controller) {}
66 // virtual void setLoggingFolder(QString loggingFolder) {}
67  virtual void runDummyTool(DummyToolPtr tool) {}
68  virtual bool isNull() { return false; }
69 
70  void addTool(DummyToolPtr tool);
71  virtual ToolPtr getFirstProbe() { return ToolPtr(); }
73 
74  virtual void installTrackingSystem(TrackingSystemServicePtr system);
75  virtual void unInstallTrackingSystem(TrackingSystemServicePtr system);
76  virtual std::vector<TrackingSystemServicePtr> getTrackingSystems();
77 
78 private:
79  typedef DummyToolMap::iterator DummyToolMapIter;
80  typedef DummyToolMap::const_iterator DummyToolMapConstIter;
81 
83 
84  DummyToolMap mDummyTools;
85  DummyToolPtr mActiveTool;
86  DummyToolPtr mReferenceTool;
87 
88  virtual void startTracking();
89  virtual void stopTracking();
90 
91  Transform3D m_rMpr;
92 // double mToolTipOffset; ///< Common tool tip offset for all tools
93 
94 // bool mConfigured;
95 // bool mInitialized;
96 // bool mIsTracking;
97  Tool::State mState;
98 };
99 
100 }//namespace cx
101 
102 #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)
virtual TrackerConfigurationPtr getConfiguration()
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