VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Widgets
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 "
vtkWidgetRepresentation.h
"
45
46
class
vtkImageRectilinearWipe
;
47
class
vtkImageActor
;
48
class
vtkPoints
;
49
class
vtkCellArray
;
50
class
vtkPolyData
;
51
class
vtkProperty2D
;
52
class
vtkPolyDataMapper2D
;
53
class
vtkActor2D
;
54
55
56
class
VTK_WIDGETS_EXPORT
vtkRectilinearWipeRepresentation
:
public
vtkWidgetRepresentation
57
{
58
public
:
60
static
vtkRectilinearWipeRepresentation
*
New
();
61
63
64
vtkTypeMacro(
vtkRectilinearWipeRepresentation
,
vtkWidgetRepresentation
);
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.
108
enum
_InteractionState
109
{
110
Outside=0,
111
MovingHPane
,
112
MovingVPane
,
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
:
128
vtkRectilinearWipeRepresentation
();
129
~
vtkRectilinearWipeRepresentation
();
130
131
// Instances that this class manipulates
132
vtkImageRectilinearWipe
*
RectilinearWipe
;
133
vtkImageActor
*
ImageActor
;
134
135
// The pick tolerance of the widget in pixels
136
int
Tolerance
;
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.
143
int
ActiveParts
;
144
145
// Geometric structure of widget
146
vtkPoints
*
Points
;
// The nine points defining the widget geometry
147
vtkCellArray
*
Lines
;
// lines defining the boundary
148
vtkPolyData
*
Wipe
;
149
vtkPolyDataMapper2D
*
WipeMapper
;
150
vtkActor2D
*
WipeActor
;
151
vtkProperty2D
*
Property
;
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
:
166
vtkRectilinearWipeRepresentation
(
const
vtkRectilinearWipeRepresentation
&);
//Not implemented
167
void
operator=(
const
vtkRectilinearWipeRepresentation
&);
//Not implemented
168
};
169
170
#endif
Generated on Fri Aug 2 2013 12:20:04 for VTK by
1.8.4