VTK  9.2.5
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=========================================================================*/
32#ifndef vtkMagnifierRepresentation_h
33#define vtkMagnifierRepresentation_h
34
35#include "vtkCoordinate.h" //Because of the viewport coordinate macro
36#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
37#include "vtkInteractionWidgetsModule.h" // For export macro
39
41class vtkPoints;
42class vtkPolyData;
44class vtkActor2D;
45class vtkProperty2D;
46
47class VTKINTERACTIONWIDGETS_EXPORT vtkMagnifierRepresentation : public vtkWidgetRepresentation
48{
49public:
54
56
60 void PrintSelf(ostream& os, vtkIndent indent) override;
62
64
67 void SetRenderer(vtkRenderer* ren) override { this->Superclass::SetRenderer(ren); }
69
71
78 vtkSetClampMacro(MagnificationFactor, double, 0.001, 1000.0);
79 vtkGetMacro(MagnificationFactor, double);
81
83
91 vtkPropCollection* GetViewProps() { return this->Props; }
96
98
101 vtkSetVector2Macro(Size, int);
102 vtkGetVector2Macro(Size, int);
104
106
110 vtkSetMacro(Border, bool);
111 vtkGetMacro(Border, bool);
112 vtkBooleanMacro(Border, bool);
114
116
119 vtkGetObjectMacro(BorderProperty, vtkProperty2D);
121
126 {
127 Invisible = 0,
128 Visible
129 };
130#if !defined(VTK_LEGACY_REMOVE)
131 VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
133#endif
134
136
140 void BuildRepresentation() override;
141 void WidgetInteraction(double eventPos[2]) override;
143
150 vtkSetClampMacro(InteractionState, int, Invisible, Visible);
151
156 vtkRenderer* GetMagnificationRenderer() { return this->MagnificationRenderer; }
157
159
169
175
176protected:
179
180 // Ivars
183 int Size[2];
184 bool Border;
186
187 // The internal magnification renderer and supporting classes
191
192 // Border representation.
197
198private:
200 void operator=(const vtkMagnifierRepresentation&) = delete;
201};
202
203#endif
a actor that draws 2D data
Definition: vtkActor2D.h:46
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
Definition: vtkCoordinate.h:80
a simple class to control print indentation
Definition: vtkIndent.h:40
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 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:40
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:91
an ordered list of Props
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:57
represent surface properties of a 2D image
Definition: vtkProperty2D.h:41
abstract specification for renderers
Definition: vtkRenderer.h:73
abstract specification for Viewports
Definition: vtkViewport.h:56
abstract class defines interface between the widget and widget representation classes
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