Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef CAMERACONTROLLER_H_HEADER_INCLUDED_C1C53722
18 #define CAMERACONTROLLER_H_HEADER_INCLUDED_C1C53722
19 
20 #include "mitkBaseController.h"
21 #include <MitkCoreExports.h>
22 
23 namespace mitk
24 {
25  class KeyEvent;
26 
27  //##Documentation
28  //## @brief controls the camera used by the associated BaseRenderer
29  //##
30  //## Subclass of BaseController. Controls the camera used by the associated
31  //## BaseRenderer.
32  //## @ingroup NavigationControl
34  {
35  public:
37  {
43  CAUDAL
44  };
45 
47  // mitkNewMacro1Param(Self, const char*);
48  itkNewMacro(Self);
49 
50  void SetRenderer(const BaseRenderer *renderer) { m_Renderer = renderer; };
51  itkGetConstMacro(Renderer, const BaseRenderer *);
52 
53  virtual void SetViewToAnterior();
54  virtual void SetViewToPosterior();
55  virtual void SetViewToSinister();
56  virtual void SetViewToDexter();
57  virtual void SetViewToCranial();
58  virtual void SetViewToCaudal();
59  virtual void SetStandardView(StandardView view);
60 
64  void Fit();
65 
69  void SetScaleFactorInMMPerDisplayUnit(ScalarType scale);
70 
75  void MoveCameraToPoint(const Point2D &planePoint);
76 
77  void MoveBy(const Vector2D &moveVectorInMM);
78 
79  void Zoom(ScalarType factor, const Point2D &zoomPointInMM);
80 
81  Point2D GetCameraPositionOnPlane();
82 
87  void AdjustCameraToPlane();
88 
89  protected:
94 
98  virtual ~CameraController();
100 
101  ScalarType ComputeMaxParallelScale();
102 
103  private:
109  void AdjustCameraToPlane(const Point2D &PlanePoint);
110 
111  void AdjustConstrainedCameraPosition(Point2D &planePoint);
112  };
113 
114 } // namespace mitk
115 
116 #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:44
void Fit()
controls the camera used by the associated BaseRenderer