NorMIT-nav  22.09
An IGT application
cxPatientModelImplService.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 CXPATIENTMODELIMPLSERVICE_H_
13 #define CXPATIENTMODELIMPLSERVICE_H_
14 
15 #include "org_custusx_core_patientmodel_Export.h"
16 class ctkPluginContext;
17 
18 #include "cxPatientModelService.h"
19 
20 namespace cx
21 {
22 typedef boost::shared_ptr<class DataManagerImpl> DataManagerImplPtr;
23 typedef boost::shared_ptr<class PatientData> PatientDataPtr;
24 typedef boost::shared_ptr<class DataManager> DataServicePtr;
25 typedef boost::shared_ptr<class DataFactory> DataFactoryPtr;
26 
35 class org_custusx_core_patientmodel_EXPORT PatientModelImplService : public PatientModelService
36 {
37  Q_INTERFACES(cx::PatientModelService)
38 public:
39  PatientModelImplService(ctkPluginContext* context);
40  virtual ~PatientModelImplService();
41 
42  virtual void insertData(DataPtr data, bool overWrite = false);
43  virtual DataPtr createData(QString type, QString uid, QString name);
44  virtual std::map<QString, DataPtr> getDatas(DataFilter filter) const;
45  virtual DataPtr getData(const QString& uid) const;
46  virtual std::map<QString, DataPtr> getChildren(QString parent_uid, QString of_type="") const;
47 
48  virtual LandmarksPtr getPatientLandmarks() const;
49  virtual std::map<QString, LandmarkProperty> getLandmarkProperties() const;
50  virtual void setLandmarkName(QString uid, QString name);
51  virtual void setLandmarkActive(QString uid, bool active);
52 
53  virtual Transform3D get_rMpr() const;
54  virtual RegistrationHistoryPtr get_rMpr_History() const;
55 
56  virtual ActiveDataPtr getActiveData() const;
57 
58  virtual CLINICAL_VIEW getClinicalApplication() const;
59  virtual void setClinicalApplication(CLINICAL_VIEW application);
60 
61  virtual std::map<QString, VideoSourcePtr> getStreams() const;
62 
63  virtual QString getActivePatientFolder() const;
64  virtual bool isPatientValid() const;
65  virtual DataPtr importData(QString fileName, QString &infoText);
66  virtual void exportPatient(PATIENT_COORDINATE_SYSTEM externalSpace);
67  virtual void removeData(QString uid);
68  virtual PresetTransferFunctions3DPtr getPresetTransferFunctions3D() const;
69 
70  virtual void setCenter(const Vector3D& center);
71  virtual Vector3D getCenter() const;
72  void setOperatingTable(const OperatingTable &ot);
73  OperatingTable getOperatingTable() const;
74 
75  virtual QString addLandmark();
76  virtual void deleteLandmarks();
77 
78  virtual void autoSave();
79  virtual bool isNull();
80 
81  virtual void makeAvailable(const QString& uid, bool available);
82 
83 private slots:
84  void probesChanged();
85  void videoSourceAdded(VideoSourcePtr source);
86 private:
87  ctkPluginContext *mContext;
88 
89  void createInterconnectedDataAndSpace();
90  void shutdownInterconnectedDataAndSpace();
91 
92  virtual DataServicePtr dataService() const;
93  PatientDataPtr patientData() const;
94 
95  ToolPtr getProbeTool(QString videoSourceUid);
96  void reEmitActiveTrackedStream(TrackedStreamPtr trackedStream);
97 
98  DataManagerImplPtr mDataService;
99  PatientDataPtr mPatientData;
100  DataFactoryPtr mDataFactory;
101 
102  TrackingServicePtr mTrackingService;
103  VideoServicePtr mVideoService;
104  FileManagerServicePtr mFileManagerService;
105 
106  std::map<QString, ToolPtr> mProbeTools;
107 
108  ActiveDataPtr mActiveData;
109 
110  std::vector<QString> mUnavailableData;
111 
112  void disconnectProbes();
113  void connectProbes();
114 };
115 typedef boost::shared_ptr<PatientModelImplService> PatientModelImplServicePtr;
116 
117 } /* namespace cx */
118 
119 #endif /* CXPATIENTMODELIMPLSERVICE_H_ */
120 
cx::PatientModelImplServicePtr
boost::shared_ptr< PatientModelImplService > PatientModelImplServicePtr
Definition: cxPatientModelImplService.h:115
cx::PatientModelImplService
Definition: cxPatientModelImplService.h:35
cx::VideoServicePtr
boost::shared_ptr< class VideoService > VideoServicePtr
Definition: cxLogicManager.h:26
cx::PatientDataPtr
boost::shared_ptr< PatientData > PatientDataPtr
Definition: cxPatientData.h:80
cx::PatientModelService::DataFilter
DataFilter
Definition: cxPatientModelService.h:91
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::DataManagerImplPtr
boost::shared_ptr< class DataManagerImpl > DataManagerImplPtr
Definition: cxDataManagerImpl.h:37
cx::PatientModelService
The virtual patient.
Definition: cxPatientModelService.h:85
cx::FileManagerServicePtr
boost::shared_ptr< class FileManagerService > FileManagerServicePtr
Definition: cxLogicManager.h:31
cx::VideoSourcePtr
boost::shared_ptr< class VideoSource > VideoSourcePtr
Definition: cxForwardDeclarations.h:109
cx::DataFactoryPtr
boost::shared_ptr< class DataFactory > DataFactoryPtr
Definition: cxDataManager.h:39
cx::Transform3D
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
Definition: cxLandmarkPatientRegistrationWidget.h:33
cx::TrackingServicePtr
boost::shared_ptr< class TrackingService > TrackingServicePtr
Definition: cxToolFilterWidget.h:27
cx::RegistrationHistoryPtr
boost::shared_ptr< class RegistrationHistory > RegistrationHistoryPtr
Definition: cxDataManager.h:37
cx::DataPtr
boost::shared_ptr< class Data > DataPtr
Definition: cxRegistrationApplicator.h:22
cx::PresetTransferFunctions3DPtr
boost::shared_ptr< class TransferFunctions3DPresets > PresetTransferFunctions3DPtr
Definition: cxDataManager.h:36
cxPatientModelService.h
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::OperatingTable
The OperatingTable class.
Definition: cxPatientModelService.h:54
cx::DataServicePtr
boost::shared_ptr< class DataManager > DataServicePtr
Definition: cxDataManagerImpl.h:36
cx::ActiveDataPtr
boost::shared_ptr< class ActiveData > ActiveDataPtr
Definition: cxColorWidget.h:21
cx::Vector3D
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42
cx::TrackedStreamPtr
boost::shared_ptr< class TrackedStream > TrackedStreamPtr
Definition: cxStreamPropertiesWidget.h:22