VTK  9.3.20240329
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 "vtkInteractionWidgetsModule.h" // For export macro
26 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
27 
28 VTK_ABI_NAMESPACE_BEGIN
29 class vtkPropCollection;
30 class vtkPoints;
31 class vtkPolyData;
33 class vtkActor2D;
34 class vtkProperty2D;
35 
36 class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkMagnifierRepresentation
38 {
39 public:
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 
122 
126  void BuildRepresentation() override;
127  void WidgetInteraction(double eventPos[2]) override;
129 
136  vtkSetClampMacro(InteractionState, int, Invisible, Visible);
137 
142  vtkRenderer* GetMagnificationRenderer() { return this->MagnificationRenderer; }
143 
145 
150  int RenderOverlay(vtkViewport*) override;
155 
160  vtkMTimeType GetMTime() override;
161 
162 protected:
165 
166  // Ivars
169  int Size[2];
170  bool Border;
172 
173  // The internal magnification renderer and supporting classes
177 
178  // Border representation.
183 
184 private:
186  void operator=(const vtkMagnifierRepresentation&) = delete;
187 };
188 
189 VTK_ABI_NAMESPACE_END
190 #endif
a actor that draws 2D data
Definition: vtkActor2D.h:145
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
a simple class to control print indentation
Definition: vtkIndent.h:108
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.
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.
vtkPropCollection * GetViewProps()
Optionally specify and maintain the list of view props (e.g., actors, volumes, etc).
~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.
static vtkMagnifierRepresentation * New()
Instantiate this class.
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.
vtkRenderer * GetMagnificationRenderer()
Provide access to the magnification renderer.
represent and manipulate 3D points
Definition: vtkPoints.h:139
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:181
an ordered list of Props
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:66
represent surface properties of a 2D image
abstract specification for renderers
Definition: vtkRenderer.h:172
abstract specification for Viewports
Definition: vtkViewport.h:65
abstract class defines interface between the widget and widget representation classes
window superclass for vtkRenderWindow
Definition: vtkWindow.h:48
int vtkTypeBool
Definition: vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
#define VTK_MARSHALAUTO