Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
vtkMitkRectangleProp.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 vtkMitkRectangleProp_h
14 #define vtkMitkRectangleProp_h
15 
16 #include <MitkCoreExports.h>
17 
18 #include <vtkActor2D.h>
19 #include <vtkSmartPointer.h>
20 
21 class vtkPolyData;
22 class vtkViewport;
23 
30 class MITKCORE_EXPORT vtkMitkRectangleProp : public vtkActor2D
31 {
32 public:
36 
44  void SetColor(float red, float green, float blue);
45 
51  void SetLineWidth(unsigned int lineWidth);
52 
62  int RenderOverlay(vtkViewport *viewport) override;
63 
64 protected:
67 
70 
71 private:
73  void CreateRectangle();
74 
76  void UpdateRectangle();
77 
78  int m_Height;
79  int m_Width;
80  int m_OriginX;
81  int m_OriginY;
82 
83  vtkIdType m_BottomLeft;
84  vtkIdType m_BottomRight;
85  vtkIdType m_TopRight;
86  vtkIdType m_TopLeft;
87 
90 };
91 
92 #endif
#define MITKCORE_EXPORT
Renders a colored rectangle border into a vtkRenderWindow.
vtkTypeMacro(vtkMitkRectangleProp, vtkProp)
vtkMitkRectangleProp()
Constructor. Creates the rectangle poly data and mapper.
void SetColor(float red, float green, float blue)
Set the color of the rectangle border.
static vtkMitkRectangleProp * New()
Create a new instance of vtkMitkRectangleProp.
void SetLineWidth(unsigned int lineWidth)
Set the line width of the rectangle border.
int RenderOverlay(vtkViewport *viewport) override
Render the rectangle as an overlay.
~vtkMitkRectangleProp() override
Destructor.