NorMIT-nav  2023.01.05-dev+develop.0da12
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
cx::XmlOptionFile
Helper class for xml files used to store ssc/cx data.
Definition: cxXmlOptionItem.h:78
cxServiceTrackerListener.h
cxUsReconstructionService.h
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::UsReconstructionService
Definition: cxUsReconstructionService.h:50
cx::ReconstructionMethodService
Abstract interface for reconstruction algorithm.
Definition: cxReconstructionMethodService.h:54
cx::FileManagerServicePtr
boost::shared_ptr< class FileManagerService > FileManagerServicePtr
Definition: cxLogicManager.h:31
cxUSReconstructInputData.h
cx::PropertyPtr
boost::shared_ptr< class Property > PropertyPtr
Definition: cxLocalServerStreamerServer.h:25
cx::ReconstructCore::InputParams
Definition: cxReconstructCore.h:41
cx::PatientModelServicePtr
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
Definition: cxLogicManager.h:25
cx::ViewServicePtr
boost::shared_ptr< class ViewService > ViewServicePtr
Definition: cxLogicManager.h:28
cxReconstructionMethodService.h
cx::OutputVolumeParams
Helper struct for sending and controlling output volume properties.
Definition: cxReconstructedOutputVolumeParams.h:39
cx::USReconstructInputData
Definition: cxUSReconstructInputData.h:48
cx::ReconstructParamsPtr
boost::shared_ptr< class ReconstructParams > ReconstructParamsPtr
Definition: cxReconstructParams.h:85
cx::UsReconstructionImplService
Manager for the us reconstruction process.
Definition: cxUsReconstructionImplService.h:53
cx::settings
Settings * settings()
Shortcut for accessing the settings instance.
Definition: cxSettings.cpp:21