VTK  9.1.0
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 =========================================================================*/
58 #ifndef vtkRectilinearWipeRepresentation_h
59 #define vtkRectilinearWipeRepresentation_h
60 
61 #include "vtkInteractionWidgetsModule.h" // For export macro
63 
65 class vtkImageActor;
66 class vtkPoints;
67 class vtkCellArray;
68 class vtkPolyData;
69 class vtkProperty2D;
71 class vtkActor2D;
72 
73 class VTKINTERACTIONWIDGETS_EXPORT vtkRectilinearWipeRepresentation : public vtkWidgetRepresentation
74 {
75 public:
80 
82 
86  void PrintSelf(ostream& os, vtkIndent indent) override;
88 
90 
94  vtkGetObjectMacro(RectilinearWipe, vtkImageRectilinearWipe);
96 
98 
101  void SetImageActor(vtkImageActor* imageActor);
102  vtkGetObjectMacro(ImageActor, vtkImageActor);
104 
106 
111  vtkSetClampMacro(Tolerance, int, 1, 10);
112  vtkGetMacro(Tolerance, int);
114 
116 
120  vtkGetObjectMacro(Property, vtkProperty2D);
122 
124 
129  void BuildRepresentation() override;
130  void StartWidgetInteraction(double eventPos[2]) override;
131  void WidgetInteraction(double eventPos[2]) override;
132  int ComputeInteractionState(int X, int Y, int modify = 0) override;
134 
135  // Enums define the state of the prop relative to the mouse pointer
136  // position. Used by ComputeInteractionState() to communicate with the
137  // widget.
139  {
140  Outside = 0,
143  MovingCenter
144  };
145 
147 
152  int RenderOverlay(vtkViewport* viewport) override;
153  int RenderOpaqueGeometry(vtkViewport* viewport) override;
157 
158 protected:
161 
162  // Instances that this class manipulates
165 
166  // The pick tolerance of the widget in pixels
168 
169  // This is used to track the beginning of interaction with the prop
170  double StartWipePosition[2];
171 
172  // Indicates which part of widget is currently active based on the
173  // state of the instance of the vtkImageRectilinearWipe.
175 
176  // Geometric structure of widget
177  vtkPoints* Points; // The nine points defining the widget geometry
178  vtkCellArray* Lines; // lines defining the boundary
183 
184  // These are used to track the coordinates (in display coordinate system)
185  // of the mid-edge and center point of the widget
186  double DP4[3];
187  double DP5[3];
188  double DP6[3];
189  double DP7[3];
190  double DP8[3];
191 
192  int Dims[3]; // Dimensions of the input image to the wipe
193  int I; // the i-j define the plane that is being displayed
194  int J;
195 
196 private:
198  void operator=(const vtkRectilinearWipeRepresentation&) = delete;
199 };
200 
201 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:143
vtkWidgetRepresentation.h
vtkRectilinearWipeRepresentation::StartWidgetInteraction
void StartWidgetInteraction(double eventPos[2]) override
Subclasses of vtkRectilinearWipeRepresentation must implement these methods.
vtkPolyDataMapper2D
draw vtkPolyData onto the image plane
Definition: vtkPolyDataMapper2D.h:154
vtkRectilinearWipeRepresentation::WipeActor
vtkActor2D * WipeActor
Definition: vtkRectilinearWipeRepresentation.h:181
vtkRectilinearWipeRepresentation
represent a vtkRectilinearWipeWidget
Definition: vtkRectilinearWipeRepresentation.h:74
vtkRectilinearWipeRepresentation::SetImageActor
void SetImageActor(vtkImageActor *imageActor)
Specify an instance of vtkImageActor to decorate.
vtkRectilinearWipeRepresentation::ComputeInteractionState
int ComputeInteractionState(int X, int Y, int modify=0) override
Subclasses of vtkRectilinearWipeRepresentation must implement these methods.
vtkWidgetRepresentation
abstract class defines interface between the widget and widget representation classes
Definition: vtkWidgetRepresentation.h:60
vtkImageRectilinearWipe
make a rectilinear combination of two images.
Definition: vtkImageRectilinearWipe.h:81
vtkRectilinearWipeRepresentation::ActiveParts
int ActiveParts
Definition: vtkRectilinearWipeRepresentation.h:174
vtkRectilinearWipeRepresentation::WidgetInteraction
void WidgetInteraction(double eventPos[2]) override
Subclasses of vtkRectilinearWipeRepresentation must implement these methods.
vtkRectilinearWipeRepresentation::BuildRepresentation
void BuildRepresentation() override
Subclasses of vtkRectilinearWipeRepresentation must implement these methods.
vtkRectilinearWipeRepresentation::HasTranslucentPolygonalGeometry
vtkTypeBool HasTranslucentPolygonalGeometry() override
Methods to make this class behave as a vtkProp.
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:39
vtkRectilinearWipeRepresentation::RectilinearWipe
vtkImageRectilinearWipe * RectilinearWipe
Definition: vtkRectilinearWipeRepresentation.h:163
vtkRectilinearWipeRepresentation::Points
vtkPoints * Points
Definition: vtkRectilinearWipeRepresentation.h:177
vtkRectilinearWipeRepresentation::ImageActor
vtkImageActor * ImageActor
Definition: vtkRectilinearWipeRepresentation.h:164
vtkRectilinearWipeRepresentation::WipeMapper
vtkPolyDataMapper2D * WipeMapper
Definition: vtkRectilinearWipeRepresentation.h:180
vtkRectilinearWipeRepresentation::MovingHPane
@ MovingHPane
Definition: vtkRectilinearWipeRepresentation.h:141
vtkRectilinearWipeRepresentation::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *) override
Methods to make this class behave as a vtkProp.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkRectilinearWipeRepresentation::New
static vtkRectilinearWipeRepresentation * New()
Instantiate this class.
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:290
vtkRectilinearWipeRepresentation::MovingVPane
@ MovingVPane
Definition: vtkRectilinearWipeRepresentation.h:142
vtkRectilinearWipeRepresentation::Property
vtkProperty2D * Property
Definition: vtkRectilinearWipeRepresentation.h:182
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:47
vtkRectilinearWipeRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.
vtkRectilinearWipeRepresentation::_InteractionState
_InteractionState
Definition: vtkRectilinearWipeRepresentation.h:139
vtkRectilinearWipeRepresentation::GetActors2D
void GetActors2D(vtkPropCollection *) override
Methods to make this class behave as a vtkProp.
vtkRectilinearWipeRepresentation::RenderTranslucentPolygonalGeometry
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
Methods to make this class behave as a vtkProp.
vtkProperty2D
represent surface properties of a 2D image
Definition: vtkProperty2D.h:147
vtkActor2D
a actor that draws 2D data
Definition: vtkActor2D.h:149
vtkRectilinearWipeRepresentation::RenderOpaqueGeometry
int RenderOpaqueGeometry(vtkViewport *viewport) override
Methods to make this class behave as a vtkProp.
vtkRectilinearWipeRepresentation::J
int J
Definition: vtkRectilinearWipeRepresentation.h:194
vtkRectilinearWipeRepresentation::SetRectilinearWipe
void SetRectilinearWipe(vtkImageRectilinearWipe *wipe)
Specify an instance of vtkImageRectilinearWipe to manipulate.
vtkRectilinearWipeRepresentation::I
int I
Definition: vtkRectilinearWipeRepresentation.h:193
vtkRectilinearWipeRepresentation::vtkRectilinearWipeRepresentation
vtkRectilinearWipeRepresentation()
vtkRectilinearWipeRepresentation::Lines
vtkCellArray * Lines
Definition: vtkRectilinearWipeRepresentation.h:178
vtkRectilinearWipeRepresentation::RenderOverlay
int RenderOverlay(vtkViewport *viewport) override
Methods to make this class behave as a vtkProp.
vtkImageActor
draw an image in a rendered 3D scene
Definition: vtkImageActor.h:152
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
vtkRectilinearWipeRepresentation::~vtkRectilinearWipeRepresentation
~vtkRectilinearWipeRepresentation() override
vtkPropCollection
an ordered list of Props
Definition: vtkPropCollection.h:85
vtkRectilinearWipeRepresentation::Wipe
vtkPolyData * Wipe
Definition: vtkRectilinearWipeRepresentation.h:179
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkRectilinearWipeRepresentation::Tolerance
int Tolerance
Definition: vtkRectilinearWipeRepresentation.h:167