VTK  9.3.0
vtkMagnifierRepresentation.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
20#ifndef vtkMagnifierRepresentation_h
21#define vtkMagnifierRepresentation_h
22
23#include "vtkCoordinate.h" //Because of the viewport coordinate macro
24#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
25#include "vtkInteractionWidgetsModule.h" // For export macro
26#include "vtkLegacy.h" // for VTK_LEGACY_REMOVE
28
29VTK_ABI_NAMESPACE_BEGIN
31class vtkPoints;
32class vtkPolyData;
34class vtkActor2D;
35class vtkProperty2D;
36
37class VTKINTERACTIONWIDGETS_EXPORT vtkMagnifierRepresentation : public vtkWidgetRepresentation
38{
39public:
44
46
50 void PrintSelf(ostream& os, vtkIndent indent) override;
52
54
57 void SetRenderer(vtkRenderer* ren) override { this->Superclass::SetRenderer(ren); }
59
61
68 vtkSetClampMacro(MagnificationFactor, double, 0.001, 1000.0);
69 vtkGetMacro(MagnificationFactor, double);
71
73
81 vtkPropCollection* GetViewProps() { return this->Props; }
86
88
91 vtkSetVector2Macro(Size, int);
92 vtkGetVector2Macro(Size, int);
94
96
100 vtkSetMacro(Border, bool);
101 vtkGetMacro(Border, bool);
102 vtkBooleanMacro(Border, bool);
104
106
109 vtkGetObjectMacro(BorderProperty, vtkProperty2D);
111
116 {
117 Invisible = 0,
118 Visible
119 };
120#if !defined(VTK_LEGACY_REMOVE)
121 VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
123#endif
124
126
130 void BuildRepresentation() override;
131 void WidgetInteraction(double eventPos[2]) override;
133
140 vtkSetClampMacro(InteractionState, int, Invisible, Visible);
141
146 vtkRenderer* GetMagnificationRenderer() { return this->MagnificationRenderer; }
147
149
159
165
166protected:
169
170 // Ivars
173 int Size[2];
174 bool Border;
176
177 // The internal magnification renderer and supporting classes
181
182 // Border representation.
187
188private:
190 void operator=(const vtkMagnifierRepresentation&) = delete;
191};
192
193VTK_ABI_NAMESPACE_END
194#endif
a actor that draws 2D data
Definition vtkActor2D.h:35
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
a simple class to control print indentation
Definition vtkIndent.h:29
represent a vtkBorderWidget
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 RemoveAllViewProps()
Optionally specify and maintain the list of view props (e.g., actors, volumes, etc).
void ReleaseGraphicsResources(vtkWindow *) override
These methods are necessary to make this representation behave as a vtkProp.
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:29
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:80
an ordered list of Props
abstract superclass for all actors, volumes and annotations
Definition vtkProp.h:43
represent surface properties of a 2D image
abstract specification for renderers
Definition vtkRenderer.h:59
abstract specification for Viewports
Definition vtkViewport.h:45
abstract class defines interface between the widget and widget representation classes
window superclass for vtkRenderWindow
Definition vtkWindow.h:25
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_DEPRECATED_IN_9_2_0(reason)
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270