Medical Imaging Interaction Toolkit  2023.12.99-bb1d0334
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 mitkCameraController_h
14 #define mitkCameraController_h
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
mitk::CameraController::SetRenderer
void SetRenderer(const BaseRenderer *renderer)
Definition: mitkCameraController.h:46
mitk::CameraController::m_Renderer
const BaseRenderer * m_Renderer
Definition: mitkCameraController.h:95
mitk::BaseController
Baseclass for renderer slice-/camera-/time-control.
Definition: mitkBaseController.h:35
mitk::CameraController::ANTERIOR
@ ANTERIOR
Definition: mitkCameraController.h:34
mitkBaseController.h
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::CameraController::DEXTER
@ DEXTER
Definition: mitkCameraController.h:37
mitk::Vector< ScalarType, 2 >
MitkCoreExports.h
mitk::Point< ScalarType, 2 >
mitk::CameraController::StandardView
StandardView
Definition: mitkCameraController.h:32
mitk::CameraController::POSTERIOR
@ POSTERIOR
Definition: mitkCameraController.h:35
mitk::CameraController::CRANIAL
@ CRANIAL
Definition: mitkCameraController.h:38
mitk::CameraController
controls the camera used by the associated BaseRenderer
Definition: mitkCameraController.h:29
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
mitk::BaseRenderer
Definition: mitkBaseRenderer.h:56
MITKCORE_EXPORT
#define MITKCORE_EXPORT
Definition: MitkCoreExports.h:15
mitk::CameraController::SINISTER
@ SINISTER
Definition: mitkCameraController.h:36
mitk::ScalarType
double ScalarType
Definition: mitkNumericConstants.h:20