NorMIT-nav  2023.01.05-dev+develop.0da12
An IGT application
cxGeometricRep.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 CXGEOMETRICREP_H_
14 #define CXGEOMETRICREP_H_
15 
16 
17 #include "vtkForwardDeclarations.h"
18 #include "cxRepImpl.h"
19 #include "cxVector3D.h"
20 #include "cxGraphicalPrimitives.h"
21 
22 
23 namespace cx
24 {
25 typedef boost::shared_ptr<class Mesh> MeshPtr;
26 typedef boost::shared_ptr<class GeometricRep> GeometricRepPtr;
27 typedef boost::shared_ptr<class GraphicalGeometric> GraphicalGeometricPtr;
28 
38 class cxResourceVisualization_EXPORT GraphicalGeometric : public QObject
39 {
40  Q_OBJECT
41 public:
43  virtual ~GraphicalGeometric();
44 
45  void setMesh(MeshPtr mesh);
46  MeshPtr getMesh();
47  void setRenderer(vtkRendererPtr renderer);
48 
53  void setTransformOffset(Transform3D rMrr);
54 
55 protected:
60  void clearClipping();
61 private:
62  void meshChangedSlot();
63  void transformChangedSlot();
64  void clipPlanesChangedSlot();
65 };
66 
67 
68 
78 class cxResourceVisualization_EXPORT GeometricRep : public RepImpl
79 {
80  Q_OBJECT
81 public:
82  virtual ~GeometricRep();
83  static GeometricRepPtr New(const QString& uid="");
84 
85  virtual QString getType() const { return "GeometricRep"; }
86  void setMesh(MeshPtr mesh);
87  MeshPtr getMesh();
88  bool hasMesh(MeshPtr mesh) const;
89 
90 protected:
91  GeometricRep();
92  virtual void addRepActorsToViewRenderer(ViewPtr view);
93  virtual void removeRepActorsFromViewRenderer(ViewPtr view);
94 
95 private:
96  GraphicalGeometricPtr mGraphics;
97 };
98 
99 
100 
101 
102 
103 
104 } // namespace cx
105 
106 #endif /*CXGEOMETRICREP_H_*/
cx::GraphicalGeometric
Display one Mesh in 3D.
Definition: cxGeometricRep.h:38
cxRepImpl.h
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::GraphicalGeometric::mMesh
MeshPtr mMesh
Definition: cxGeometricRep.h:58
cx::GraphicalGeometric::mGraphicalGlyph3DDataPtr
GraphicalGlyph3DDataPtr mGraphicalGlyph3DDataPtr
Definition: cxGeometricRep.h:57
cx::GraphicalGlyph3DDataPtr
boost::shared_ptr< GraphicalGlyph3DData > GraphicalGlyph3DDataPtr
Definition: cxGraphicalPrimitives.h:117
cxGraphicalPrimitives.h
cx::GraphicalGeometric::mGraphicalPolyDataPtr
GraphicalPolyData3DPtr mGraphicalPolyDataPtr
Definition: cxGeometricRep.h:56
cx::GeometricRep
Display one Mesh in 3D.
Definition: cxGeometricRep.h:78
cxVector3D.h
cx::MeshPtr
boost::shared_ptr< class Mesh > MeshPtr
Definition: cxForwardDeclarations.h:48
cx::Transform3D
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
Definition: cxLandmarkPatientRegistrationWidget.h:33
vtkForwardDeclarations.h
cx::ViewPtr
boost::shared_ptr< class View > ViewPtr
Definition: cxForwardDeclarations.h:110
cx::RepImpl
Default implementation of Rep.
Definition: cxRepImpl.h:42
cx::GraphicalPolyData3DPtr
boost::shared_ptr< GraphicalPolyData3D > GraphicalPolyData3DPtr
Definition: cxGraphicalPrimitives.h:97
cx::GraphicalGeometricPtr
boost::shared_ptr< class GraphicalGeometric > GraphicalGeometricPtr
Definition: cxCustomMetricRep.h:28
vtkRendererPtr
vtkSmartPointer< class vtkRenderer > vtkRendererPtr
Definition: vtkForwardDeclarations.h:122
cx::GeometricRepPtr
boost::shared_ptr< class GeometricRep > GeometricRepPtr
Definition: cxICPRegistrationBaseWidget.h:29
cx::GraphicalGeometric::m_rMrr
Transform3D m_rMrr
Definition: cxGeometricRep.h:59