NorMIT-nav  22.09
An IGT application
cxReconstructThreads.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 #ifndef CXRECONSTRUCTTHREADS_H_
12 #define CXRECONSTRUCTTHREADS_H_
13 
14 #include "org_custusx_usreconstruction_Export.h"
15 
16 #include <QObject>
17 #include <QThread>
18 #include <math.h>
19 #include "cxForwardDeclarations.h"
21 
22 namespace cx
23 {
24 typedef boost::shared_ptr<class ReconstructPreprocessor> ReconstructPreprocessorPtr;
25 typedef boost::shared_ptr<class ReconstructCore> ReconstructCorePtr;
26 
34 typedef boost::shared_ptr<class ThreadedTimedReconstructer> ThreadedTimedReconstructerPtr;
35 typedef boost::shared_ptr<class ThreadedTimedReconstructPreprocessor> ThreadedTimedReconstructPreprocessorPtr;
36 typedef boost::shared_ptr<class ThreadedTimedReconstructCore> ThreadedTimedReconstructCorePtr;
37 
50 class org_custusx_usreconstruction_EXPORT ThreadedTimedReconstructPreprocessor: public cx::ThreadedTimedAlgorithm<void>
51 {
52 Q_OBJECT
53 public:
54  static ThreadedTimedReconstructPreprocessorPtr create(PatientModelServicePtr patientModelService, ReconstructPreprocessorPtr input, std::vector<ReconstructCorePtr> cores)
55  {
56  return ThreadedTimedReconstructPreprocessorPtr(new ThreadedTimedReconstructPreprocessor(patientModelService, input, cores));
57  }
58 
59  ThreadedTimedReconstructPreprocessor(PatientModelServicePtr patientModelService, ReconstructPreprocessorPtr input, std::vector<ReconstructCorePtr> cores);
61 
62 private slots:
63  virtual void preProcessingSlot();
64  virtual void postProcessingSlot();
65 
66 private:
67  virtual void calculate();
69  std::vector<ReconstructCorePtr> mCores;
70  PatientModelServicePtr mPatientModelService;
71 };
72 
85 //template class org_custusx_usreconstruction_EXPORT ThreadedTimedAlgorithm<void>;
86 class org_custusx_usreconstruction_EXPORT ThreadedTimedReconstructCore: public cx::ThreadedTimedAlgorithm<void>
87 {
88 Q_OBJECT
89 public:
90  static ThreadedTimedReconstructCorePtr create(PatientModelServicePtr patientModelService, ViewServicePtr viewService, ReconstructCorePtr reconstructer)
91  {
92  return ThreadedTimedReconstructCorePtr(new ThreadedTimedReconstructCore(patientModelService, viewService, reconstructer));
93  }
94  ThreadedTimedReconstructCore(PatientModelServicePtr patientModelService, ViewServicePtr viewService, ReconstructCorePtr reconstructer);
96 
97 private slots:
98  virtual void preProcessingSlot();
99  virtual void postProcessingSlot();
100 
101 private:
102  virtual void calculate();
103  ReconstructCorePtr mReconstructer;
104  PatientModelServicePtr mPatientModelService;
105  ViewServicePtr mViewService;
106 };
107 
108 
112 }
113 
114 #endif // CXRECONSTRUCTTHREADS_H_
cx::ThreadedTimedReconstructPreprocessor::create
static ThreadedTimedReconstructPreprocessorPtr create(PatientModelServicePtr patientModelService, ReconstructPreprocessorPtr input, std::vector< ReconstructCorePtr > cores)
Definition: cxReconstructThreads.h:54
cx::ReconstructPreprocessorPtr
boost::shared_ptr< class ReconstructPreprocessor > ReconstructPreprocessorPtr
Definition: cxReconstructPreprocessor.h:24
cx::ThreadedTimedReconstructCore
Threading adapter for the reconstruction algorithm.
Definition: cxReconstructThreads.h:86
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::ReconstructCorePtr
boost::shared_ptr< class ReconstructCore > ReconstructCorePtr
Definition: cxReconstructCore.h:23
cxForwardDeclarations.h
cx::ThreadedTimedReconstructerPtr
boost::shared_ptr< class ThreadedTimedReconstructer > ThreadedTimedReconstructerPtr
Definition: cxUSAcqusitionWidget.h:23
cx::ThreadedTimedReconstructCore::create
static ThreadedTimedReconstructCorePtr create(PatientModelServicePtr patientModelService, ViewServicePtr viewService, ReconstructCorePtr reconstructer)
Definition: cxReconstructThreads.h:90
cx::ThreadedTimedAlgorithm
Base class for algorithms that wants to thread and time their execution. T is the return type of the ...
Definition: cxThreadedTimedAlgorithm.h:37
cx::ThreadedTimedReconstructPreprocessorPtr
boost::shared_ptr< class ThreadedTimedReconstructPreprocessor > ThreadedTimedReconstructPreprocessorPtr
Definition: cxReconstructThreads.h:35
cx::PatientModelServicePtr
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
Definition: cxLogicManager.h:25
cx::ViewServicePtr
boost::shared_ptr< class ViewService > ViewServicePtr
Definition: cxLogicManager.h:28
cx::ThreadedTimedReconstructCorePtr
boost::shared_ptr< class ThreadedTimedReconstructCore > ThreadedTimedReconstructCorePtr
Definition: cxReconstructThreads.h:36
cxThreadedTimedAlgorithm.h
cx::ThreadedTimedReconstructPreprocessor
Threading adapter for the reconstruction algorithm.
Definition: cxReconstructThreads.h:50