VTK  9.2.6
vtkMagnifierRepresentation.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkMagnifierRepresentation.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
28
29#ifndef vtkMagnifierRepresentation_h
30#define vtkMagnifierRepresentation_h
31
32#include "vtkCoordinate.h" //Because of the viewport coordinate macro
33#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
34#include "vtkInteractionWidgetsModule.h" // For export macro
36
38class vtkPoints;
39class vtkPolyData;
41class vtkActor2D;
42class vtkProperty2D;
43
44class VTKINTERACTIONWIDGETS_EXPORT vtkMagnifierRepresentation : public vtkWidgetRepresentation
45{
46public:
51
53
57 void PrintSelf(ostream& os, vtkIndent indent) override;
59
61
64 void SetRenderer(vtkRenderer* ren) override { this->Superclass::SetRenderer(ren); }
66
68
75 vtkSetClampMacro(MagnificationFactor, double, 0.001, 1000.0);
76 vtkGetMacro(MagnificationFactor, double);
78
80
93
95
98 vtkSetVector2Macro(Size, int);
99 vtkGetVector2Macro(Size, int);
101
103
107 vtkSetMacro(Border, bool);
108 vtkGetMacro(Border, bool);
109 vtkBooleanMacro(Border, bool);
111
113
116 vtkGetObjectMacro(BorderProperty, vtkProperty2D);
118
127#if !defined(VTK_LEGACY_REMOVE)
128 VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
130#endif
131
133
137 void BuildRepresentation() override;
138 void WidgetInteraction(double eventPos[2]) override;
140
147 vtkSetClampMacro(InteractionState, int, Invisible, Visible);
148
154
156
166
172
173protected:
176
177 // Ivars
180 int Size[2];
181 bool Border;
183
184 // The internal magnification renderer and supporting classes
188
189 // Border representation.
194
195private:
197 void operator=(const vtkMagnifierRepresentation&) = delete;
198};
199
200#endif
a actor that draws 2D data
Definition vtkActor2D.h:40
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
a simple class to control print indentation
Definition vtkIndent.h:34
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
These methods are necessary to make this representation behave as a vtkProp.
int RenderOpaqueGeometry(vtkViewport *) override
These methods are necessary to make this representation behave as a vtkProp.
int RenderOverlay(vtkViewport *) override
These methods are necessary to make this representation behave as a vtkProp.
vtkPropCollection * GetViewProps()
Optionally specify and maintain the list of view props (e.g., actors, volumes, etc).
vtkRenderer * GetMagnificationRenderer()
Provide access to the magnification renderer.
void AddViewProp(vtkProp *)
Optionally specify and maintain the list of view props (e.g., actors, volumes, etc).
void RemoveViewProp(vtkProp *)
Optionally specify and maintain the list of view props (e.g., actors, volumes, etc).
int HasViewProp(vtkProp *)
Optionally specify and maintain the list of view props (e.g., actors, volumes, etc).
vtkTypeBool HasTranslucentPolygonalGeometry() override
These methods are necessary to make this representation behave as a vtkProp.
void ReleaseGraphicsResources(vtkWindow *) override
These methods are necessary to make this representation behave as a vtkProp.
void RemoveAllViewProps(void)
Optionally specify and maintain the list of view props (e.g., actors, volumes, etc).
InteractionStateType
Define the various states that the representation can be in.
static vtkMagnifierRepresentation * New()
Instantiate this class.
~vtkMagnifierRepresentation() override
void SetRenderer(vtkRenderer *ren) override
Specify the renderer viewport in which to place the magnifier.
vtkMTimeType GetMTime() override
Return the MTime of this object.
void BuildRepresentation() override
Subclasses should implement these methods.
void WidgetInteraction(double eventPos[2]) override
Subclasses should implement these methods.
void PrintSelf(ostream &os, vtkIndent indent) override
Define standard methods.
represent and manipulate 3D points
Definition vtkPoints.h:34
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:85
an ordered list of Props
represent surface properties of a 2D image
abstract specification for renderers
Definition vtkRenderer.h:67
abstract specification for Viewports
Definition vtkViewport.h:50
virtual void SetRenderer(vtkRenderer *ren)
Subclasses of vtkWidgetRepresentation must implement these methods.
window superclass for vtkRenderWindow
Definition vtkWindow.h:39
int vtkTypeBool
Definition vtkABI.h:69
#define VTK_DEPRECATED_IN_9_2_0(reason)
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287