VTK  9.1.0
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=========================================================================*/
29#ifndef vtkMagnifierRepresentation_h
30#define vtkMagnifierRepresentation_h
31
32#include "vtkCoordinate.h" //Because of the viewport coordinate macro
33#include "vtkInteractionWidgetsModule.h" // For export macro
35
37class vtkPoints;
38class vtkPolyData;
40class vtkActor2D;
41class vtkProperty2D;
42
43class VTKINTERACTIONWIDGETS_EXPORT vtkMagnifierRepresentation : public vtkWidgetRepresentation
44{
45public:
50
52
56 void PrintSelf(ostream& os, vtkIndent indent) override;
58
60
63 void SetRenderer(vtkRenderer* ren) override { this->Superclass::SetRenderer(ren); }
65
67
74 vtkSetClampMacro(MagnificationFactor, double, 0.001, 1000.0);
75 vtkGetMacro(MagnificationFactor, double);
77
79
87 vtkPropCollection* GetViewProps() { return this->Props; }
92
94
97 vtkSetVector2Macro(Size, int);
98 vtkGetVector2Macro(Size, int);
100
102
106 vtkSetMacro(Border, bool);
107 vtkGetMacro(Border, bool);
108 vtkBooleanMacro(Border, bool);
110
112
115 vtkGetObjectMacro(BorderProperty, vtkProperty2D);
117
122 {
123 Invisible = 0,
124 Visible
125 };
126
128
132 void BuildRepresentation() override;
133 void WidgetInteraction(double eventPos[2]) override;
135
142 vtkSetClampMacro(InteractionState, int, Invisible, Visible);
143
148 vtkRenderer* GetMagnificationRenderer() { return this->MagnificationRenderer; }
149
151
161
167
168protected:
171
172 // Ivars
175 int Size[2];
176 bool Border;
178
179 // The internal magnification renderer and supporting classes
183
184 // Border representation.
189
190private:
192 void operator=(const vtkMagnifierRepresentation&) = delete;
193};
194
195#endif
a actor that draws 2D data
Definition: vtkActor2D.h:149
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
a simple class to control print indentation
Definition: vtkIndent.h:113
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).
_InteractionState
Define the various states that the representation can be in.
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).
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:143
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
an ordered list of Props
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:67
represent surface properties of a 2D image
abstract specification for renderers
Definition: vtkRenderer.h:173
abstract specification for Viewports
Definition: vtkViewport.h:47
abstract class defines interface between the widget and widget representation classes
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287