Medical Imaging Interaction Toolkit  2016.11.0
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,
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 vtkMitkRectangleProp_h
18 #define vtkMitkRectangleProp_h
19 
20 #include <MitkCoreExports.h>
21 
22 #include <vtkActor2D.h>
23 #include <vtkRenderWindow.h>
24 #include <vtkSmartPointer.h>
25 
26 class vtkPolyData;
27 
34 class MITKCORE_EXPORT vtkMitkRectangleProp : public vtkActor2D
35 {
36 public:
37  static vtkMitkRectangleProp *New();
38  vtkTypeMacro(vtkMitkRectangleProp, vtkProp);
39 
46  void SetColor(float col1, float col2, float col3);
47 
48  void SetLineWidth(unsigned int lineWidth);
49 
50  int RenderOverlay(vtkViewport *viewport);
51 
52 protected:
54  virtual ~vtkMitkRectangleProp();
55 
56  int m_Height;
57  int m_Width;
58  int m_OriginX;
59  int m_OriginY;
60  vtkIdType m_BottomLeftR, m_BottomRightL, m_BottomLeftU, m_TopLeftD, m_TopLeftR, m_TopRightL, m_TopRightD,
61  m_BottomRightU;
62 
66  void CreateRectangle();
67 
68  void UpdateRectangle();
69 
73  vtkSmartPointer<vtkPolyData> m_PolyData;
74 };
75 #endif /* vtkMitkRectangleProp_h */
#define MITKCORE_EXPORT
vtkSmartPointer< vtkPolyData > m_PolyData
m_PolyData holds the rectangle.
The vtkMitkRectangleProp2 class Renders a rectangle into a renderwindow as a frame.
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.