Fraxinus  22.04
An IGT application
cxUsReconstructionImplService.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 CXUSRECONSTRUCTIONIMPLSERVICE_H
13 #define CXUSRECONSTRUCTIONIMPLSERVICE_H
14 
15 #include "org_custusx_usreconstruction_Export.h"
17 
21 
22 class ctkPluginContext;
23 
24 namespace cx
25 {
26 
27 
53 class org_custusx_usreconstruction_EXPORT UsReconstructionImplService : public UsReconstructionService
54 {
55  Q_OBJECT
56  Q_INTERFACES(cx::UsReconstructionService)
57 
58 public:
59  UsReconstructionImplService(ctkPluginContext* pluginContext, PatientModelServicePtr patientModelService, ViewServicePtr viewService, FileManagerServicePtr filemanagerservice, XmlOptionFile settings);
60  virtual ~UsReconstructionImplService();
61  virtual bool isNull();
62 
63  virtual void selectData(QString filename, QString calFilesPath = "");
64  virtual void selectData(USReconstructInputData data);
65 
66  virtual QString getSelectedFilename() const;
67  virtual USReconstructInputData getSelectedFileData();
68  virtual PropertyPtr getParam(QString uid);
69 
70  virtual std::vector<PropertyPtr> getAlgoOptions();
71  virtual XmlOptionFile getSettings();
72  virtual OutputVolumeParams getOutputVolumeParams() const;
73 
74  virtual void setOutputVolumeParams(const OutputVolumeParams& par);
75 
82  virtual void startReconstruction();
83  virtual std::set<cx::TimedAlgorithmPtr> getThreadedReconstruction();
84 
89  virtual ReconstructionMethodService* createAlgorithm();
90 
91  virtual ReconstructCore::InputParams createCoreParameters();
92 
93 public slots:
94  virtual void newDataOnDisk(QString mhdFilename);
95 
96 private slots:
97  void setSettings();
98  void reconstructFinishedSlot();
99 
100  void patientChangedSlot();
101 
102 private:
103  void clearAll();
104 
108  void updateFromOriginalFileData();
109 
110  void onServiceAdded(ReconstructionMethodService* service);
111  void onServiceModified(ReconstructionMethodService* service);
112  void onServiceRemoved(ReconstructionMethodService* service);
113 
114  ReconstructParamsPtr mParams;
115  std::vector<PropertyPtr> mAlgoOptions;
116  USReconstructInputData mOriginalFileData;
117 
118  OutputVolumeParams mOutputVolumeParams;
119  XmlOptionFile mSettings;
120  QString mShaderPath;
121 
122  boost::shared_ptr<ServiceTrackerListener<ReconstructionMethodService> > mServiceListener;
123  std::vector<ReconstructionExecuterPtr> mExecuters;
124 
125  PatientModelServicePtr mPatientModelService;
126  ViewServicePtr mViewService;
127  FileManagerServicePtr mFileManagerService;
128 };
129 
133 }
134 
135 
136 
137 #endif // CXUSRECONSTRUCTIONIMPLSERVICE_H
boost::shared_ptr< class FileManagerService > FileManagerServicePtr
Abstract interface for reconstruction algorithm.
boost::shared_ptr< class ViewService > ViewServicePtr
Helper struct for sending and controlling output volume properties.
boost::shared_ptr< class ReconstructParams > ReconstructParamsPtr
boost::shared_ptr< class Property > PropertyPtr
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
Manager for the us reconstruction process.
Settings * settings()
Shortcut for accessing the settings instance.
Definition: cxSettings.cpp:21
Helper class for xml files used to store ssc/cx data.
Namespace for all CustusX production code.