Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitk::GradientBackground Class Reference

#include <mitkGradientBackground.h>

Inheritance diagram for mitk::GradientBackground:
Collaboration diagram for mitk::GradientBackground:

Public Types

typedef GradientBackground Self
 
typedef itk::Object Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 

Public Member Functions

virtual std::vector< std::string > GetClassHierarchy () const
 
virtual const char * GetClassName () const
 
Pointer Clone () const
 
virtual void SetRenderWindow (vtkSmartPointer< vtkRenderWindow > renderWindow)
 
virtual vtkSmartPointer< vtkRenderWindow > GetRenderWindow ()
 
virtual vtkSmartPointer< vtkRenderer > GetVtkRenderer ()
 
virtual void SetGradientColors (double r1, double g1, double b1, double r2, double g2, double b2)
 
virtual void SetGradientColors (Color upper, Color lower)
 
virtual void SetUpperColor (double r, double g, double b)
 
virtual void SetLowerColor (double r, double g, double b)
 
virtual void SetUpperColor (Color upper)
 
virtual void SetLowerColor (Color lower)
 
virtual void Enable ()
 
virtual void Disable ()
 
virtual bool IsEnabled ()
 

Static Public Member Functions

static const char * GetStaticNameOfClass ()
 
static Pointer New ()
 

Protected Member Functions

 GradientBackground ()
 
 ~GradientBackground () override
 

Protected Attributes

vtkSmartPointer< vtkRenderWindow > m_RenderWindow
 
vtkSmartPointer< vtkRenderer > m_Renderer
 

Detailed Description

Displays a color gradient in the background of a vtkRenderWindow. The gradient ist faked by displaying a non-interactable smoothly shaded plane in a separate layer behind the scene. After setting the renderwindow, the gradient may be activated by calling Enable()

Deprecated:
(as of 2015_05) not used in renderwindows

Definition at line 36 of file mitkGradientBackground.h.

Member Typedef Documentation

◆ ConstPointer

◆ Pointer

◆ Self

◆ Superclass

Definition at line 39 of file mitkGradientBackground.h.

Constructor & Destructor Documentation

◆ GradientBackground()

mitk::GradientBackground::GradientBackground ( )
protected

Definition at line 19 of file mitkGradientBackground.cpp.

References m_Renderer, and m_RenderWindow.

◆ ~GradientBackground()

mitk::GradientBackground::~GradientBackground ( )
overrideprotected

Definition at line 26 of file mitkGradientBackground.cpp.

References Disable(), IsEnabled(), and m_RenderWindow.

Member Function Documentation

◆ Clone()

Pointer mitk::GradientBackground::Clone ( ) const

◆ Disable()

void mitk::GradientBackground::Disable ( )
virtual

Disables drawing of the color gradient background. If you want to enable it, call the Enable() function.

Definition at line 111 of file mitkGradientBackground.cpp.

References mitk::VtkLayerController::GetInstance(), IsEnabled(), m_Renderer, m_RenderWindow, and mitk::VtkLayerController::RemoveRenderer().

Referenced by ~GradientBackground().

◆ Enable()

void mitk::GradientBackground::Enable ( )
virtual

Enables drawing of the color gradient background. If you want to disable it, call the Disable() function.

Definition at line 101 of file mitkGradientBackground.cpp.

References mitk::VtkLayerController::GetInstance(), mitk::VtkLayerController::InsertBackgroundRenderer(), m_Renderer, and m_RenderWindow.

◆ GetClassHierarchy()

virtual std::vector<std::string> mitk::GradientBackground::GetClassHierarchy ( ) const
inlinevirtual

Definition at line 39 of file mitkGradientBackground.h.

◆ GetClassName()

virtual const char* mitk::GradientBackground::GetClassName ( ) const
virtual

◆ GetRenderWindow()

vtkSmartPointer< vtkRenderWindow > mitk::GradientBackground::GetRenderWindow ( )
virtual

Returns the vtkRenderWindow, which is used for displaying the gradient background

Definition at line 47 of file mitkGradientBackground.cpp.

References m_RenderWindow.

◆ GetStaticNameOfClass()

static const char* mitk::GradientBackground::GetStaticNameOfClass ( )
inlinestatic

Definition at line 39 of file mitkGradientBackground.h.

◆ GetVtkRenderer()

vtkSmartPointer< vtkRenderer > mitk::GradientBackground::GetVtkRenderer ( )
virtual

Returns the renderer responsible for rendering the color gradient into the vtkRenderWindow

Definition at line 57 of file mitkGradientBackground.cpp.

References m_Renderer.

◆ IsEnabled()

bool mitk::GradientBackground::IsEnabled ( )
virtual

Checks, if the gradient background is currently enabled (visible)

Definition at line 124 of file mitkGradientBackground.cpp.

References mitk::VtkLayerController::GetInstance(), m_Renderer, and m_RenderWindow.

Referenced by Disable(), and ~GradientBackground().

◆ New()

static Pointer mitk::GradientBackground::New ( )
static

◆ SetGradientColors() [1/2]

void mitk::GradientBackground::SetGradientColors ( double  r1,
double  g1,
double  b1,
double  r2,
double  g2,
double  b2 
)
virtual

Sets the gradient colors. The gradient will smoothly fade from color1 to color2

Definition at line 66 of file mitkGradientBackground.cpp.

References SetLowerColor(), and SetUpperColor().

Referenced by SetGradientColors().

◆ SetGradientColors() [2/2]

void mitk::GradientBackground::SetGradientColors ( mitk::Color  upper,
mitk::Color  lower 
)
virtual

Definition at line 72 of file mitkGradientBackground.cpp.

References SetGradientColors().

◆ SetLowerColor() [1/2]

void mitk::GradientBackground::SetLowerColor ( double  r,
double  g,
double  b 
)
virtual

Definition at line 82 of file mitkGradientBackground.cpp.

References m_Renderer.

Referenced by SetGradientColors(), and SetLowerColor().

◆ SetLowerColor() [2/2]

void mitk::GradientBackground::SetLowerColor ( mitk::Color  lower)
virtual

Definition at line 92 of file mitkGradientBackground.cpp.

References SetLowerColor().

◆ SetRenderWindow()

void mitk::GradientBackground::SetRenderWindow ( vtkSmartPointer< vtkRenderWindow >  renderWindow)
virtual

Sets the renderwindow, in which the gradient background will be shown. Make sure, you have called this function before calling Enable()

Definition at line 38 of file mitkGradientBackground.cpp.

References m_RenderWindow.

◆ SetUpperColor() [1/2]

void mitk::GradientBackground::SetUpperColor ( double  r,
double  g,
double  b 
)
virtual

Definition at line 77 of file mitkGradientBackground.cpp.

References m_Renderer.

Referenced by SetGradientColors(), and SetUpperColor().

◆ SetUpperColor() [2/2]

void mitk::GradientBackground::SetUpperColor ( mitk::Color  upper)
virtual

Definition at line 87 of file mitkGradientBackground.cpp.

References SetUpperColor().

Member Data Documentation

◆ m_Renderer

vtkSmartPointer<vtkRenderer> mitk::GradientBackground::m_Renderer
protected

◆ m_RenderWindow

vtkSmartPointer<vtkRenderWindow> mitk::GradientBackground::m_RenderWindow
protected

The documentation for this class was generated from the following files: