VTK
9.4.20250201
Main Page
Related Pages
Modules
Namespaces
Classes
Files
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
33
#ifndef vtkResliceCursorWidget_h
34
#define vtkResliceCursorWidget_h
35
36
#include "
vtkAbstractWidget.h
"
37
#include "vtkInteractionWidgetsModule.h"
// For export macro
38
#include "
vtkWrappingHints.h
"
// For VTK_MARSHALAUTO
39
40
VTK_ABI_NAMESPACE_BEGIN
41
class
vtkResliceCursorRepresentation
;
42
43
class
VTKINTERACTIONWIDGETS_EXPORT
VTK_MARSHALAUTO
vtkResliceCursorWidget
:
public
vtkAbstractWidget
44
{
45
public
:
49
static
vtkResliceCursorWidget
*
New
();
50
52
55
vtkTypeMacro(
vtkResliceCursorWidget
,
vtkAbstractWidget
);
56
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
58
64
void
SetRepresentation
(
vtkResliceCursorRepresentation
* r)
65
{
66
this->Superclass::SetWidgetRepresentation(
reinterpret_cast<
vtkWidgetRepresentation
*
>
(r));
67
}
68
72
vtkResliceCursorRepresentation
*
GetResliceCursorRepresentation
()
73
{
74
return
reinterpret_cast<
vtkResliceCursorRepresentation
*
>
(this->
WidgetRep
);
75
}
76
80
void
CreateDefaultRepresentation
()
override
;
81
87
void
SetEnabled
(
int
)
override
;
88
90
93
vtkSetMacro(ManageWindowLevel,
vtkTypeBool
);
94
vtkGetMacro(ManageWindowLevel,
vtkTypeBool
);
95
vtkBooleanMacro(ManageWindowLevel,
vtkTypeBool
);
97
101
enum
102
{
103
WindowLevelEvent = 1055,
104
ResliceAxesChangedEvent
,
105
ResliceThicknessChangedEvent
,
106
ResetCursorEvent
107
};
108
112
virtual
void
ResetResliceCursor
();
113
114
protected
:
115
vtkResliceCursorWidget
();
116
~vtkResliceCursorWidget
()
override
;
117
118
// These are the callbacks for this widget
119
static
void
SelectAction
(
vtkAbstractWidget
*);
120
static
void
RotateAction
(
vtkAbstractWidget
*);
121
static
void
TranslateAction
(
vtkAbstractWidget
*);
122
static
void
EndSelectAction
(
vtkAbstractWidget
*);
123
static
void
ResizeThicknessAction
(
vtkAbstractWidget
*);
124
static
void
EndResizeThicknessAction
(
vtkAbstractWidget
*);
125
static
void
MoveAction
(
vtkAbstractWidget
*);
126
static
void
ResetResliceCursorAction
(
vtkAbstractWidget
*);
127
128
// helper methods for cursor management
129
void
SetCursor
(
int
state)
override
;
130
131
// Start Window Level
132
void
StartWindowLevel
();
133
134
// Invoke the appropriate event based on state
135
void
InvokeAnEvent
();
136
137
// Manage the state of the widget
138
int
WidgetState
;
139
enum
WidgetStateType
140
{
141
Start = 0,
142
Active
143
};
144
145
// Keep track whether key modifier key is pressed
146
int
ModifierActive
;
147
vtkTypeBool
ManageWindowLevel
;
148
149
private
:
150
vtkResliceCursorWidget
(
const
vtkResliceCursorWidget
&) =
delete
;
151
void
operator=(
const
vtkResliceCursorWidget
&) =
delete
;
152
};
153
154
VTK_ABI_NAMESPACE_END
155
#endif
vtkAbstractWidget
define the API for widget / widget representation
Definition
vtkAbstractWidget.h:86
vtkAbstractWidget::WidgetRep
vtkWidgetRepresentation * WidgetRep
Definition
vtkAbstractWidget.h:200
vtkIndent
a simple class to control print indentation
Definition
vtkIndent.h:108
vtkResliceCursorRepresentation
represent the vtkResliceCursorWidget
Definition
vtkResliceCursorRepresentation.h:49
vtkResliceCursorWidget
represent a reslice cursor
Definition
vtkResliceCursorWidget.h:44
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::ResliceThicknessChangedEvent
@ ResliceThicknessChangedEvent
Definition
vtkResliceCursorWidget.h:105
vtkResliceCursorWidget::ResliceAxesChangedEvent
@ ResliceAxesChangedEvent
Definition
vtkResliceCursorWidget.h:104
vtkResliceCursorWidget::CreateDefaultRepresentation
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
vtkResliceCursorWidget::WidgetStateType
WidgetStateType
Definition
vtkResliceCursorWidget.h:140
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:64
vtkResliceCursorWidget::StartWindowLevel
void StartWindowLevel()
vtkResliceCursorWidget::ModifierActive
int ModifierActive
Definition
vtkResliceCursorWidget.h:146
vtkResliceCursorWidget::MoveAction
static void MoveAction(vtkAbstractWidget *)
vtkResliceCursorWidget::WidgetState
int WidgetState
Definition
vtkResliceCursorWidget.h:138
vtkResliceCursorWidget::SetEnabled
void SetEnabled(int) override
Methods for activiating 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:72
vtkResliceCursorWidget::vtkResliceCursorWidget
vtkResliceCursorWidget()
vtkResliceCursorWidget::~vtkResliceCursorWidget
~vtkResliceCursorWidget() override
vtkResliceCursorWidget::RotateAction
static void RotateAction(vtkAbstractWidget *)
vtkResliceCursorWidget::ManageWindowLevel
vtkTypeBool ManageWindowLevel
Definition
vtkResliceCursorWidget.h:147
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:50
Generated on Sat Feb 1 2025 09:42:38 for VTK by
1.9.7