CustusX  22.04-rc5
An IGT application
cxViewFollower.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 #ifndef CXVIEWFOLLOWER_H
12 #define CXVIEWFOLLOWER_H
13 
14 #include "cxResourceVisualizationExport.h"
15 
16 #include "boost/scoped_ptr.hpp"
17 #include <QObject>
18 #include "vtkForwardDeclarations.h"
19 #include "cxForwardDeclarations.h"
20 #include "cxBoundingBox3D.h"
22 
23 namespace cx
24 {
25 
26 class SliceAutoViewportCalculator;
27 typedef boost::shared_ptr<class RegionOfInterestMetric> RegionOfInterestMetricPtr;
28 typedef boost::shared_ptr<class ViewFollower> ViewFollowerPtr;
29 
30 
31 
39 class cxResourceVisualization_EXPORT ViewFollower : public QObject
40 {
41  Q_OBJECT
42 public:
43  static ViewFollowerPtr create(PatientModelServicePtr dataManager);
44  void setSliceProxy(SliceProxyPtr sliceProxy);
45  void setView(DoubleBoundingBox3D bb_s);
46  void setAutoZoomROI(QString uid);
47 
49  Vector3D findCenter_r_fromShift_s(Vector3D shift_s);
50 
51  ~ViewFollower();
52 
53 signals:
54  void newZoom(double);
55 
56 private:
57  explicit ViewFollower(PatientModelServicePtr dataManager);
58 
59  SliceProxyPtr mSliceProxy;
60  DoubleBoundingBox3D mBB_s;
61  PatientModelServicePtr mDataManager;
62  QString mRoi;
63 
64  boost::scoped_ptr<SliceAutoViewportCalculator> mCalculator;
65 
66  Vector3D findVirtualTooltip_s();
67  DoubleBoundingBox3D getROI_BB_s();
68 };
69 
70 
71 } // namespace cx
72 
73 #endif // CXVIEWFOLLOWER_H
boost::shared_ptr< class ViewFollower > ViewFollowerPtr
boost::shared_ptr< class SliceProxy > SliceProxyPtr
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
boost::shared_ptr< class RegionOfInterestMetric > RegionOfInterestMetricPtr
Representation of a floating-point bounding box in 3D. The data are stored as {xmin,xmax,ymin,ymax,zmin,zmax}, in order to simplify communication with vtk.
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42
Namespace for all CustusX production code.