Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
vtkMitkRectangleProp Class Reference

Renders a colored rectangle border into a vtkRenderWindow. More...

#include <vtkMitkRectangleProp.h>

Inheritance diagram for vtkMitkRectangleProp:
Collaboration diagram for vtkMitkRectangleProp:

Public Member Functions

 vtkTypeMacro (vtkMitkRectangleProp, vtkProp)
 
void SetColor (float red, float green, float blue)
 Set the color of the rectangle border. More...
 
void SetLineWidth (unsigned int lineWidth)
 Set the line width of the rectangle border. More...
 
int RenderOverlay (vtkViewport *viewport) override
 Render the rectangle as an overlay. More...
 

Static Public Member Functions

static vtkMitkRectangleProp * New ()
 Create a new instance of vtkMitkRectangleProp. More...
 

Protected Member Functions

 vtkMitkRectangleProp ()
 Constructor. Creates the rectangle poly data and mapper. More...
 
 ~vtkMitkRectangleProp () override
 Destructor. More...
 

Detailed Description

Renders a colored rectangle border into a vtkRenderWindow.

This class draws a rectangular frame (border) into the render window overlay. The rectangle automatically adjusts its size to match the viewport dimensions.

Definition at line 30 of file vtkMitkRectangleProp.h.

Constructor & Destructor Documentation

◆ vtkMitkRectangleProp()

vtkMitkRectangleProp::vtkMitkRectangleProp ( )
protected

Constructor. Creates the rectangle poly data and mapper.

◆ ~vtkMitkRectangleProp()

vtkMitkRectangleProp::~vtkMitkRectangleProp ( )
overrideprotected

Destructor.

Member Function Documentation

◆ New()

static vtkMitkRectangleProp* vtkMitkRectangleProp::New ( )
static

Create a new instance of vtkMitkRectangleProp.

◆ RenderOverlay()

int vtkMitkRectangleProp::RenderOverlay ( vtkViewport *  viewport)
override

Render the rectangle as an overlay.

Updates the rectangle geometry if the viewport size has changed, then renders the rectangle.

Parameters
[in]viewportThe viewport to render into.
Returns
1 on success, 0 if the mapper is not set or the prop is not visible.

◆ SetColor()

void vtkMitkRectangleProp::SetColor ( float  red,
float  green,
float  blue 
)

Set the color of the rectangle border.

Parameters
[in]redRed component (0.0 to 1.0).
[in]greenGreen component (0.0 to 1.0).
[in]blueBlue component (0.0 to 1.0).

◆ SetLineWidth()

void vtkMitkRectangleProp::SetLineWidth ( unsigned int  lineWidth)

Set the line width of the rectangle border.

Parameters
[in]lineWidthThe line width in pixels.

◆ vtkTypeMacro()

vtkMitkRectangleProp::vtkTypeMacro ( vtkMitkRectangleProp  ,
vtkProp   
)

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