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 =========================================================================*/
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 
40 class vtkPropCollection;
41 class vtkPoints;
42 class vtkPolyData;
44 class vtkActor2D;
45 class vtkProperty2D;
46 
47 class VTKINTERACTIONWIDGETS_EXPORT vtkMagnifierRepresentation : public vtkWidgetRepresentation
48 {
49 public:
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 
90  void AddViewProp(vtkProp*);
91  vtkPropCollection* GetViewProps() { return this->Props; }
92  int HasViewProp(vtkProp*);
93  void RemoveViewProp(vtkProp*);
94  void RemoveAllViewProps(void);
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 
163  void ReleaseGraphicsResources(vtkWindow*) override;
164  int RenderOverlay(vtkViewport*) override;
165  int RenderOpaqueGeometry(vtkViewport*) override;
169 
174  vtkMTimeType GetMTime() override;
175 
176 protected:
178  ~vtkMagnifierRepresentation() override;
179 
180  // Ivars
183  int Size[2];
184  bool Border;
186 
187  // The internal magnification renderer and supporting classes
191 
192  // Border representation.
197 
198 private:
200  void operator=(const vtkMagnifierRepresentation&) = delete;
201 };
202 
203 #endif
represent a vtkBorderWidget
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:56
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
abstract specification for Viewports
Definition: vtkViewport.h:55
#define VTK_DEPRECATED_IN_9_2_0(reason)
a actor that draws 2D data
Definition: vtkActor2D.h:45
vtkPropCollection * GetViewProps()
Optionally specify and maintain the list of view props (e.g., actors, volumes, etc).
abstract specification for renderers
Definition: vtkRenderer.h:72
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:90
abstract class defines interface between the widget and widget representation classes ...
virtual void BuildRepresentation()=0
Subclasses of vtkWidgetRepresentation must implement these methods.
InteractionStateType
Define the various states that the representation can be in.
an ordered list of Props
int vtkTypeBool
Definition: vtkABI.h:69
window superclass for vtkRenderWindow
Definition: vtkWindow.h:38
int RenderTranslucentPolygonalGeometry(vtkViewport *vtkNotUsed(viewport)) override
a simple class to control print indentation
Definition: vtkIndent.h:39
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
virtual vtkMTimeType GetMTime()
Return this object's modified time.
virtual void WidgetInteraction(double newEventPos[2])
int RenderOpaqueGeometry(vtkViewport *vtkNotUsed(viewport)) override
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems ...
Definition: vtkCoordinate.h:79
int RenderOverlay(vtkViewport *vtkNotUsed(viewport)) override
vtkTypeBool HasTranslucentPolygonalGeometry() override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
represent surface properties of a 2D image
Definition: vtkProperty2D.h:40
vtkRenderer * GetMagnificationRenderer()
Provide access to the magnification renderer.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
draw vtkPolyData onto the image plane
represent and manipulate 3D points
Definition: vtkPoints.h:39
void SetRenderer(vtkRenderer *ren) override
Specify the renderer viewport in which to place the magnifier.