NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
niftkCMICLogo.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 niftkCMICLogo_h
16 #define niftkCMICLogo_h
17 
18 #include <mitkBaseData.h>
19 #include "niftkCoreExports.h"
20 
21 class vtkRenderer;
22 class vtkRenderWindow;
23 class vtkMapper;
24 class vtkCamera;
25 class vtkCubeSource;
26 class vtkActor;
27 class vtkPolyDataMapper;
28 class vtkLookupTable;
29 class vtkPolyData;
30 class vtkPNGReader;
31 class vtkImageImport;
32 
33 
34 class RenderWindow;
35 
36 namespace niftk
37 {
38 
41 class NIFTKCORE_EXPORT CMICLogo : public mitk::BaseData
42 {
43 public:
44 
45  mitkClassMacro( CMICLogo, BaseData )
46  itkNewMacro( Self )
47 
48  enum LogoPosition{ UpperLeft, UpperRight, LowerLeft, LowerRight, Middle };
49 
55  virtual void SetRenderWindow( vtkRenderWindow* renderWindow );
56 
60  virtual void SetLogoSource(const char* filename);
64  virtual void SetOpacity(double opacity);
69  virtual void SetZoomFactor( double factor );
70 
75  virtual void Enable();
76 
81  virtual void Disable();
82 
87  virtual bool IsEnabled();
88 
93  virtual void SetRequestedRegionToLargestPossibleRegion() override;
94 
99  virtual bool RequestedRegionIsOutsideOfTheBufferedRegion() override;
100 
105  virtual bool VerifyRequestedRegion() override;
106 
111  virtual void SetRequestedRegion(const itk::DataObject*) override;
112 
117  virtual vtkRenderWindow* GetRenderWindow();
118 
124  virtual vtkRenderer* GetVtkRenderer();
125 
129  virtual vtkActor* GetActor();
130 
134  virtual vtkPolyDataMapper* GetMapper();
135 
140  virtual void ForceMBILogoVisible(bool visible);
141 
142 protected:
143  void SetupCamera();
144  void SetupPosition();
145 
146  CMICLogo();
147 
148  virtual ~CMICLogo();
149 
150  vtkRenderWindow* m_RenderWindow;
151  vtkRenderer* m_Renderer;
152  vtkActor* m_OuterCubeActor;
153  vtkActor* m_InnerCubeActor;
154  vtkActor* m_MiddleCubeActor;
155  vtkPolyDataMapper* m_Mapper;
156  vtkPNGReader* m_PngReader;
157  vtkCamera* m_Camera;
158  vtkImageImport* m_VtkImageImport;
159 
161 
164 
166  double m_ZoomFactor;
167  double m_Opacity;
168 
169  char * m_ImageData;
170 
171 };
172 
173 }
174 
175 #endif
double m_Opacity
Definition: niftkCMICLogo.h:167
std::string m_FileName
Definition: niftkCMICLogo.h:160
bool m_IsEnabled
Definition: niftkCMICLogo.h:162
double m_ZoomFactor
Definition: niftkCMICLogo.h:166
char * m_ImageData
Definition: niftkCMICLogo.h:169
vtkRenderWindow * m_RenderWindow
Definition: niftkCMICLogo.h:150
bool m_ForceShowMBIDepartmentLogo
Definition: niftkCMICLogo.h:163
vtkImageImport * m_VtkImageImport
Definition: niftkCMICLogo.h:158
LogoPosition
Definition: niftkCMICLogo.h:48
vtkCamera * m_Camera
Definition: niftkCMICLogo.h:157
vtkActor * m_OuterCubeActor
Definition: niftkCMICLogo.h:152
vtkPNGReader * m_PngReader
Definition: niftkCMICLogo.h:156
vtkActor * m_MiddleCubeActor
Definition: niftkCMICLogo.h:154
vtkRenderer * m_Renderer
Definition: niftkCMICLogo.h:151
vtkPolyDataMapper * m_Mapper
Definition: niftkCMICLogo.h:155
LogoPosition m_LogoPosition
Definition: niftkCMICLogo.h:165
vtkActor * m_InnerCubeActor
Definition: niftkCMICLogo.h:153
Definition: niftkExceptionObject.h:21
Definition: niftkCMICLogo.h:48
GLsizei const GLcharARB ** string
Definition: glew.h:5194
Definition: niftkCMICLogo.h:41