Fraxinus  22.04-rc5
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, FileManagerServicePtr filemanager) { return true;}
48  virtual void save(const QString& basePath, FileManagerServicePtr filemanager) {}
49 
50  virtual QString getType() const;
51  static QString getTypeName();
52 
53  ImagePtr getChangingImage();
54  void deleteImageToStopEmittingFrames();
55  bool is3D();
56  bool is2D();
57  bool hasVideo() const;
58  bool isStreaming() const;
59 signals:
60  void streamChanged(QString uid);
61  void newTool(ToolPtr tool);
62  void newVideoSource(VideoSourcePtr videoSource);
63  void newFrame();
64  void streaming(bool on);
65  void newPosition();
66 
67 private slots:
68  void newFrameSlot();
69  void toolTransformAndTimestamp(Transform3D prMt, double timestamp);
70 private:
71  ToolPtr mProbeTool;
72  VideoSourcePtr mVideoSource;
73  ImagePtr mImage;
74 
75  SpaceProviderPtr mSpaceProvider;
76  Transform3D get_tMu();
77 };
78 
79 typedef boost::shared_ptr<TrackedStream> TrackedStreamPtr;
80 
81 } //cx
82 
83 #endif // CXTRACKEDSTREAM_H
boost::shared_ptr< class SpaceProvider > SpaceProviderPtr
boost::shared_ptr< class FileManagerService > FileManagerServicePtr
boost::shared_ptr< class TrackedStream > TrackedStreamPtr
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
boost::shared_ptr< class Image > ImagePtr
Definition: cxDicomWidget.h:27
A data set for video streams (2D/3D).
virtual bool load(QString path, FileManagerServicePtr filemanager)
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:89
virtual void save(const QString &basePath, FileManagerServicePtr filemanager)
Not used.
Namespace for all CustusX production code.
boost::shared_ptr< class Tool > ToolPtr