NorMIT-nav  2023.01.05-dev+develop.0da12
An IGT application
cxVideoSource.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 
12 
13 
14 /*
15  * Created on: Oct 31, 2010
16  * Author: christiana
17  */
18 
19 #ifndef CXVIDEOSOURCE_H_
20 #define CXVIDEOSOURCE_H_
21 
22 #include "cxResourceExport.h"
23 
24 #include "vtkSmartPointer.h"
25 #include <boost/shared_ptr.hpp>
26 #include <QObject>
27 #include <QDateTime>
28 #include "cxData.h"
29 
30 typedef vtkSmartPointer<class vtkImageData> vtkImageDataPtr;
31 
32 namespace cx
33 {
34 
43 class cxResource_EXPORT VideoSource : public QObject
44 {
45  Q_OBJECT
46 
47 public:
48  virtual ~VideoSource() {}
49 
50  virtual QString getUid() = 0;
51  virtual QString getName() = 0;
52  virtual vtkImageDataPtr getVtkImageData() = 0;
53  virtual double getTimestamp() = 0;
54  virtual TimeInfo getAdvancedTimeInfo() = 0;
55 
56  virtual QString getInfoString() const = 0;
57  virtual QString getStatusString() const = 0;
58 
59  virtual void start() = 0;
60  virtual void stop() = 0;
61 
62  virtual bool validData() const = 0;
63  virtual bool isConnected() const = 0;
64  virtual bool isStreaming() const = 0;
65 
69  virtual void setResolution(double mmPerPixel) {}
70 
71 signals:
72  void streaming(bool on);
73  void connected(bool on);
74  void newFrame();
75 };
76 typedef boost::shared_ptr<VideoSource> VideoSourcePtr;
77 
78 } // namespace cx
79 
80 #endif /* CXVIDEOSOURCE_H_ */
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::VideoSource
video source interface.
Definition: cxVideoSource.h:43
cx::VideoSource::setResolution
virtual void setResolution(double mmPerPixel)
Definition: cxVideoSource.h:69
vtkImageDataPtr
vtkSmartPointer< class vtkImageData > vtkImageDataPtr
Definition: cxVideoConnectionWidget.h:30
cx::VideoSourcePtr
boost::shared_ptr< class VideoSource > VideoSourcePtr
Definition: cxForwardDeclarations.h:109
cxData.h
cx::VideoSource::~VideoSource
virtual ~VideoSource()
Definition: cxVideoSource.h:48
cx::TimeInfo
Definition: cxData.h:43
vtkImageDataPtr
vtkSmartPointer< class vtkImageData > vtkImageDataPtr
Definition: cxVideoSource.h:30