CustusX  2023.01.05-dev+develop.0da12
An IGT application
cxProbeAdapterRTSource.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 #ifndef CXPROBEADAPTERRTSOURCE_H_
14 #define CXPROBEADAPTERRTSOURCE_H_
15 
16 #include "cxResourceExport.h"
17 
18 #include "cxForwardDeclarations.h"
19 #include "vtkForwardDeclarations.h"
20 #include "cxVideoSource.h"
21 #include "cxTool.h"
22 
23 class QString;
24 
25 namespace cx
26 {
27 
40 class cxResource_EXPORT ProbeAdapterRTSource: public VideoSource
41 {
42  Q_OBJECT
43 
44 public:
45  ProbeAdapterRTSource(QString uid, ProbePtr probe, VideoSourcePtr source);
46  virtual ~ProbeAdapterRTSource();
47 
48  virtual QString getUid();
49  virtual QString getName();
50  virtual vtkImageDataPtr getVtkImageData();
51  virtual double getTimestamp();
52  virtual TimeInfo getAdvancedTimeInfo();
53 
54  virtual QString getInfoString() const;
55  virtual QString getStatusString() const;
56 
57  virtual void start();
58  virtual void stop();
59  virtual bool validData() const;
60  virtual bool isConnected() const;
61  virtual bool isStreaming() const;
62  VideoSourcePtr getBaseSource();
63 
64 private slots:
65  void probeChangedSlot();
66  void newFrameSlot();
67 
68 private:
69  QString mUid;
70  VideoSourcePtr mBase;
71  ProbeWeakPtr mProbe;
72  vtkImageChangeInformationPtr mRedirecter;
73 };
74 
75 typedef boost::shared_ptr<ProbeAdapterRTSource> ProbeAdapterRTSourcePtr;
76 
77 } // cx
78 
79 #endif /* CXPROBEADAPTERRTSOURCE_H_ */
vtkSmartPointer< vtkImageChangeInformation > vtkImageChangeInformationPtr
Definition: cxImage.cpp:46
VideoSource that applies the parameters from a Probe to the VideoSource.
boost::shared_ptr< Probe > ProbePtr
Definition: cxProbe.h:72
boost::weak_ptr< Probe > ProbeWeakPtr
Definition: cxProbe.h:73
boost::shared_ptr< class VideoSource > VideoSourcePtr
video source interface.
Definition: cxVideoSource.h:43
boost::shared_ptr< ProbeAdapterRTSource > ProbeAdapterRTSourcePtr
vtkSmartPointer< class vtkImageData > vtkImageDataPtr
Namespace for all CustusX production code.