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 =========================================================================*/
41 #ifndef vtkRectilinearWipeRepresentation_h
42 #define vtkRectilinearWipeRepresentation_h
43 
44 #include "vtkInteractionWidgetsModule.h" // For export macro
46 
48 class vtkImageActor;
49 class vtkPoints;
50 class vtkCellArray;
51 class vtkPolyData;
52 class vtkProperty2D;
54 class vtkActor2D;
55 
56 
58 {
59 public:
62 
64 
66  void PrintSelf(ostream& os, vtkIndent indent);
68 
70 
71  void SetRectilinearWipe(vtkImageRectilinearWipe *wipe);
72  vtkGetObjectMacro(RectilinearWipe,vtkImageRectilinearWipe);
74 
76 
77  void SetImageActor(vtkImageActor *imageActor);
78  vtkGetObjectMacro(ImageActor,vtkImageActor);
80 
82 
85  vtkSetClampMacro(Tolerance,int,1,10);
86  vtkGetMacro(Tolerance,int);
88 
90 
92  vtkGetObjectMacro(Property,vtkProperty2D);
94 
96 
99  virtual void BuildRepresentation();
100  virtual void StartWidgetInteraction(double eventPos[2]);
101  virtual void WidgetInteraction(double eventPos[2]);
102  virtual int ComputeInteractionState(int X, int Y, int modify=0);
104 
105 //BTX
106  // Enums define the state of the prop relative to the mouse pointer
107  // position. Used by ComputeInteractionState() to communicate with the
108  // widget.
110  {
111  Outside=0,
114  MovingCenter
115  };
116 //ETX
117 
119 
120  virtual void GetActors2D(vtkPropCollection *);
121  virtual void ReleaseGraphicsResources(vtkWindow *);
122  virtual int RenderOverlay(vtkViewport *viewport);
123  virtual int RenderOpaqueGeometry(vtkViewport *viewport);
124  virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport);
125  virtual int HasTranslucentPolygonalGeometry();
127 
128 protected:
131 
132  // Instances that this class manipulates
135 
136  // The pick tolerance of the widget in pixels
138 
139  // This is used to track the beginning of interaction with the prop
140  double StartWipePosition[2];
141 
142  // Indicates which part of widget is currently active based on the
143  // state of the instance of the vtkImageRectilinearWipe.
145 
146  // Geometric structure of widget
147  vtkPoints *Points; // The nine points defining the widget geometry
148  vtkCellArray *Lines; // lines defining the boundary
153 
154  // These are used to track the coordinates (in display coordinate system)
155  // of the mid-edge and center point of the widget
156  double DP4[3];
157  double DP5[3];
158  double DP6[3];
159  double DP7[3];
160  double DP8[3];
161 
162  int Dims[3]; // Dimensions of the input image to the wipe
163  int I; //the i-j define the plane that is being displayed
164  int J;
165 
166 private:
168  void operator=(const vtkRectilinearWipeRepresentation&); //Not implemented
169 };
170 
171 #endif
virtual int RenderOverlay(vtkViewport *vtkNotUsed(viewport))
virtual int ComputeInteractionState(int X, int Y, int modify=0)
abstract specification for Viewports
Definition: vtkViewport.h:46
virtual void StartWidgetInteraction(double eventPos[2])
a actor that draws 2D data
Definition: vtkActor2D.h:44
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
virtual void ReleaseGraphicsResources(vtkWindow *)
abstract class defines interface between the widget and widget representation classes ...
virtual void BuildRepresentation()=0
a list of Props
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
#define VTKINTERACTIONWIDGETS_EXPORT
draw an image in a rendered 3D scene
Definition: vtkImageActor.h:48
virtual int HasTranslucentPolygonalGeometry()
a simple class to control print indentation
Definition: vtkIndent.h:38
make a rectilinear combination of two images.
virtual void WidgetInteraction(double newEventPos[2])
object to represent cell connectivity
Definition: vtkCellArray.h:49
virtual int RenderOpaqueGeometry(vtkViewport *vtkNotUsed(viewport))
virtual void GetActors2D(vtkPropCollection *)
represent surface properties of a 2D image
Definition: vtkProperty2D.h:39
void PrintSelf(ostream &os, vtkIndent indent)
static vtkObject * New()
represent a vtkRectilinearWipeWidget
virtual int RenderTranslucentPolygonalGeometry(vtkViewport *vtkNotUsed(viewport))
draw vtkPolyData onto the image plane
represent and manipulate 3D points
Definition: vtkPoints.h:38