VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Widgets
vtkSeedRepresentation.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkSeedRepresentation.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
=========================================================================*/
30
#ifndef __vtkSeedRepresentation_h
31
#define __vtkSeedRepresentation_h
32
33
#include "
vtkWidgetRepresentation.h
"
34
35
class
vtkHandleList;
36
class
vtkHandleRepresentation
;
37
38
39
class
VTK_WIDGETS_EXPORT
vtkSeedRepresentation
:
public
vtkWidgetRepresentation
40
{
41
public
:
43
static
vtkSeedRepresentation
*
New
();
44
46
47
vtkTypeMacro(
vtkSeedRepresentation
,
vtkWidgetRepresentation
);
48
void
PrintSelf
(ostream& os,
vtkIndent
indent);
50
52
55
virtual
void
GetSeedWorldPosition(
unsigned
int
seedNum,
double
pos[3] );
56
virtual
void
SetSeedDisplayPosition(
unsigned
int
seedNum,
double
pos[3] );
57
virtual
void
GetSeedDisplayPosition(
unsigned
int
seedNum,
double
pos[3] );
59
61
int
GetNumberOfSeeds();
62
69
void
SetHandleRepresentation(
vtkHandleRepresentation
*handle );
70
74
vtkHandleRepresentation
*GetHandleRepresentation(
unsigned
int
num );
75
77
78
vtkHandleRepresentation
*GetHandleRepresentation()
79
{
80
return
this->HandleRepresentation;
81
};
83
85
88
vtkSetClampMacro( Tolerance,
int
, 1, 100 );
89
vtkGetMacro( Tolerance,
int
);
91
92
//BTX -- used to communicate about the state of the representation
93
enum
94
{
95
Outside = 0,
96
NearSeed
97
};
98
//ETX
99
101
103
virtual
int
GetActiveHandle();
104
// Returns the id of the seed created, -1 on failure. e is the display position.
105
virtual
int
CreateHandle(
double
e[2] );
106
// Delete last handle created
107
virtual
void
RemoveLastHandle();
108
// Delete the currently active handle
109
virtual
void
RemoveActiveHandle();
111
113
virtual
void
RemoveHandle(
int
n );
114
116
117
virtual
void
BuildRepresentation
();
118
virtual
int
ComputeInteractionState
(
int
X,
int
Y,
int
modify = 0 );
120
121
protected
:
122
vtkSeedRepresentation
();
123
~
vtkSeedRepresentation
();
124
125
// The handle and the rep used to close the handles
126
vtkHandleRepresentation
*
HandleRepresentation
;
127
vtkHandleList *
Handles
;
128
129
// Selection tolerance for the handles
130
int
Tolerance
;
131
132
// The active seed (handle) based on the last ComputeInteractionState()
133
int
ActiveHandle
;
134
135
private
:
136
vtkSeedRepresentation
(
const
vtkSeedRepresentation
&);
//Not implemented
137
void
operator=(
const
vtkSeedRepresentation
&);
//Not implemented
138
};
139
140
#endif
Generated on Wed May 30 2012 13:22:27 for VTK by
1.8.1