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 
45 
47 class vtkImageActor;
48 class vtkPoints;
49 class vtkCellArray;
50 class vtkPolyData;
51 class vtkProperty2D;
53 class vtkActor2D;
54 
55 
57 {
58 public:
61 
63 
65  void PrintSelf(ostream& os, vtkIndent indent);
67 
69 
70  void SetRectilinearWipe(vtkImageRectilinearWipe *wipe);
71  vtkGetObjectMacro(RectilinearWipe,vtkImageRectilinearWipe);
73 
75 
76  void SetImageActor(vtkImageActor *imageActor);
77  vtkGetObjectMacro(ImageActor,vtkImageActor);
79 
81 
84  vtkSetClampMacro(Tolerance,int,1,10);
85  vtkGetMacro(Tolerance,int);
87 
89 
91  vtkGetObjectMacro(Property,vtkProperty2D);
93 
95 
98  virtual void BuildRepresentation();
99  virtual void StartWidgetInteraction(double eventPos[2]);
100  virtual void WidgetInteraction(double eventPos[2]);
101  virtual int ComputeInteractionState(int X, int Y, int modify=0);
103 
104 //BTX
105  // Enums define the state of the prop relative to the mouse pointer
106  // position. Used by ComputeInteractionState() to communicate with the
107  // widget.
109  {
110  Outside=0,
113  MovingCenter
114  };
115 //ETX
116 
118 
119  virtual void GetActors2D(vtkPropCollection *);
120  virtual void ReleaseGraphicsResources(vtkWindow *);
121  virtual int RenderOverlay(vtkViewport *viewport);
122  virtual int RenderOpaqueGeometry(vtkViewport *viewport);
123  virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport);
124  virtual int HasTranslucentPolygonalGeometry();
126 
127 protected:
130 
131  // Instances that this class manipulates
134 
135  // The pick tolerance of the widget in pixels
137 
138  // This is used to track the beginning of interaction with the prop
139  double StartWipePosition[2];
140 
141  // Indicates which part of widget is currently active based on the
142  // state of the instance of the vtkImageRectilinearWipe.
144 
145  // Geometric structure of widget
146  vtkPoints *Points; // The nine points defining the widget geometry
147  vtkCellArray *Lines; // lines defining the boundary
152 
153  // These are used to track the coordinates (in display coordinate system)
154  // of the mid-edge and center point of the widget
155  double DP4[3];
156  double DP5[3];
157  double DP6[3];
158  double DP7[3];
159  double DP8[3];
160 
161  int Dims[3]; // Dimensions of the input image to the wipe
162  int I; //the i-j define the plane that is being displayed
163  int J;
164 
165 private:
167  void operator=(const vtkRectilinearWipeRepresentation&); //Not implemented
168 };
169 
170 #endif
virtual int RenderOverlay(vtkViewport *vtkNotUsed(viewport))
virtual int ComputeInteractionState(int X, int Y, int modify=0)
abstract specification for Viewports
Definition: vtkViewport.h:45
virtual void StartWidgetInteraction(double eventPos[2])
a actor that draws 2D data
Definition: vtkActor2D.h:43
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:81
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:35
draw an image (data & properties) in a rendered 3D scene
Definition: vtkImageActor.h:49
virtual int HasTranslucentPolygonalGeometry()
a simple class to control print indentation
Definition: vtkIndent.h:37
make a rectilinear combination of two images.
virtual void WidgetInteraction(double newEventPos[2])
#define VTK_WIDGETS_EXPORT
object to represent cell connectivity
Definition: vtkCellArray.h:48
virtual int RenderOpaqueGeometry(vtkViewport *vtkNotUsed(viewport))
virtual void GetActors2D(vtkPropCollection *)
represent surface properties of a 2D image
Definition: vtkProperty2D.h:38
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