VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Interaction
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 "vtkInteractionWidgetsModule.h"
// For export macro
45
#include "
vtkWidgetRepresentation.h
"
46
47
class
vtkImageRectilinearWipe
;
48
class
vtkImageActor
;
49
class
vtkPoints
;
50
class
vtkCellArray
;
51
class
vtkPolyData
;
52
class
vtkProperty2D
;
53
class
vtkPolyDataMapper2D
;
54
class
vtkActor2D
;
55
56
57
class
VTKINTERACTIONWIDGETS_EXPORT
vtkRectilinearWipeRepresentation
:
public
vtkWidgetRepresentation
58
{
59
public
:
61
static
vtkRectilinearWipeRepresentation
*
New
();
62
64
65
vtkTypeMacro(
vtkRectilinearWipeRepresentation
,
vtkWidgetRepresentation
);
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.
109
enum
_InteractionState
110
{
111
Outside=0,
112
MovingHPane
,
113
MovingVPane
,
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
:
129
vtkRectilinearWipeRepresentation
();
130
~
vtkRectilinearWipeRepresentation
();
131
132
// Instances that this class manipulates
133
vtkImageRectilinearWipe
*
RectilinearWipe
;
134
vtkImageActor
*
ImageActor
;
135
136
// The pick tolerance of the widget in pixels
137
int
Tolerance
;
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.
144
int
ActiveParts
;
145
146
// Geometric structure of widget
147
vtkPoints
*
Points
;
// The nine points defining the widget geometry
148
vtkCellArray
*
Lines
;
// lines defining the boundary
149
vtkPolyData
*
Wipe
;
150
vtkPolyDataMapper2D
*
WipeMapper
;
151
vtkActor2D
*
WipeActor
;
152
vtkProperty2D
*
Property
;
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
:
167
vtkRectilinearWipeRepresentation
(
const
vtkRectilinearWipeRepresentation
&);
//Not implemented
168
void
operator=(
const
vtkRectilinearWipeRepresentation
&);
//Not implemented
169
};
170
171
#endif
Generated on Thu May 24 2012 22:22:28 for VTK by
1.8.1