CustusX  18.04
An IGT application
cxVideoRep.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 CXVIDEOREP_H_
14 #define CXVIDEOREP_H_
15 
16 #include "cxResourceVisualizationExport.h"
17 
18 #include "cxRepImpl.h"
19 #include "cxVtkHelperClasses.h"
20 #include "cxForwardDeclarations.h"
21 #include "cxProbeSector.h"
22 
23 namespace cx
24 {
25 typedef boost::shared_ptr<class ViewportListener> ViewportListenerPtr;
26 typedef boost::shared_ptr<class VideoSourceGraphics> VideoSourceGraphicsPtr;
27 
28 typedef boost::shared_ptr<class VideoFixedPlaneRep> VideoFixedPlaneRepPtr;
29 
30 
45 class cxResourceVisualization_EXPORT VideoFixedPlaneRep : public RepImpl
46 {
47  Q_OBJECT
48 public:
49  VideoFixedPlaneRep(const QString& uid, const QString& name="");
50  virtual ~VideoFixedPlaneRep();
51  virtual QString getType() const { return "RealTimeStreamFixedPlaneRep"; }
52  void setRealtimeStream(VideoSourcePtr data);
53  void setTool(ToolPtr tool);
54 
55  void setShowSector(bool on);
56  bool getShowSector() const;
57 
58 protected:
59  virtual void addRepActorsToViewRenderer(ViewPtr view);
60  virtual void removeRepActorsFromViewRenderer(ViewPtr view);
61  private slots:
62  void newDataSlot();
63 
64 private:
65  void setCamera();
66  void updateSector();
67 
68  VideoSourceGraphicsPtr mRTGraphics;
69  bool mShowSector;
70 
71  ToolPtr mTool;
72  ProbeSector mProbeDefinition;
73  VideoSourcePtr mData;
74 
75  TextDisplayPtr mStatusText;
76  TextDisplayPtr mInfoText;
77  TextDisplayPtr mOrientationVText;
78 
79  GraphicalPolyData3DPtr mProbeSector;
80  GraphicalPolyData3DPtr mProbeOrigin;
81  GraphicalPolyData3DPtr mProbeClipRect;
82 
83  vtkRendererPtr mRenderer;
84  ViewportListenerPtr mViewportListener;
85 };
86 
87 
88 } // namespace cx
89 
90 #endif /* CXVIDEOREP_H_ */
boost::shared_ptr< class ViewportListener > ViewportListenerPtr
boost::shared_ptr< class View > ViewPtr
vtkSmartPointer< class vtkRenderer > vtkRendererPtr
boost::shared_ptr< class VideoSource > VideoSourcePtr
boost::shared_ptr< class TextDisplay > TextDisplayPtr
boost::shared_ptr< class VideoSourceGraphics > VideoSourceGraphicsPtr
Display a VideoSource in a View.
Definition: cxVideoRep.h:45
Default implementation of Rep.
Definition: cxRepImpl.h:42
boost::shared_ptr< class VideoFixedPlaneRep > VideoFixedPlaneRepPtr
virtual QString getType() const
Definition: cxVideoRep.h:51
boost::shared_ptr< GraphicalPolyData3D > GraphicalPolyData3DPtr
Utility functions for drawing an US Probe sector.
Definition: cxProbeSector.h:38
Namespace for all CustusX production code.
boost::shared_ptr< class Tool > ToolPtr