Fraxinus  16.5.0-fx-rc7
An IGT application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cxUsReconstructionService.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) 2008-2014, SINTEF Department of Medical Technology
5 All rights reserved.
6 
7 Redistribution and use in source and binary forms, with or without
8 modification, are permitted provided that the following conditions are met:
9 
10 1. Redistributions of source code must retain the above copyright notice,
11  this list of conditions and the following disclaimer.
12 
13 2. Redistributions in binary form must reproduce the above copyright notice,
14  this list of conditions and the following disclaimer in the documentation
15  and/or other materials provided with the distribution.
16 
17 3. Neither the name of the copyright holder nor the names of its contributors
18  may be used to endorse or promote products derived from this software
19  without specific prior written permission.
20 
21 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 =========================================================================*/
32 
33 #ifndef CXUSRECONSTRUCTIONSERVICE_H
34 #define CXUSRECONSTRUCTIONSERVICE_H
35 
36 #include "org_custusx_usreconstruction_Export.h"
37 
38 #include <boost/shared_ptr.hpp>
39 #include <set>
40 #include <vector>
41 #include <QObject>
42 #include "cxForwardDeclarations.h"
43 #include "cxReconstructCore.h"
44 
45 #define UsReconstructionService_iid "cx::UsReconstructionService"
46 
47 namespace cx
48 {
49 struct USReconstructInputData;
50 class XmlOptionFile;
51 class OutputVolumeParams;
52 class ReconstructionMethodService;
53 
54 typedef boost::shared_ptr<class TimedBaseAlgorithm> TimedAlgorithmPtr;
55 typedef boost::shared_ptr<class CompositeTimedAlgorithm> CompositeTimedAlgorithmPtr;
56 typedef boost::shared_ptr<class ReconstructionManager> ReconstructionManagerPtr;
57 typedef boost::shared_ptr<class ReconstructCore> ReconstructCorePtr;
58 typedef boost::shared_ptr<class ReconstructParams> ReconstructParamsPtr;
59 typedef boost::shared_ptr<class ReconstructPreprocessor> ReconstructPreprocessorPtr;
60 typedef boost::shared_ptr<class ThreadedTimedReconstructer> ThreadedTimedReconstructerPtr;
61 typedef boost::shared_ptr<class ThreadedTimedReconstructPreprocessor> ThreadedTimedReconstructPreprocessorPtr;
62 typedef boost::shared_ptr<class ThreadedTimedReconstructCore> ThreadedTimedReconstructCorePtr;
63 
64 typedef boost::shared_ptr<class ReconstructionExecuter> ReconstructionExecuterPtr;
65 
66 typedef boost::shared_ptr<class UsReconstructionService> UsReconstructionServicePtr;
67 
71 class org_custusx_usreconstruction_EXPORT UsReconstructionService : public QObject
72 {
73  Q_OBJECT
74 public:
75 
76  virtual void selectData(QString filename, QString calFilesPath = "") = 0;
77  virtual void selectData(USReconstructInputData data) = 0;
78 
79  virtual QString getSelectedFilename() const = 0;
80  virtual USReconstructInputData getSelectedFileData() = 0;
81 // virtual ReconstructParamsPtr getParams() = 0; ///< Return control parameters that can be adjusted by the GUI or similar prior to reconstruction
82  virtual PropertyPtr getParam(QString uid) = 0;
83  virtual std::vector<PropertyPtr> getAlgoOptions() = 0;
84  virtual XmlOptionFile getSettings() = 0;
85  virtual OutputVolumeParams getOutputVolumeParams() const = 0;
86 
87  virtual void setOutputVolumeParams(const OutputVolumeParams& par) = 0;
88 // virtual void setOutputRelativePath(QString path) = 0; ///< Set location of output relative to base
89 // virtual void setOutputBasePath(QString path) = 0; ///< Set base location of output
90 
97  virtual void startReconstruction() = 0;
98  virtual std::set<cx::TimedAlgorithmPtr> getThreadedReconstruction() = 0;
99 
104  virtual ReconstructionMethodService* createAlgorithm() = 0;
105 
106  virtual ReconstructCore::InputParams createCoreParameters() = 0;
107 
108  virtual bool isNull() = 0;
109  static UsReconstructionServicePtr getNullObject();
110 
111 public slots:
112  virtual void newDataOnDisk(QString mhdFilename) = 0;
113 
114 signals:
115  void paramsChanged();
116  void algorithmChanged();
117  void inputDataSelected(QString mhdFileName);
118  void reconstructAboutToStart();
119  void reconstructStarted();
120  void reconstructFinished();
121 
122  void newInputDataAvailable(QString mhdFileName);
123  void newInputDataPath(QString path);
124 };
125 
126 } //cx
128 
129 #endif // CXUSRECONSTRUCTIONSERVICE_H
boost::shared_ptr< class CompositeTimedAlgorithm > CompositeTimedAlgorithmPtr
boost::shared_ptr< class UsReconstructionService > UsReconstructionServicePtr
boost::shared_ptr< class ReconstructionExecuter > ReconstructionExecuterPtr
Abstract interface for reconstruction algorithm.
boost::shared_ptr< class ThreadedTimedReconstructCore > ThreadedTimedReconstructCorePtr
boost::shared_ptr< class ThreadedTimedReconstructPreprocessor > ThreadedTimedReconstructPreprocessorPtr
Helper struct for sending and controlling output volume properties.
boost::shared_ptr< class ThreadedTimedReconstructer > ThreadedTimedReconstructerPtr
#define UsReconstructionService_iid
boost::shared_ptr< class TimedBaseAlgorithm > TimedAlgorithmPtr
boost::shared_ptr< class ReconstructParams > ReconstructParamsPtr
boost::shared_ptr< class Property > PropertyPtr
boost::shared_ptr< class ReconstructPreprocessor > ReconstructPreprocessorPtr
boost::shared_ptr< class ReconstructionManager > ReconstructionManagerPtr
Helper class for xml files used to store ssc/cx data.
boost::shared_ptr< class ReconstructCore > ReconstructCorePtr