VTK
9.5.2
Main Page
Related Pages
Topics
Namespaces
Classes
Files
Examples
File List
File Members
Interaction
Widgets
vtkResliceCursorWidget.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2
// SPDX-License-Identifier: BSD-3-Clause
29
30
#ifndef vtkResliceCursorWidget_h
31
#define vtkResliceCursorWidget_h
32
33
#include "
vtkAbstractWidget.h
"
34
#include "vtkInteractionWidgetsModule.h"
// For export macro
35
#include "
vtkWrappingHints.h
"
// For VTK_MARSHALAUTO
36
37
VTK_ABI_NAMESPACE_BEGIN
38
class
vtkResliceCursorRepresentation
;
39
40
class
VTKINTERACTIONWIDGETS_EXPORT
VTK_MARSHALAUTO
vtkResliceCursorWidget
:
public
vtkAbstractWidget
41
{
42
public
:
46
static
vtkResliceCursorWidget
*
New
();
47
49
52
vtkTypeMacro(
vtkResliceCursorWidget
,
vtkAbstractWidget
);
53
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
55
61
void
SetRepresentation
(
vtkResliceCursorRepresentation
* r)
62
{
63
this->
Superclass::SetWidgetRepresentation
(
reinterpret_cast<
vtkWidgetRepresentation
*
>
(r));
64
}
65
69
vtkResliceCursorRepresentation
*
GetResliceCursorRepresentation
()
70
{
71
return
reinterpret_cast<
vtkResliceCursorRepresentation
*
>
(this->
WidgetRep
);
72
}
73
77
void
CreateDefaultRepresentation
()
override
;
78
84
void
SetEnabled
(
int
)
override
;
85
87
90
vtkSetMacro(
ManageWindowLevel
,
vtkTypeBool
);
91
vtkGetMacro(
ManageWindowLevel
,
vtkTypeBool
);
92
vtkBooleanMacro(
ManageWindowLevel
,
vtkTypeBool
);
94
98
enum
99
{
100
WindowLevelEvent
= 1055,
101
ResliceAxesChangedEvent
,
102
ResliceThicknessChangedEvent
,
103
ResetCursorEvent
104
};
105
109
virtual
void
ResetResliceCursor
();
110
111
protected
:
112
vtkResliceCursorWidget
();
113
~vtkResliceCursorWidget
()
override
;
114
115
// These are the callbacks for this widget
116
static
void
SelectAction
(
vtkAbstractWidget
*);
117
static
void
RotateAction
(
vtkAbstractWidget
*);
118
static
void
TranslateAction
(
vtkAbstractWidget
*);
119
static
void
EndSelectAction
(
vtkAbstractWidget
*);
120
static
void
ResizeThicknessAction
(
vtkAbstractWidget
*);
121
static
void
EndResizeThicknessAction
(
vtkAbstractWidget
*);
122
static
void
MoveAction
(
vtkAbstractWidget
*);
123
static
void
ResetResliceCursorAction
(
vtkAbstractWidget
*);
124
125
// helper methods for cursor management
126
void
SetCursor
(
int
state)
override
;
127
128
// Start Window Level
129
void
StartWindowLevel
();
130
131
// Invoke the appropriate event based on state
132
void
InvokeAnEvent
();
133
134
// Manage the state of the widget
135
int
WidgetState
;
136
enum
WidgetStateType
137
{
138
Start
= 0,
139
Active
140
};
141
142
// Keep track whether key modifier key is pressed
143
int
ModifierActive
;
144
vtkTypeBool
ManageWindowLevel
;
145
146
private
:
147
vtkResliceCursorWidget
(
const
vtkResliceCursorWidget
&) =
delete
;
148
void
operator=(
const
vtkResliceCursorWidget
&) =
delete
;
149
};
150
151
VTK_ABI_NAMESPACE_END
152
#endif
vtkAbstractWidget::vtkAbstractWidget
vtkAbstractWidget()
vtkAbstractWidget::SetWidgetRepresentation
void SetWidgetRepresentation(vtkWidgetRepresentation *r)
vtkAbstractWidget::WidgetRep
vtkWidgetRepresentation * WidgetRep
Definition
vtkAbstractWidget.h:168
vtkIndent
a simple class to control print indentation
Definition
vtkIndent.h:29
vtkResliceCursorRepresentation
represent the vtkResliceCursorWidget
Definition
vtkResliceCursorRepresentation.h:49
vtkResliceCursorWidget::ResliceThicknessChangedEvent
@ ResliceThicknessChangedEvent
Definition
vtkResliceCursorWidget.h:102
vtkResliceCursorWidget::ResetCursorEvent
@ ResetCursorEvent
Definition
vtkResliceCursorWidget.h:103
vtkResliceCursorWidget::ResliceAxesChangedEvent
@ ResliceAxesChangedEvent
Definition
vtkResliceCursorWidget.h:101
vtkResliceCursorWidget::WindowLevelEvent
@ WindowLevelEvent
Definition
vtkResliceCursorWidget.h:100
vtkResliceCursorWidget::New
static vtkResliceCursorWidget * New()
Instantiate this class.
vtkResliceCursorWidget::EndResizeThicknessAction
static void EndResizeThicknessAction(vtkAbstractWidget *)
vtkResliceCursorWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard VTK class macros.
vtkResliceCursorWidget::SetCursor
void SetCursor(int state) override
vtkResliceCursorWidget::CreateDefaultRepresentation
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
vtkResliceCursorWidget::WidgetStateType
WidgetStateType
Definition
vtkResliceCursorWidget.h:137
vtkResliceCursorWidget::Active
@ Active
Definition
vtkResliceCursorWidget.h:139
vtkResliceCursorWidget::Start
@ Start
Definition
vtkResliceCursorWidget.h:138
vtkResliceCursorWidget::ResetResliceCursorAction
static void ResetResliceCursorAction(vtkAbstractWidget *)
vtkResliceCursorWidget::ResetResliceCursor
virtual void ResetResliceCursor()
Reset the cursor back to its initial state.
vtkResliceCursorWidget::SetRepresentation
void SetRepresentation(vtkResliceCursorRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition
vtkResliceCursorWidget.h:61
vtkResliceCursorWidget::StartWindowLevel
void StartWindowLevel()
vtkResliceCursorWidget::ModifierActive
int ModifierActive
Definition
vtkResliceCursorWidget.h:143
vtkResliceCursorWidget::MoveAction
static void MoveAction(vtkAbstractWidget *)
vtkResliceCursorWidget::WidgetState
int WidgetState
Definition
vtkResliceCursorWidget.h:135
vtkResliceCursorWidget::SetEnabled
void SetEnabled(int) override
Methods for activating this widget.
vtkResliceCursorWidget::EndSelectAction
static void EndSelectAction(vtkAbstractWidget *)
vtkResliceCursorWidget::SelectAction
static void SelectAction(vtkAbstractWidget *)
vtkResliceCursorWidget::ResizeThicknessAction
static void ResizeThicknessAction(vtkAbstractWidget *)
vtkResliceCursorWidget::InvokeAnEvent
void InvokeAnEvent()
vtkResliceCursorWidget::GetResliceCursorRepresentation
vtkResliceCursorRepresentation * GetResliceCursorRepresentation()
Return the representation as a vtkResliceCursorRepresentation.
Definition
vtkResliceCursorWidget.h:69
vtkResliceCursorWidget::vtkResliceCursorWidget
vtkResliceCursorWidget()
vtkResliceCursorWidget::~vtkResliceCursorWidget
~vtkResliceCursorWidget() override
vtkResliceCursorWidget::RotateAction
static void RotateAction(vtkAbstractWidget *)
vtkResliceCursorWidget::ManageWindowLevel
vtkTypeBool ManageWindowLevel
Definition
vtkResliceCursorWidget.h:144
vtkResliceCursorWidget::TranslateAction
static void TranslateAction(vtkAbstractWidget *)
vtkWidgetRepresentation
abstract class defines interface between the widget and widget representation classes
Definition
vtkWidgetRepresentation.h:68
vtkTypeBool
int vtkTypeBool
Definition
vtkABI.h:64
vtkAbstractWidget.h
vtkWrappingHints.h
VTK_MARSHALAUTO
#define VTK_MARSHALAUTO
Definition
vtkWrappingHints.h:53
Generated on
for VTK by
1.15.0