Fraxinus  2023.01.05-dev+develop.0da12
An IGT application
cxCrossHairRep2D.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 /*
14  * vmCrossHairRep2D.h
15  *
16  * Created on: Jan 13, 2009
17  * Author: christiana
18  */
19 
20 #ifndef CXCROSSHAIRREP2D_H_
21 #define CXCROSSHAIRREP2D_H_
22 
23 #include "cxResourceVisualizationExport.h"
24 
25 //#include <vtkSmartPointer.h>
26 #include "cxRepImpl.h"
27 #include "cxTransform3D.h"
28 
29 namespace cx
30 {
31 typedef boost::shared_ptr<class SliceProxy> SliceProxyPtr;
32 typedef boost::shared_ptr<class CrossHair2D> CrossHair2DPtr;
33 
34 typedef boost::shared_ptr<class CrossHairRep2D> CrossHairRep2DPtr;
35 typedef boost::shared_ptr<class SpaceProvider> SpaceProviderPtr;
36 
44 class cxResourceVisualization_EXPORT CrossHairRep2D : public RepImpl
45 {
46  Q_OBJECT
47 public:
48  static CrossHairRep2DPtr New(SpaceProviderPtr spaceProvider, const QString& uid="");
49  virtual ~CrossHairRep2D();
50  virtual QString getType() const;
51 
52  void setSliceProxy(SliceProxyPtr slicer);
53  void set_vpMs(const Transform3D& vpMs);
54 
55 private slots:
56  void sliceTransformChangedSlot(Transform3D sMr);
57  void toolTransformAndTimestampSlot(Transform3D prMt, double timestamp);
58  void toolVisibleSlot(bool visible);
59 
60 protected:
61  CrossHairRep2D(SpaceProviderPtr spaceProvider);
62  virtual void addRepActorsToViewRenderer(ViewPtr view);
63  virtual void removeRepActorsFromViewRenderer(ViewPtr view);
64 
65 private:
66  void update();
67  CrossHair2DPtr mCursor;
68  SliceProxyPtr mSlicer;
69  Transform3D m_vpMs;
70  SpaceProviderPtr mSpaceProvider;
71 };
72 
73 
74 } // namespace vm
75 
76 #endif /* CXCROSSHAIRREP2D_H_ */
boost::shared_ptr< class SpaceProvider > SpaceProviderPtr
boost::shared_ptr< class CrossHair2D > CrossHair2DPtr
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
boost::shared_ptr< class SliceProxy > SliceProxyPtr
boost::shared_ptr< class CrossHairRep2D > CrossHairRep2DPtr
boost::shared_ptr< class View > ViewPtr
Display the Tool in 2D as a crosshair in the tool tip position.
Default implementation of Rep.
Definition: cxRepImpl.h:42
Namespace for all CustusX production code.