VTK
9.1.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
Interaction
Widgets
vtkResliceCursorWidget.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkResliceCursorWidget.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
=========================================================================*/
36
#ifndef vtkResliceCursorWidget_h
37
#define vtkResliceCursorWidget_h
38
39
#include "
vtkAbstractWidget.h
"
40
#include "vtkInteractionWidgetsModule.h"
// For export macro
41
42
class
vtkResliceCursorRepresentation
;
43
44
class
VTKINTERACTIONWIDGETS_EXPORT
vtkResliceCursorWidget
:
public
vtkAbstractWidget
45
{
46
public
:
50
static
vtkResliceCursorWidget
*
New
();
51
53
56
vtkTypeMacro(
vtkResliceCursorWidget
,
vtkAbstractWidget
);
57
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
59
65
void
SetRepresentation
(
vtkResliceCursorRepresentation
* r)
66
{
67
this->Superclass::SetWidgetRepresentation(
reinterpret_cast<
vtkWidgetRepresentation
*
>
(r));
68
}
69
73
vtkResliceCursorRepresentation
*
GetResliceCursorRepresentation
()
74
{
75
return
reinterpret_cast<
vtkResliceCursorRepresentation
*
>
(this->
WidgetRep
);
76
}
77
81
void
CreateDefaultRepresentation
()
override
;
82
88
void
SetEnabled
(
int
)
override
;
89
91
94
vtkSetMacro(ManageWindowLevel,
vtkTypeBool
);
95
vtkGetMacro(ManageWindowLevel,
vtkTypeBool
);
96
vtkBooleanMacro(ManageWindowLevel,
vtkTypeBool
);
98
102
enum
103
{
104
WindowLevelEvent = 1055,
105
ResliceAxesChangedEvent
,
106
ResliceThicknessChangedEvent
,
107
ResetCursorEvent
108
};
109
113
virtual
void
ResetResliceCursor
();
114
115
protected
:
116
vtkResliceCursorWidget
();
117
~vtkResliceCursorWidget
()
override
;
118
119
// These are the callbacks for this widget
120
static
void
SelectAction
(
vtkAbstractWidget
*);
121
static
void
RotateAction
(
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
_WidgetState
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
#endif
vtkAbstractWidget
define the API for widget / widget representation
Definition:
vtkAbstractWidget.h:63
vtkAbstractWidget::WidgetRep
vtkWidgetRepresentation * WidgetRep
Definition:
vtkAbstractWidget.h:172
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:113
vtkResliceCursorRepresentation
represent the vtkResliceCursorWidget
Definition:
vtkResliceCursorRepresentation.h:55
vtkResliceCursorWidget
represent a reslice cursor
Definition:
vtkResliceCursorWidget.h:45
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::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:65
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:73
vtkResliceCursorWidget::ResliceThicknessChangedEvent
@ ResliceThicknessChangedEvent
Definition:
vtkResliceCursorWidget.h:106
vtkResliceCursorWidget::ResliceAxesChangedEvent
@ ResliceAxesChangedEvent
Definition:
vtkResliceCursorWidget.h:105
vtkResliceCursorWidget::vtkResliceCursorWidget
vtkResliceCursorWidget()
vtkResliceCursorWidget::~vtkResliceCursorWidget
~vtkResliceCursorWidget() override
vtkResliceCursorWidget::RotateAction
static void RotateAction(vtkAbstractWidget *)
vtkResliceCursorWidget::ManageWindowLevel
vtkTypeBool ManageWindowLevel
Definition:
vtkResliceCursorWidget.h:147
vtkResliceCursorWidget::_WidgetState
_WidgetState
Definition:
vtkResliceCursorWidget.h:140
vtkWidgetRepresentation
abstract class defines interface between the widget and widget representation classes
Definition:
vtkWidgetRepresentation.h:60
vtkTypeBool
int vtkTypeBool
Definition:
vtkABI.h:69
vtkAbstractWidget.h
Generated on Sat Feb 25 2023 08:59:35 for VTK by
1.9.4