NorMIT-nav  22.09
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_ */
cx::DummyToolManager::getManualTool
virtual ToolPtr getManualTool()
a mouse-controllable virtual tool that is available even when not tracking.
Definition: cxDummyToolManager.h:57
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
cxDummyTool.h
cx::DummyToolManager
Implementation of a ToolManager used for testing.
Definition: cxDummyToolManager.h:31
cx::PlaybackTimePtr
boost::shared_ptr< class PlaybackTime > PlaybackTimePtr
Definition: cxTrackingSystemBronchoscopyService.h:42
cx::SessionToolHistoryMap
std::map< ToolPtr, TimedTransformMap > SessionToolHistoryMap
Definition: cxTrackingService.h:31
cx::DummyToolManager::isNull
virtual bool isNull()
Definition: cxDummyToolManager.h:69
cx::Transform3D
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
Definition: cxLandmarkPatientRegistrationWidget.h:33
cx::DummyToolManager::DummyToolManagerPtr
boost::shared_ptr< DummyToolManager > DummyToolManagerPtr
Definition: cxDummyToolManager.h:36
cx::TrackingSystemServicePtr
boost::shared_ptr< class TrackingSystemService > TrackingSystemServicePtr
Definition: cxTrackingImplService.h:36
cx::Tool::State
State
Definition: cxTool.h:72
cx::DummyToolManager::setPlaybackMode
virtual void setPlaybackMode(PlaybackTimePtr controller)
Definition: cxDummyToolManager.h:66
cx::ToolPtr
boost::shared_ptr< class Tool > ToolPtr
Definition: cxVideoConnectionWidget.h:43
cx::DummyToolManager::getFirstProbe
virtual ToolPtr getFirstProbe()
get the active probe or any if none active
Definition: cxDummyToolManager.h:72
cx::DummyToolManager::isPlaybackMode
virtual bool isPlaybackMode() const
Definition: cxDummyToolManager.h:65
cx::TrackingService
Service providing tools and tracking systems.
Definition: cxTrackingService.h:49
cx::DummyToolManager::runDummyTool
virtual void runDummyTool(DummyToolPtr tool)
Definition: cxDummyToolManager.h:68
cx::DummyToolManager::getSessionHistory
virtual SessionToolHistoryMap getSessionHistory(double startTime, double stopTime)
Definition: cxDummyToolManager.h:63
cx::DummyToolPtr
boost::shared_ptr< class DummyTool > DummyToolPtr
Definition: cxForwardDeclarations.h:44
cxTrackingService.h
cx::TrackingService::ToolMap
std::map< QString, ToolPtr > ToolMap
Definition: cxTrackingService.h:54
cx::DummyToolManager::DummyToolMap
std::map< QString, DummyToolPtr > DummyToolMap
Definition: cxDummyToolManager.h:41