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 
36 class vtkPropCollection;
37 class vtkPoints;
38 class vtkPolyData;
40 class vtkActor2D;
41 class vtkProperty2D;
42 
43 class VTKINTERACTIONWIDGETS_EXPORT vtkMagnifierRepresentation : public vtkWidgetRepresentation
44 {
45 public:
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; }
90  void RemoveAllViewProps(void);
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 
156  int RenderOverlay(vtkViewport*) override;
161 
166  vtkMTimeType GetMTime() override;
167 
168 protected:
171 
172  // Ivars
175  int Size[2];
176  bool Border;
178 
179  // The internal magnification renderer and supporting classes
183 
184  // Border representation.
189 
190 private:
192  void operator=(const vtkMagnifierRepresentation&) = delete;
193 };
194 
195 #endif
a actor that draws 2D data
Definition: vtkActor2D.h:40
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
Definition: vtkCoordinate.h:77
a simple class to control print indentation
Definition: vtkIndent.h:34
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).
_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).
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:34
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
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:38
abstract specification for renderers
Definition: vtkRenderer.h:73
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:39
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287