CustusX  2020.11.07-dev+develop.4ce4a
An IGT application
cxUSAcquisition.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 CXUSACQUISITION_H_
12 #define CXUSACQUISITION_H_
13 
14 #include "org_custusx_acquisition_Export.h"
15 
16 #include <vector>
17 #include "cxForwardDeclarations.h"
18 #include "cxAcquisitionService.h"
19 
20 namespace cx
21 {
22 struct USReconstructInputData;
23 }
24 namespace cx
25 {
26 typedef boost::shared_ptr<class UsReconstructionFileMaker> UsReconstructionFileMakerPtr;
27 typedef boost::shared_ptr<class SavingVideoRecorder> SavingVideoRecorderPtr;
28 typedef boost::shared_ptr<class USSavingRecorder> USSavingRecorderPtr;
29 typedef boost::shared_ptr<class Acquisition> AcquisitionPtr;
30 typedef boost::shared_ptr<class UsReconstructionService> UsReconstructionServicePtr;
31 typedef boost::shared_ptr<class VisServices> VisServicesPtr;
32 typedef boost::shared_ptr<class UsReconstructionService> UsReconstructionServicePtr;
33 typedef boost::shared_ptr<class VisServices> VisServicesPtr;
34 
35 
57 class org_custusx_acquisition_EXPORT USAcquisition : public QObject
58 {
59  Q_OBJECT
60 public:
61  USAcquisition(AcquisitionPtr base, QObject* parent = 0);
62  virtual ~USAcquisition();
63  int getNumberOfSavingThreads() const;
64  bool isReady(AcquisitionService::TYPES context) const;
65  QString getInfoText(AcquisitionService::TYPES context) const;
66 
67 signals:
68  void acquisitionDataReady();
69  void saveDataCompleted(QString mhdFilename);
70 
74  void readinessChanged();
75 
76 private slots:
77  void checkIfReadySlot();
78  void recordStarted();
79  void recordStopped();
80  void recordCancelled();
81 
82 private:
83  std::vector<VideoSourcePtr> getRecordingVideoSources(ToolPtr tool);
84  bool getWriteColor();
85  void sendAcquisitionDataToReconstructer();
86  void setReady(bool val, QString text);
87 
88  VisServicesPtr getServices();
89  UsReconstructionServicePtr getReconstructer();
90 
91  AcquisitionPtr mBase;
92  USSavingRecorderPtr mCore;
93  bool mReady;
94  QString mInfoText;
95 };
96 typedef boost::shared_ptr<USAcquisition> USAcquisitionPtr;
97 
101 }
102 
103 #endif /* CXUSACQUISITION_H_ */
boost::shared_ptr< class UsReconstructionService > UsReconstructionServicePtr
boost::shared_ptr< class VisServices > VisServicesPtr
Definition: cxMainWindow.h:40
boost::shared_ptr< class USSavingRecorder > USSavingRecorderPtr
boost::shared_ptr< class SavingVideoRecorder > SavingVideoRecorderPtr
boost::shared_ptr< class Acquisition > AcquisitionPtr
boost::shared_ptr< class USAcquisition > USAcquisitionPtr
boost::shared_ptr< class UsReconstructionFileMaker > UsReconstructionFileMakerPtr
Handles the us acquisition process.The USAcquisition object attaches itself to an input Acquisition o...
Namespace for all CustusX production code.
boost::shared_ptr< class Tool > ToolPtr