CustusX  18.04-rc6
An IGT application
cxTrackedStream.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 #ifndef CXTRACKEDSTREAM_H
13 #define CXTRACKEDSTREAM_H
14 
15 #include "cxImage.h"
16 
17 namespace cx
18 {
19 
29 class cxResource_EXPORT TrackedStream : public Data
30 {
31  Q_OBJECT
32 public:
33  static TrackedStreamPtr create(const QString& uid, const QString& name = "");
34  TrackedStream(const QString &uid, const QString &name, const ToolPtr &probe, const VideoSourcePtr &videoSource);
35  ~TrackedStream();
36 
37  void setProbeTool(const ToolPtr &probeTool);
38  ToolPtr getProbeTool();
39  void setVideoSource(const VideoSourcePtr &videoSource);
40  VideoSourcePtr getVideoSource();
41  void setSpaceProvider(SpaceProviderPtr spaceProvider);
42 
43  virtual void addXml(QDomNode& dataNode);
44  virtual void parseXml(QDomNode& dataNode);
45 
46  virtual DoubleBoundingBox3D boundingBox() const;
47  virtual bool load(QString path) { return true;}
48  virtual void save(const QString& basePath) {}
49 
50  virtual QString getType() const;
51  static QString getTypeName();
52 
53  ImagePtr getChangingImage();
54  bool is3D();
55  bool is2D();
56  bool hasVideo() const;
57  bool isStreaming() const;
58 signals:
59  void streamChanged(QString uid);
60  void newTool(ToolPtr tool);
61  void newVideoSource(VideoSourcePtr videoSource);
62  void newFrame();
63  void streaming(bool on);
64  void newPosition();
65 
66 private slots:
67  void newFrameSlot();
68  void toolTransformAndTimestamp(Transform3D prMt, double timestamp);
69 private:
70  ToolPtr mProbeTool;
71  VideoSourcePtr mVideoSource;
72  ImagePtr mImage;
73 
74  SpaceProviderPtr mSpaceProvider;
75  Transform3D get_tMu();
76 };
77 
78 typedef boost::shared_ptr<TrackedStream> TrackedStreamPtr;
79 
80 } //cx
81 
82 #endif // CXTRACKEDSTREAM_H
boost::shared_ptr< class SpaceProvider > SpaceProviderPtr
boost::shared_ptr< class TrackedStream > TrackedStreamPtr
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
virtual void save(const QString &basePath)
Not used.
boost::shared_ptr< class Image > ImagePtr
Definition: cxDicomWidget.h:27
A data set for video streams (2D/3D).
virtual bool load(QString path)
Not used.
boost::shared_ptr< class VideoSource > VideoSourcePtr
Representation of a floating-point bounding box in 3D. The data are stored as {xmin,xmax,ymin,ymax,zmin,zmax}, in order to simplify communication with vtk.
Superclass for all data objects.
Definition: cxData.h:88
Namespace for all CustusX production code.
boost::shared_ptr< class Tool > ToolPtr