Fraxinus  2023.01.05-dev+develop.0da12
An IGT application
cxGeometricRep2D.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 CXGEOMETRICREP2D_H_
14 #define CXGEOMETRICREP2D_H_
15 
16 #include "cxResourceVisualizationExport.h"
17 
18 #include "vtkForwardDeclarations.h"
19 #include "cxRepImpl.h"
20 #include "cxVector3D.h"
21 
22 namespace cx
23 {
24 typedef boost::shared_ptr<class Mesh> MeshPtr;
25 typedef boost::shared_ptr<class SliceProxy> SliceProxyPtr;
26 
27 typedef boost::shared_ptr<class GeometricRep2D> GeometricRep2DPtr;
28 
39 class cxResourceVisualization_EXPORT GeometricRep2D : public RepImpl
40 {
41  Q_OBJECT
42 public:
43  virtual ~GeometricRep2D();
44 
45  static GeometricRep2DPtr New(const QString& uid="");
46 
47  virtual QString getType() const { return "GeometricRep2D"; }
48  void setMesh(MeshPtr mesh);
49  MeshPtr getMesh();
50  bool hasMesh(MeshPtr mesh) const;
51  void setSliceProxy(SliceProxyPtr slicer);
52 
53 protected:
55  virtual void addRepActorsToViewRenderer(ViewPtr view);
56  virtual void removeRepActorsFromViewRenderer(ViewPtr view);
57  void setOpacity();
58 
62 
63  MeshPtr mMesh;
64  SliceProxyPtr mSlicer;
65 
66 private slots:
67  void meshChangedSlot();
68  void transformChangedSlot();
69 };
70 
71 } // namespace cx
72 
73 #endif /*CXGEOMETRICREP2D_H_*/
vtkSmartPointer< class vtkActor > vtkActorPtr
vtkSmartPointer< class vtkPolyDataMapper > vtkPolyDataMapperPtr
vtkSmartPointer< class vtkProperty > vtkPropertyPtr
boost::shared_ptr< class SliceProxy > SliceProxyPtr
vtkPolyDataMapperPtr mMapper
boost::shared_ptr< class View > ViewPtr
Display one Mesh in 2D.
Default implementation of Rep.
Definition: cxRepImpl.h:42
virtual QString getType() const
gives this reps type
vtkPropertyPtr mProperty
boost::shared_ptr< class Mesh > MeshPtr
SliceProxyPtr mSlicer
boost::shared_ptr< class GeometricRep2D > GeometricRep2DPtr
Namespace for all CustusX production code.