Medical Imaging Interaction Toolkit  2021.02.99-e55a5d2f
Medical Imaging Interaction Toolkit
mitkCameraController.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef CAMERACONTROLLER_H_HEADER_INCLUDED_C1C53722
14 #define CAMERACONTROLLER_H_HEADER_INCLUDED_C1C53722
15 
16 #include "mitkBaseController.h"
17 #include <MitkCoreExports.h>
18 
19 namespace mitk
20 {
21  class KeyEvent;
22 
23  //##Documentation
24  //## @brief controls the camera used by the associated BaseRenderer
25  //##
26  //## Subclass of BaseController. Controls the camera used by the associated
27  //## BaseRenderer.
28  //## @ingroup NavigationControl
30  {
31  public:
33  {
39  CAUDAL
40  };
41 
43  // mitkNewMacro1Param(Self, const char*);
44  itkNewMacro(Self);
45 
46  void SetRenderer(const BaseRenderer *renderer) { m_Renderer = renderer; };
47  itkGetConstMacro(Renderer, const BaseRenderer *);
48 
49  virtual void SetViewToAnterior();
50  virtual void SetViewToPosterior();
51  virtual void SetViewToSinister();
52  virtual void SetViewToDexter();
53  virtual void SetViewToCranial();
54  virtual void SetViewToCaudal();
55  virtual void SetStandardView(StandardView view);
56 
60  void Fit();
61 
65  void SetScaleFactorInMMPerDisplayUnit(ScalarType scale);
66 
71  void MoveCameraToPoint(const Point2D &planePoint);
72 
73  void MoveBy(const Vector2D &moveVectorInMM);
74 
75  void Zoom(ScalarType factor, const Point2D &zoomPointInMM);
76 
77  Point2D GetCameraPositionOnPlane();
78 
83  void AdjustCameraToPlane();
84 
85  protected:
90 
94  ~CameraController() override;
96 
97  ScalarType ComputeMaxParallelScale();
98 
99  private:
105  void AdjustCameraToPlane(const Point2D &PlanePoint);
106 
107  void AdjustConstrainedCameraPosition(Point2D &planePoint);
108  };
109 
110 } // namespace mitk
111 
112 #endif /* CAMERACONTROLLER_H_HEADER_INCLUDED_C1C53722 */
#define MITKCORE_EXPORT
Baseclass for renderer slice-/camera-control.
double ScalarType
Organizes the rendering process.
DataCollection - Class to facilitate loading/accessing structured data.
const BaseRenderer * m_Renderer
void SetRenderer(const BaseRenderer *renderer)
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
controls the camera used by the associated BaseRenderer