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 =========================================================================*/
42 #ifndef vtkRectilinearWipeRepresentation_h
43 #define vtkRectilinearWipeRepresentation_h
44 
45 #include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
46 #include "vtkInteractionWidgetsModule.h" // For export macro
48 
50 class vtkImageActor;
51 class vtkPoints;
52 class vtkCellArray;
53 class vtkPolyData;
54 class vtkProperty2D;
56 class vtkActor2D;
57 
58 class VTKINTERACTIONWIDGETS_EXPORT vtkRectilinearWipeRepresentation : public vtkWidgetRepresentation
59 {
60 public:
65 
67 
71  void PrintSelf(ostream& os, vtkIndent indent) override;
73 
75 
78  void SetRectilinearWipe(vtkImageRectilinearWipe* wipe);
79  vtkGetObjectMacro(RectilinearWipe, vtkImageRectilinearWipe);
81 
83 
86  void SetImageActor(vtkImageActor* imageActor);
87  vtkGetObjectMacro(ImageActor, vtkImageActor);
89 
91 
96  vtkSetClampMacro(Tolerance, int, 1, 10);
97  vtkGetMacro(Tolerance, int);
99 
101 
105  vtkGetObjectMacro(Property, vtkProperty2D);
107 
109 
114  void BuildRepresentation() override;
115  void StartWidgetInteraction(double eventPos[2]) override;
116  void WidgetInteraction(double eventPos[2]) override;
117  int ComputeInteractionState(int X, int Y, int modify = 0) override;
119 
120  // Enums define the state of the prop relative to the mouse pointer
121  // position. Used by ComputeInteractionState() to communicate with the
122  // widget.
124  {
125  Outside = 0,
128  MovingCenter
129  };
130 #if !defined(VTK_LEGACY_REMOVE)
131  VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
133 #endif
134 
136 
139  void GetActors2D(vtkPropCollection*) override;
140  void ReleaseGraphicsResources(vtkWindow*) override;
141  int RenderOverlay(vtkViewport* viewport) override;
142  int RenderOpaqueGeometry(vtkViewport* viewport) override;
143  int RenderTranslucentPolygonalGeometry(vtkViewport* viewport) override;
146 
147 protected:
150 
151  // Instances that this class manipulates
154 
155  // The pick tolerance of the widget in pixels
157 
158  // This is used to track the beginning of interaction with the prop
159  double StartWipePosition[2];
160 
161  // Indicates which part of widget is currently active based on the
162  // state of the instance of the vtkImageRectilinearWipe.
164 
165  // Geometric structure of widget
166  vtkPoints* Points; // The nine points defining the widget geometry
167  vtkCellArray* Lines; // lines defining the boundary
172 
173  // These are used to track the coordinates (in display coordinate system)
174  // of the mid-edge and center point of the widget
175  double DP4[3];
176  double DP5[3];
177  double DP6[3];
178  double DP7[3];
179  double DP8[3];
180 
181  int Dims[3]; // Dimensions of the input image to the wipe
182  int I; // the i-j define the plane that is being displayed
183  int J;
184 
185 private:
187  void operator=(const vtkRectilinearWipeRepresentation&) = delete;
188 };
189 
190 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.
virtual int ComputeInteractionState(int X, int Y, int modify=0)
abstract specification for Viewports
Definition: vtkViewport.h:55
void GetActors2D(vtkPropCollection *) override
virtual void StartWidgetInteraction(double eventPos[2])
#define VTK_DEPRECATED_IN_9_2_0(reason)
a actor that draws 2D data
Definition: vtkActor2D.h:45
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.
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
draw an image in a rendered 3D scene
Definition: vtkImageActor.h:48
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...
make a rectilinear combination of two images.
virtual void WidgetInteraction(double newEventPos[2])
int RenderOpaqueGeometry(vtkViewport *vtkNotUsed(viewport)) override
int RenderOverlay(vtkViewport *vtkNotUsed(viewport)) override
object to represent cell connectivity
Definition: vtkCellArray.h:186
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
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
represent a vtkRectilinearWipeWidget
draw vtkPolyData onto the image plane
represent and manipulate 3D points
Definition: vtkPoints.h:39