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
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:143
vtkMagnifierRepresentation::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *) override
These methods are necessary to make this representation behave as a vtkProp.
vtkWidgetRepresentation.h
vtkMagnifierRepresentation::MagnificationRenderer
vtkRenderer * MagnificationRenderer
Definition: vtkMagnifierRepresentation.h:180
vtkMagnifierRepresentation::New
static vtkMagnifierRepresentation * New()
Instantiate this class.
vtkPolyDataMapper2D
draw vtkPolyData onto the image plane
Definition: vtkPolyDataMapper2D.h:154
vtkMagnifierRepresentation::Border
bool Border
Definition: vtkMagnifierRepresentation.h:176
vtkMagnifierRepresentation::SetRenderer
void SetRenderer(vtkRenderer *ren) override
Specify the renderer viewport in which to place the magnifier.
Definition: vtkMagnifierRepresentation.h:63
vtkMagnifierRepresentation::HasViewProp
int HasViewProp(vtkProp *)
Optionally specify and maintain the list of view props (e.g., actors, volumes, etc).
vtkMagnifierRepresentation::GetMagnificationRenderer
vtkRenderer * GetMagnificationRenderer()
Provide access to the magnification renderer.
Definition: vtkMagnifierRepresentation.h:148
vtkMagnifierRepresentation::BorderPolyData
vtkPolyData * BorderPolyData
Definition: vtkMagnifierRepresentation.h:186
vtkMagnifierRepresentation::BuildRepresentation
void BuildRepresentation() override
Subclasses should implement these methods.
vtkMagnifierRepresentation::BorderMapper
vtkPolyDataMapper2D * BorderMapper
Definition: vtkMagnifierRepresentation.h:187
vtkMagnifierRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Define standard methods.
vtkWidgetRepresentation
abstract class defines interface between the widget and widget representation classes
Definition: vtkWidgetRepresentation.h:60
vtkMagnifierRepresentation::MagnificationFactor
double MagnificationFactor
Definition: vtkMagnifierRepresentation.h:173
vtkMagnifierRepresentation::BorderProperty
vtkProperty2D * BorderProperty
Definition: vtkMagnifierRepresentation.h:177
vtkMagnifierRepresentation::Props
vtkPropCollection * Props
Definition: vtkMagnifierRepresentation.h:174
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:39
vtkMagnifierRepresentation::~vtkMagnifierRepresentation
~vtkMagnifierRepresentation() override
vtkMagnifierRepresentation::AddViewProp
void AddViewProp(vtkProp *)
Optionally specify and maintain the list of view props (e.g., actors, volumes, etc).
vtkMagnifierRepresentation::vtkMagnifierRepresentation
vtkMagnifierRepresentation()
vtkMagnifierRepresentation::RenderTranslucentPolygonalGeometry
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
These methods are necessary to make this representation behave as a vtkProp.
vtkMagnifierRepresentation::HasTranslucentPolygonalGeometry
vtkTypeBool HasTranslucentPolygonalGeometry() override
These methods are necessary to make this representation behave as a vtkProp.
vtkMagnifierRepresentation::_InteractionState
_InteractionState
Define the various states that the representation can be in.
Definition: vtkMagnifierRepresentation.h:122
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkMagnifierRepresentation::RenderOverlay
int RenderOverlay(vtkViewport *) override
These methods are necessary to make this representation behave as a vtkProp.
vtkMagnifierRepresentation::RenderOpaqueGeometry
int RenderOpaqueGeometry(vtkViewport *) override
These methods are necessary to make this representation behave as a vtkProp.
vtkCoordinate
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
Definition: vtkCoordinate.h:186
vtkMagnifierRepresentation::RemoveAllViewProps
void RemoveAllViewProps(void)
Optionally specify and maintain the list of view props (e.g., actors, volumes, etc).
vtkMagnifierRepresentation
represent a vtkBorderWidget
Definition: vtkMagnifierRepresentation.h:44
vtkMagnifierRepresentation::WidgetInteraction
void WidgetInteraction(double eventPos[2]) override
Subclasses should implement these methods.
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:47
vtkMagnifierRepresentation::Coordinate
vtkCoordinate * Coordinate
Definition: vtkMagnifierRepresentation.h:181
vtkCoordinate.h
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:76
vtkProperty2D
represent surface properties of a 2D image
Definition: vtkProperty2D.h:147
vtkActor2D
a actor that draws 2D data
Definition: vtkActor2D.h:149
vtkMagnifierRepresentation::BorderActor
vtkActor2D * BorderActor
Definition: vtkMagnifierRepresentation.h:188
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:182
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
vtkMagnifierRepresentation::RemoveViewProp
void RemoveViewProp(vtkProp *)
Optionally specify and maintain the list of view props (e.g., actors, volumes, etc).
vtkMagnifierRepresentation::InsideRenderer
bool InsideRenderer
Definition: vtkMagnifierRepresentation.h:182
vtkMagnifierRepresentation::GetMTime
vtkMTimeType GetMTime() override
Return the MTime of this object.
vtkPropCollection
an ordered list of Props
Definition: vtkPropCollection.h:85
vtkMagnifierRepresentation::GetViewProps
vtkPropCollection * GetViewProps()
Optionally specify and maintain the list of view props (e.g., actors, volumes, etc).
Definition: vtkMagnifierRepresentation.h:87
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
vtkMagnifierRepresentation::BorderPoints
vtkPoints * BorderPoints
Definition: vtkMagnifierRepresentation.h:185