Medical Imaging Interaction Toolkit  2016.11.0
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,
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 mitkGradientBackground_h
18 #define mitkGradientBackground_h
19 
20 #include <itkObject.h>
21 #include <mitkColorProperty.h>
22 #include <mitkCommon.h>
23 #include <vtkSmartPointer.h>
24 
25 class vtkRenderer;
26 class vtkRenderWindow;
27 
28 namespace mitk
29 {
30  class RenderWindow;
40  class MITKCORE_EXPORT GradientBackground : public itk::Object
41  {
42  public:
44 
45  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
46 
52  virtual void SetRenderWindow(vtkSmartPointer<vtkRenderWindow> renderWindow);
53 
58  virtual vtkSmartPointer<vtkRenderWindow> GetRenderWindow();
59 
65  virtual vtkSmartPointer<vtkRenderer> GetVtkRenderer();
66 
71  virtual void SetGradientColors(double r1, double g1, double b1, double r2, double g2, double b2);
72  virtual void SetGradientColors(Color upper, Color lower);
73  virtual void SetUpperColor(double r, double g, double b);
74  virtual void SetLowerColor(double r, double g, double b);
75  virtual void SetUpperColor(Color upper);
76  virtual void SetLowerColor(Color lower);
77 
82  virtual void Enable();
83 
88  virtual void Disable();
89 
94  virtual bool IsEnabled();
95 
96  protected:
98  ~GradientBackground();
99 
100  vtkSmartPointer<vtkRenderWindow> m_RenderWindow;
101 
102  vtkSmartPointer<vtkRenderer> m_Renderer;
103  };
104 } // end of namespace mitk
105 #endif // mitkGradientBackground_h
#define MITKCORE_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:53
itk::RGBPixel< float > Color
Color Standard RGB color typedef (float)