Medical Imaging Interaction Toolkit  2025.12.02
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 
66 
71  void MoveCameraToPoint(const Point2D &planePoint);
72 
73  void MoveBy(const Vector2D &moveVectorInMM);
74 
75  void Zoom(ScalarType factor, const Point2D &zoomPointInMM);
76 
78 
84 
85  protected:
90 
94  ~CameraController() override;
96 
98 
99  private:
105  void AdjustCameraToPlane(const Point2D &PlanePoint);
106 
107  void AdjustConstrainedCameraPosition(Point2D &planePoint);
108  };
109 
110 } // namespace mitk
111 
112 #endif
#define MITKCORE_EXPORT
Baseclass for renderer slice-/camera-/time-control.
controls the camera used by the associated BaseRenderer
virtual void SetViewToDexter()
void AdjustCameraToPlane()
AdjustCameraToPlane Moves the camera of a 2D Renderwindow without panning or zooming,...
void SetRenderer(const BaseRenderer *renderer)
Point2D GetCameraPositionOnPlane()
virtual void SetViewToSinister()
CameraController()
Default Constructor.
const BaseRenderer * m_Renderer
void Zoom(ScalarType factor, const Point2D &zoomPointInMM)
~CameraController() override
Default Destructor.
virtual void SetStandardView(StandardView view)
ScalarType ComputeMaxParallelScale()
virtual void SetViewToPosterior()
virtual void SetViewToAnterior()
virtual void SetViewToCranial()
void MoveBy(const Vector2D &moveVectorInMM)
void MoveCameraToPoint(const Point2D &planePoint)
MoveCameraToPoint Move camera so that the point on the plane is in the view center.
void SetScaleFactorInMMPerDisplayUnit(ScalarType scale)
Set the desired zoom-level to the absolute value given.
virtual void SetViewToCaudal()
void Fit()
Fit Adjust the camera, so that the world bounding box is fully visible.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
Find image slices visible on a given plane.
double ScalarType