VTK  9.2.6
vtkRectilinearWipeRepresentation.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkRectilinearWipeRepresentation.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=========================================================================*/
39#ifndef vtkRectilinearWipeRepresentation_h
40#define vtkRectilinearWipeRepresentation_h
41
42#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
43#include "vtkInteractionWidgetsModule.h" // For export macro
45
47class vtkImageActor;
48class vtkPoints;
49class vtkCellArray;
50class vtkPolyData;
51class vtkProperty2D;
53class vtkActor2D;
54
55class VTKINTERACTIONWIDGETS_EXPORT vtkRectilinearWipeRepresentation : public vtkWidgetRepresentation
56{
57public:
62
64
68 void PrintSelf(ostream& os, vtkIndent indent) override;
70
72
76 vtkGetObjectMacro(RectilinearWipe, vtkImageRectilinearWipe);
78
80
83 void SetImageActor(vtkImageActor* imageActor);
84 vtkGetObjectMacro(ImageActor, vtkImageActor);
86
88
93 vtkSetClampMacro(Tolerance, int, 1, 10);
94 vtkGetMacro(Tolerance, int);
96
98
102 vtkGetObjectMacro(Property, vtkProperty2D);
104
106
111 void BuildRepresentation() override;
112 void StartWidgetInteraction(double eventPos[2]) override;
113 void WidgetInteraction(double eventPos[2]) override;
114 int ComputeInteractionState(int X, int Y, int modify = 0) override;
116
117 // Enums define the state of the prop relative to the mouse pointer
118 // position. Used by ComputeInteractionState() to communicate with the
119 // widget.
121 {
122 Outside = 0,
125 MovingCenter
126 };
127#if !defined(VTK_LEGACY_REMOVE)
128 VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
130#endif
131
133
138 int RenderOverlay(vtkViewport* viewport) override;
139 int RenderOpaqueGeometry(vtkViewport* viewport) override;
143
144protected:
147
148 // Instances that this class manipulates
151
152 // The pick tolerance of the widget in pixels
154
155 // This is used to track the beginning of interaction with the prop
156 double StartWipePosition[2];
157
158 // Indicates which part of widget is currently active based on the
159 // state of the instance of the vtkImageRectilinearWipe.
161
162 // Geometric structure of widget
163 vtkPoints* Points; // The nine points defining the widget geometry
164 vtkCellArray* Lines; // lines defining the boundary
169
170 // These are used to track the coordinates (in display coordinate system)
171 // of the mid-edge and center point of the widget
172 double DP4[3];
173 double DP5[3];
174 double DP6[3];
175 double DP7[3];
176 double DP8[3];
177
178 int Dims[3]; // Dimensions of the input image to the wipe
179 int I; // the i-j define the plane that is being displayed
180 int J;
181
182private:
184 void operator=(const vtkRectilinearWipeRepresentation&) = delete;
185};
186
187#endif
a actor that draws 2D data
Definition vtkActor2D.h:40
object to represent cell connectivity
draw an image in a rendered 3D scene
make a rectilinear combination of two images.
a simple class to control print indentation
Definition vtkIndent.h:34
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:85
an ordered list of Props
represent surface properties of a 2D image
represent a vtkRectilinearWipeWidget
vtkTypeBool HasTranslucentPolygonalGeometry() override
Methods to make this class behave as a vtkProp.
void WidgetInteraction(double eventPos[2]) override
Subclasses of vtkRectilinearWipeRepresentation must implement these methods.
int RenderOpaqueGeometry(vtkViewport *viewport) override
Methods to make this class behave as a vtkProp.
int ComputeInteractionState(int X, int Y, int modify=0) override
Subclasses of vtkRectilinearWipeRepresentation must implement these methods.
int RenderOverlay(vtkViewport *viewport) override
Methods to make this class behave as a vtkProp.
void SetRectilinearWipe(vtkImageRectilinearWipe *wipe)
Specify an instance of vtkImageRectilinearWipe to manipulate.
void SetImageActor(vtkImageActor *imageActor)
Specify an instance of vtkImageActor to decorate.
void BuildRepresentation() override
Subclasses of vtkRectilinearWipeRepresentation must implement these methods.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.
static vtkRectilinearWipeRepresentation * New()
Instantiate this class.
void StartWidgetInteraction(double eventPos[2]) override
Subclasses of vtkRectilinearWipeRepresentation must implement these methods.
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
Methods to make this class behave as a vtkProp.
void GetActors2D(vtkPropCollection *) override
Methods to make this class behave as a vtkProp.
void ReleaseGraphicsResources(vtkWindow *) override
Methods to make this class behave as a vtkProp.
abstract specification for Viewports
Definition vtkViewport.h:50
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
#define VTK_DEPRECATED_IN_9_2_0(reason)