Medical Imaging Interaction Toolkit  2018.4.99-e1268d66
Medical Imaging Interaction Toolkit
mitkGradientBackground.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 mitkGradientBackground_h
14 #define mitkGradientBackground_h
15 
16 #include <itkObject.h>
17 #include <mitkColorProperty.h>
18 #include <mitkCommon.h>
19 #include <vtkSmartPointer.h>
20 
21 class vtkRenderer;
22 class vtkRenderWindow;
23 
24 namespace mitk
25 {
26  class RenderWindow;
36  class MITKCORE_EXPORT GradientBackground : public itk::Object
37  {
38  public:
40 
41  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
42 
43 
48  virtual void SetRenderWindow(vtkSmartPointer<vtkRenderWindow> renderWindow);
49 
54  virtual vtkSmartPointer<vtkRenderWindow> GetRenderWindow();
55 
61  virtual vtkSmartPointer<vtkRenderer> GetVtkRenderer();
62 
67  virtual void SetGradientColors(double r1, double g1, double b1, double r2, double g2, double b2);
68  virtual void SetGradientColors(Color upper, Color lower);
69  virtual void SetUpperColor(double r, double g, double b);
70  virtual void SetLowerColor(double r, double g, double b);
71  virtual void SetUpperColor(Color upper);
72  virtual void SetLowerColor(Color lower);
73 
78  virtual void Enable();
79 
84  virtual void Disable();
85 
90  virtual bool IsEnabled();
91 
92  protected:
94  ~GradientBackground() override;
95 
96  vtkSmartPointer<vtkRenderWindow> m_RenderWindow;
97 
98  vtkSmartPointer<vtkRenderer> m_Renderer;
99  };
100 } // end of namespace mitk
101 #endif // mitkGradientBackground_h
#define MITKCORE_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
vtkSmartPointer< vtkRenderer > m_Renderer
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:49
vtkSmartPointer< vtkRenderWindow > m_RenderWindow
itk::RGBPixel< float > Color
Color Standard RGB color typedef (float)