VTK  9.4.20250130
vtkRectilinearWipeRepresentation.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
49#ifndef vtkRectilinearWipeRepresentation_h
50#define vtkRectilinearWipeRepresentation_h
51
52#include "vtkInteractionWidgetsModule.h" // For export macro
54#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
55
56VTK_ABI_NAMESPACE_BEGIN
58class vtkImageActor;
59class vtkPoints;
60class vtkCellArray;
61class vtkPolyData;
62class vtkProperty2D;
64class vtkActor2D;
65
66class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkRectilinearWipeRepresentation
68{
69public:
74
76
80 void PrintSelf(ostream& os, vtkIndent indent) override;
82
84
88 vtkGetObjectMacro(RectilinearWipe, vtkImageRectilinearWipe);
90
92
95 void SetImageActor(vtkImageActor* imageActor);
96 vtkGetObjectMacro(ImageActor, vtkImageActor);
98
100
105 vtkSetClampMacro(Tolerance, int, 1, 10);
106 vtkGetMacro(Tolerance, int);
108
110
114 vtkGetObjectMacro(Property, vtkProperty2D);
116
118
123 void BuildRepresentation() override;
124 void StartWidgetInteraction(double eventPos[2]) override;
125 void WidgetInteraction(double eventPos[2]) override;
126 int ComputeInteractionState(int X, int Y, int modify = 0) override;
128
129 // Enums define the state of the prop relative to the mouse pointer
130 // position. Used by ComputeInteractionState() to communicate with the
131 // widget.
133 {
134 Outside = 0,
137 MovingCenter
138 };
139
141
146 int RenderOverlay(vtkViewport* viewport) override;
147 int RenderOpaqueGeometry(vtkViewport* viewport) override;
151
152protected:
155
156 // Instances that this class manipulates
159
160 // The pick tolerance of the widget in pixels
162
163 // This is used to track the beginning of interaction with the prop
164 double StartWipePosition[2];
165
166 // Indicates which part of widget is currently active based on the
167 // state of the instance of the vtkImageRectilinearWipe.
169
170 // Geometric structure of widget
171 vtkPoints* Points; // The nine points defining the widget geometry
172 vtkCellArray* Lines; // lines defining the boundary
177
178 // These are used to track the coordinates (in display coordinate system)
179 // of the mid-edge and center point of the widget
180 double DP4[3];
181 double DP5[3];
182 double DP6[3];
183 double DP7[3];
184 double DP8[3];
185
186 int Dims[3]; // Dimensions of the input image to the wipe
187 int I; // the i-j define the plane that is being displayed
188 int J;
189
190private:
192 void operator=(const vtkRectilinearWipeRepresentation&) = delete;
193};
194
195VTK_ABI_NAMESPACE_END
196#endif
a actor that draws 2D data
Definition vtkActor2D.h:145
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:108
represent and manipulate 3D points
Definition vtkPoints.h:139
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
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: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
#define VTK_MARSHALAUTO