Fraxinus  16.5.0-fx-rc7
An IGT application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cxAcquisitionImplService.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 CXACQUISITIONIMPLSERVICE_H
34 #define CXACQUISITIONIMPLSERVICE_H
35 
36 #include "cxAcquisitionService.h"
37 class ctkPluginContext;
38 class QDomElement;
39 
40 namespace cx
41 {
42 typedef boost::shared_ptr<class Acquisition> AcquisitionPtr;
43 typedef boost::shared_ptr<class AcquisitionData> AcquisitionDataPtr;
44 typedef boost::shared_ptr<class USAcquisition> USAcquisitionPtr;
45 typedef boost::shared_ptr<class UsReconstructionService> UsReconstructionServicePtr;
46 typedef boost::shared_ptr<class PatientModelService> PatientModelServicePtr;
47 typedef boost::shared_ptr<class SessionStorageService> SessionStorageServicePtr;
48 typedef boost::shared_ptr<class VisServices> VisServicesPtr;
49 
56 class org_custusx_acquisition_EXPORT AcquisitionImplService : public AcquisitionService
57 {
58  Q_INTERFACES(cx::AcquisitionService)
59 public:
60  AcquisitionImplService(ctkPluginContext *context);
61  virtual ~AcquisitionImplService();
62  virtual bool isNull();
63 
64  virtual RecordSessionPtr getLatestSession();
65  virtual std::vector<RecordSessionPtr> getSessions();
66 
67  virtual bool isReady(TYPES context) const;
68  virtual QString getInfoText(TYPES context) const;
69  virtual STATE getState() const;
70  virtual void startRecord(TYPES context, QString category, RecordSessionPtr session);
71  virtual void stopRecord();
72  virtual void cancelRecord();
73  virtual void startPostProcessing();
74  virtual void stopPostProcessing();
75 
76  virtual int getNumberOfSavingThreads() const;
77 
78 
79 private slots:
80  void duringClearPatientSlot();
81  void duringSavePatientSlot(QDomElement& node);
82  void duringLoadPatientSlot(QDomElement& node);
83 private:
84  ctkPluginContext* mContext;
85  AcquisitionDataPtr mAcquisitionData;
86  AcquisitionPtr mAcquisition;
87  UsReconstructionServicePtr mUsReconstructService;
88  USAcquisitionPtr mUsAcquisition;
89  VisServicesPtr mServices;
90 
91  void addXml(QDomNode& dataNode);
92  void parseXml(QDomNode& dataNode);
93 };
94 
95 typedef boost::shared_ptr<AcquisitionImplService> AcquisitionImplServicePtr;
96 
97 } //cx
98 
99 #endif // CXACQUISITIONIMPLSERVICE_H
Acqusition services abstract interface.
boost::shared_ptr< class UsReconstructionService > UsReconstructionServicePtr
Implementation for Acqusition service.
boost::shared_ptr< class VisServices > VisServicesPtr
Definition: cxMainWindow.h:62
boost::shared_ptr< class Acquisition > AcquisitionPtr
boost::shared_ptr< class USAcquisition > USAcquisitionPtr
boost::shared_ptr< class AcquisitionData > AcquisitionDataPtr
boost::shared_ptr< class RecordSession > RecordSessionPtr
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
boost::shared_ptr< AcquisitionImplService > AcquisitionImplServicePtr
boost::shared_ptr< class SessionStorageService > SessionStorageServicePtr