NorMIT-nav  18.04-rc6
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 
61 
62  MeshPtr mMesh;
63  SliceProxyPtr mSlicer;
64 
65 private slots:
66  void meshChangedSlot();
67  void transformChangedSlot();
68 };
69 
70 } // namespace cx
71 
72 #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.