CustusX  2023.01.05-dev+develop.0da12
An IGT application
cxNavigation.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 CXNAVIGATION_H
12 #define CXNAVIGATION_H
13 
14 #include "cxResourceVisualizationExport.h"
15 
16 #include "cxDefinitions.h"
17 #include "cxForwardDeclarations.h"
18 #include "cxVector3D.h"
19 #include "cxViewGroupData.h"
20 
21 namespace cx
22 {
23 typedef boost::shared_ptr<class VisServices> VisServicesPtr;
24 
29 class cxResourceVisualization_EXPORT Navigation
30 {
31 public:
32  enum VIEW_TYPE { v2D = 0x01, v3D=0x02, vBOTH=0x03 };
33  Navigation(VisServicesPtr services, CameraControlPtr camera3D=CameraControlPtr());
34  void centerToTooltip();
35  void centerToPosition(Vector3D p_r, QFlags<VIEW_TYPE> viewType=vBOTH);
36 
37  void centerToDataInActiveViewGroup(DataViewProperties properties=DataViewProperties::createFull());
38  void centerToDataInViewGroup(ViewGroupDataPtr group, DataViewProperties properties=DataViewProperties::createFull());
39 private:
40  void moveManualToolToPosition(Vector3D& p_r);
41  Vector3D findDataCenter(const std::vector<DataPtr> &data);
42  void centerToData(DataPtr image);
43  void centerToData(const std::vector<DataPtr>& images);
44 
45  VisServicesPtr mServices;
46  CameraControlPtr mCamera3D;
47 };
48 
49 
50 } // namespace cx
51 
52 #endif // CXNAVIGATION_H
boost::shared_ptr< class ViewGroupData > ViewGroupDataPtr
Definition: cxViewGroup.h:29
boost::shared_ptr< class CameraControl > CameraControlPtr
boost::shared_ptr< class VisServices > VisServicesPtr
Definition: cxMainWindow.h:40
boost::shared_ptr< class Data > DataPtr
static DataViewProperties createFull()
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42
Namespace for all CustusX production code.