VTK
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 "vtkInteractionWidgetsModule.h" // For export macro
47
49class vtkImageActor;
50class vtkPoints;
51class vtkCellArray;
52class vtkPolyData;
53class vtkProperty2D;
55class vtkActor2D;
56
57
58class VTKINTERACTIONWIDGETS_EXPORT vtkRectilinearWipeRepresentation : public vtkWidgetRepresentation
59{
60public:
65
67
71 void PrintSelf(ostream& os, vtkIndent indent);
73
75
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 virtual void BuildRepresentation();
115 virtual void StartWidgetInteraction(double eventPos[2]);
116 virtual void WidgetInteraction(double eventPos[2]);
117 virtual int ComputeInteractionState(int X, int Y, int modify=0);
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
132
137 virtual int RenderOverlay(vtkViewport *viewport);
138 virtual int RenderOpaqueGeometry(vtkViewport *viewport);
142
143protected:
146
147 // Instances that this class manipulates
150
151 // The pick tolerance of the widget in pixels
153
154 // This is used to track the beginning of interaction with the prop
155 double StartWipePosition[2];
156
157 // Indicates which part of widget is currently active based on the
158 // state of the instance of the vtkImageRectilinearWipe.
160
161 // Geometric structure of widget
162 vtkPoints *Points; // The nine points defining the widget geometry
163 vtkCellArray *Lines; // lines defining the boundary
168
169 // These are used to track the coordinates (in display coordinate system)
170 // of the mid-edge and center point of the widget
171 double DP4[3];
172 double DP5[3];
173 double DP6[3];
174 double DP7[3];
175 double DP8[3];
176
177 int Dims[3]; // Dimensions of the input image to the wipe
178 int I; //the i-j define the plane that is being displayed
179 int J;
180
181private:
183 void operator=(const vtkRectilinearWipeRepresentation&) VTK_DELETE_FUNCTION;
184};
185
186#endif
a actor that draws 2D data
Definition: vtkActor2D.h:46
object to represent cell connectivity
Definition: vtkCellArray.h:51
draw an image in a rendered 3D scene
Definition: vtkImageActor.h:50
make a rectilinear combination of two images.
a simple class to control print indentation
Definition: vtkIndent.h:40
represent and manipulate 3D points
Definition: vtkPoints.h:40
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
a list of Props
represent surface properties of a 2D image
Definition: vtkProperty2D.h:41
represent a vtkRectilinearWipeWidget
virtual void WidgetInteraction(double eventPos[2])
virtual int RenderOverlay(vtkViewport *viewport)
void SetRectilinearWipe(vtkImageRectilinearWipe *wipe)
Specify an instance of vtkImageRectilinearWipe to manipulate.
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport)
virtual int RenderOpaqueGeometry(vtkViewport *viewport)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
virtual void StartWidgetInteraction(double eventPos[2])
void SetImageActor(vtkImageActor *imageActor)
Specify an instance of vtkImageActor to decorate.
virtual int ComputeInteractionState(int X, int Y, int modify=0)
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual void BuildRepresentation()
Subclasses of vtkRectilinearWipeRepresentation must implement these methods.
virtual void GetActors2D(vtkPropCollection *)
Methods to make this class behave as a vtkProp.
static vtkRectilinearWipeRepresentation * New()
Instantiate this class.
virtual int HasTranslucentPolygonalGeometry()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
virtual void ReleaseGraphicsResources(vtkWindow *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
abstract specification for Viewports
Definition: vtkViewport.h:48
abstract class defines interface between the widget and widget representation classes
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35