NorMIT-nav  2023.01.05-dev+develop.0da12
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_ */
cxRepImpl.h
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cxForwardDeclarations.h
cx::VideoFixedPlaneRepPtr
boost::shared_ptr< class VideoFixedPlaneRep > VideoFixedPlaneRepPtr
Definition: cxForwardDeclarations.h:108
cx::ViewportListenerPtr
boost::shared_ptr< class ViewportListener > ViewportListenerPtr
Definition: cxForwardDeclarations.h:172
cx::VideoSourcePtr
boost::shared_ptr< class VideoSource > VideoSourcePtr
Definition: cxForwardDeclarations.h:109
cx::TextDisplayPtr
boost::shared_ptr< class TextDisplay > TextDisplayPtr
Definition: cxForwardDeclarations.h:102
cx::VideoFixedPlaneRep::getType
virtual QString getType() const
Definition: cxVideoRep.h:51
cx::VideoSourceGraphicsPtr
boost::shared_ptr< class VideoSourceGraphics > VideoSourceGraphicsPtr
Definition: cxVideoGraphics.h:28
cx::ViewPtr
boost::shared_ptr< class View > ViewPtr
Definition: cxForwardDeclarations.h:110
cx::RepImpl
Default implementation of Rep.
Definition: cxRepImpl.h:42
cx::ProbeSector
Utility functions for drawing an US Probe sector.
Definition: cxProbeSector.h:38
cx::ToolPtr
boost::shared_ptr< class Tool > ToolPtr
Definition: cxVideoConnectionWidget.h:43
cxProbeSector.h
cxVtkHelperClasses.h
cx::GraphicalPolyData3DPtr
boost::shared_ptr< GraphicalPolyData3D > GraphicalPolyData3DPtr
Definition: cxGraphicalPrimitives.h:97
cx::VideoFixedPlaneRep
Display a VideoSource in a View.
Definition: cxVideoRep.h:45
vtkRendererPtr
vtkSmartPointer< class vtkRenderer > vtkRendererPtr
Definition: vtkForwardDeclarations.h:122