NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
vtkOpenGLMatrixDrivenCamera.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef vtkOpenGLMatrixDrivenCamera_h
16 #define vtkOpenGLMatrixDrivenCamera_h
17 
18 #include "niftkCoreExports.h"
19 #include <vtkOpenGLCamera.h>
20 #include <vtkRenderer.h>
21 #include <vtkMatrix4x4.h>
22 #include <vtkSmartPointer.h>
23 #include <vtkSetGet.h>
24 
39 class NIFTKCORE_EXPORT vtkOpenGLMatrixDrivenCamera : public vtkOpenGLCamera
40 {
41 public:
42  static vtkOpenGLMatrixDrivenCamera *New();
43  vtkTypeMacro(vtkOpenGLMatrixDrivenCamera, vtkOpenGLCamera);
44  virtual void PrintSelf(ostream& os, vtkIndent indent) override;
45 
46  void Render(vtkRenderer *ren) override;
47 
48  vtkSetMacro(UseCalibratedCamera, bool);
49  vtkGetMacro(UseCalibratedCamera, bool);
50 
57  void SetCalibratedImageSize(const int& width, const int& height, double pixelaspect = 1.0);
58 
64  void SetActualWindowSize(const int& width, const int& height);
65 
73  void SetIntrinsicParameters(const double& fx, const double& fy,
74  const double &cx, const double& cy
75  );
76 protected:
77 
80 
81 private:
82 
83  vtkOpenGLMatrixDrivenCamera(const vtkOpenGLMatrixDrivenCamera&); // Purposefully not implemented.
84  void operator=(const vtkOpenGLMatrixDrivenCamera&); // Purposefully not implemented.
85 
86  vtkSmartPointer<vtkMatrix4x4> m_IntrinsicMatrix;
87  bool UseCalibratedCamera;
88  int m_ImageWidthInPixels;
89  int m_ImageHeightInPixels;
90  int m_WindowWidthInPixels;
91  int m_WindowHeightInPixels;
92  double m_PixelAspectRatio;
93  double m_Fx;
94  double m_Fy;
95  double m_Cx;
96  double m_Cy;
97 };
98 
99 #endif
~vtkOpenGLMatrixDrivenCamera()
Definition: vtkOpenGLMatrixDrivenCamera.h:79
Subclass of vtkCamera so we can just set the relevant intrinsic matrix, the size of the image used in...
Definition: vtkOpenGLMatrixDrivenCamera.h:39
GLint GLint GLint GLint GLint GLint GLsizei GLsizei height
Definition: glew.h:1236
GLint GLint GLint GLint GLint GLint GLsizei width
Definition: glew.h:1236