NorMIT-nav  22.09
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_ */
cxAcquisitionService.h
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cxForwardDeclarations.h
cx::UsReconstructionServicePtr
boost::shared_ptr< class UsReconstructionService > UsReconstructionServicePtr
Definition: cxAcquisitionImplService.h:24
cx::VisServicesPtr
boost::shared_ptr< class VisServices > VisServicesPtr
Definition: cxMainWindow.h:40
cx::SavingVideoRecorderPtr
boost::shared_ptr< class SavingVideoRecorder > SavingVideoRecorderPtr
Definition: cxUSAcquisition.h:27
cx::AcquisitionService::TYPES
QFlags< TYPE > TYPES
Definition: cxAcquisitionService.h:48
cx::USSavingRecorderPtr
boost::shared_ptr< class USSavingRecorder > USSavingRecorderPtr
Definition: cxUSAcquisition.h:28
cx::ToolPtr
boost::shared_ptr< class Tool > ToolPtr
Definition: cxVideoConnectionWidget.h:43
cx::AcquisitionPtr
boost::shared_ptr< class Acquisition > AcquisitionPtr
Definition: cxAcquisitionImplService.h:21
cx::USAcquisition
Handles the us acquisition process.
Definition: cxUSAcquisition.h:57
cx::USAcquisitionPtr
boost::shared_ptr< class USAcquisition > USAcquisitionPtr
Definition: cxAcquisitionImplService.h:23
cx::UsReconstructionFileMakerPtr
boost::shared_ptr< class UsReconstructionFileMaker > UsReconstructionFileMakerPtr
Definition: cxUSAcquisition.h:26