Provides customizable interaction routines.
More...
#include <Libs/MRML/DisplayableManager/vtkSliceViewInteractorStyle.h>
|
enum | {
None = 0,
Translate = 1,
Zoom = 2,
Rotate = 4,
Blend = 8,
AdjustWindowLevelBackground = 16,
AdjustWindowLevelForeground = 32,
BrowseSlice = 64,
ShowSlice = 128,
AdjustLightbox = 256,
SelectVolume = 512,
SetCursorPosition = 1024,
AllActionsMask
} |
| Internal state management for multi-event sequences (like click-drag-release) More...
|
|
typedef vtkInteractorStyleUser | Superclass |
|
Provides customizable interaction routines.
Relies on vtkInteractorStyleUser, but with MouseWheelEvents. and mapping to control the slicer slice logic (manipulates the vtkMRMLSliceNode and vtkMRMLSliceCompositeNode. TODO:
- Do we need Rotate Mode? Probably better to just rely on the reformat widget
- Do we need to set the slice spacing on EnterEvent (I say no, nothing to do with linked slices should go in here)
Definition at line 38 of file vtkSliceViewInteractorStyle.h.
◆ Superclass
◆ anonymous enum
Internal state management for multi-event sequences (like click-drag-release)
Action State values and management
Enumerator |
---|
None | |
Translate | |
Zoom | |
Rotate | |
Blend | |
AdjustWindowLevelBackground | |
AdjustWindowLevelForeground | |
BrowseSlice | |
ShowSlice | |
AdjustLightbox | |
SelectVolume | |
SetCursorPosition | |
AllActionsMask | |
Definition at line 77 of file vtkSliceViewInteractorStyle.h.
◆ vtkSliceViewInteractorStyle()
vtkSliceViewInteractorStyle::vtkSliceViewInteractorStyle |
( |
| ) |
|
|
protected |
◆ ~vtkSliceViewInteractorStyle()
vtkSliceViewInteractorStyle::~vtkSliceViewInteractorStyle |
( |
| ) |
|
|
protected |
◆ CycleVolumeLayer()
void vtkSliceViewInteractorStyle::CycleVolumeLayer |
( |
int |
layer, |
|
|
int |
direction |
|
) |
| |
Change the displayed volume in the selected layer by moving in a loop trough the volumes available in the scene.
- layer: are 0,1,2 for bg, fg, lb
- direction: positive or negative (wraps through volumes in scene)
◆ DecrementSlice()
void vtkSliceViewInteractorStyle::DecrementSlice |
( |
| ) |
|
◆ EndAdjustWindowLevel()
void vtkSliceViewInteractorStyle::EndAdjustWindowLevel |
( |
| ) |
|
◆ EndBlend()
void vtkSliceViewInteractorStyle::EndBlend |
( |
| ) |
|
◆ EndTranslate()
void vtkSliceViewInteractorStyle::EndTranslate |
( |
| ) |
|
◆ GetActionEnabled()
bool vtkSliceViewInteractorStyle::GetActionEnabled |
( |
int |
actionsMask | ) |
|
Returns true if the specified action is allowed. If multiple actions are specified, the return value is true if all actions are enabled.
◆ GetActionState()
virtual int vtkSliceViewInteractorStyle::GetActionState |
( |
| ) |
|
|
virtual |
◆ GetClassName()
virtual const char* vtkSliceViewInteractorStyle::GetClassName |
( |
| ) |
|
|
virtual |
◆ GetEventXYZ()
void vtkSliceViewInteractorStyle::GetEventXYZ |
( |
double |
xyz[4] | ) |
|
Convert event coordinates (with respect to viewport) into xyz coordinates, where z is the slice number of the lightbox and xy is the offset within the lightbox view. The xyz coordinates can be used to map to RAS with the slice node's XYToRAS matrix. The 4th component is 1 so it can be used with a homogenous transform.
◆ GetLabelOpacity()
double vtkSliceViewInteractorStyle::GetLabelOpacity |
( |
| ) |
|
◆ GetMouseInteractionMode()
int vtkSliceViewInteractorStyle::GetMouseInteractionMode |
( |
| ) |
|
|
protected |
◆ GetSliceLogic()
◆ GetSliceSpacing()
double vtkSliceViewInteractorStyle::GetSliceSpacing |
( |
| ) |
|
Helper routines.
check for prescribed spacing, otherwise return best spacing amount for current layer setup (use logic to look for spacing of first non-null layer)
◆ GetVisibleSegmentationDisplayNode()
◆ IncrementSlice()
void vtkSliceViewInteractorStyle::IncrementSlice |
( |
| ) |
|
Adjust the slice position with respect to current slice node offset.
◆ IsA()
virtual int vtkSliceViewInteractorStyle::IsA |
( |
const char * |
type | ) |
|
|
virtual |
◆ IsMouseInsideVolume()
bool vtkSliceViewInteractorStyle::IsMouseInsideVolume |
( |
bool |
background | ) |
|
|
protected |
Returns true if mouse is inside the selected layer volume. Use background flag to choose between foreground/background layer.
◆ IsTypeOf()
static int vtkSliceViewInteractorStyle::IsTypeOf |
( |
const char * |
type | ) |
|
|
static |
◆ MoveSlice()
void vtkSliceViewInteractorStyle::MoveSlice |
( |
double |
delta | ) |
|
◆ New()
◆ OnChar()
virtual void vtkSliceViewInteractorStyle::OnChar |
( |
| ) |
|
|
virtual |
◆ OnConfigure()
virtual void vtkSliceViewInteractorStyle::OnConfigure |
( |
| ) |
|
|
virtual |
◆ OnEnter()
virtual void vtkSliceViewInteractorStyle::OnEnter |
( |
| ) |
|
|
virtual |
◆ OnExpose()
virtual void vtkSliceViewInteractorStyle::OnExpose |
( |
| ) |
|
|
virtual |
These are more esoteric events, but are useful in some cases.
◆ OnKeyPress()
virtual void vtkSliceViewInteractorStyle::OnKeyPress |
( |
| ) |
|
|
virtual |
◆ OnKeyRelease()
virtual void vtkSliceViewInteractorStyle::OnKeyRelease |
( |
| ) |
|
|
virtual |
◆ OnLeave()
virtual void vtkSliceViewInteractorStyle::OnLeave |
( |
| ) |
|
|
virtual |
◆ OnLeftButtonDown()
virtual void vtkSliceViewInteractorStyle::OnLeftButtonDown |
( |
| ) |
|
|
virtual |
◆ OnLeftButtonUp()
virtual void vtkSliceViewInteractorStyle::OnLeftButtonUp |
( |
| ) |
|
|
virtual |
◆ OnMiddleButtonDown()
virtual void vtkSliceViewInteractorStyle::OnMiddleButtonDown |
( |
| ) |
|
|
virtual |
◆ OnMiddleButtonUp()
virtual void vtkSliceViewInteractorStyle::OnMiddleButtonUp |
( |
| ) |
|
|
virtual |
◆ OnMouseMove()
virtual void vtkSliceViewInteractorStyle::OnMouseMove |
( |
| ) |
|
|
virtual |
Events are either handled here by changing the slice node and composite node (sometimes using the logic's methods) or they are passed to the vtkInteractorStyleUser, which conditionally passes them to observers if there are any.
Generic event bindings
◆ OnMouseWheelBackward()
virtual void vtkSliceViewInteractorStyle::OnMouseWheelBackward |
( |
| ) |
|
|
virtual |
◆ OnMouseWheelForward()
virtual void vtkSliceViewInteractorStyle::OnMouseWheelForward |
( |
| ) |
|
|
virtual |
MouseWheel callbacks added for slicer.
◆ OnRightButtonDown()
virtual void vtkSliceViewInteractorStyle::OnRightButtonDown |
( |
| ) |
|
|
virtual |
◆ OnRightButtonUp()
virtual void vtkSliceViewInteractorStyle::OnRightButtonUp |
( |
| ) |
|
|
virtual |
◆ PrintSelf()
void vtkSliceViewInteractorStyle::PrintSelf |
( |
ostream & |
os, |
|
|
vtkIndent |
indent |
|
) |
| |
◆ SafeDownCast()
◆ ScaleZoom()
void vtkSliceViewInteractorStyle::ScaleZoom |
( |
double |
zoomScaleFactor | ) |
|
Adjust zoom factor. If zoomScaleFactor>1 then view is zoomed in, if 0<zoomScaleFactor<1 then view is zoomed out.
◆ SetActionEnabled()
void vtkSliceViewInteractorStyle::SetActionEnabled |
( |
int |
actionsMask, |
|
|
bool |
enable = true |
|
) |
| |
Enable/disable the specified action (Translate, Zoom, Blend, etc.). Multiple actions can be specified by providing the sum of action ids. Set the value to AllActionsMask to enable/disable all actions. All actions are enabled by default.
◆ SetActionState()
virtual void vtkSliceViewInteractorStyle::SetActionState |
( |
int |
| ) |
|
|
virtual |
◆ SetLabelOpacity()
void vtkSliceViewInteractorStyle::SetLabelOpacity |
( |
double |
opacity | ) |
|
Get/Set labelmap or segmentation opacity.
◆ SetSliceLogic()
◆ StartAdjustWindowLevel()
void vtkSliceViewInteractorStyle::StartAdjustWindowLevel |
( |
| ) |
|
Enter a mode where the mouse moves are used to change the window/level setting.
◆ StartBlend()
void vtkSliceViewInteractorStyle::StartBlend |
( |
| ) |
|
Enter a mode where the mouse moves are used to change the foreground or labelmap opacity.
◆ StartTranslate()
void vtkSliceViewInteractorStyle::StartTranslate |
( |
| ) |
|
Collect some boilerplate management steps so they can be used in more than one place
◆ VolumeWindowLevelEditable()
bool vtkSliceViewInteractorStyle::VolumeWindowLevelEditable |
( |
const char * |
volumeNodeID | ) |
|
|
protected |
Returns true if the volume's window/level values are editable on the GUI
◆ ActionsEnabled
int vtkSliceViewInteractorStyle::ActionsEnabled |
|
protected |
◆ ActionState
int vtkSliceViewInteractorStyle::ActionState |
|
protected |
◆ LastEventPosition
int vtkSliceViewInteractorStyle::LastEventPosition[2] |
|
protected |
◆ LastForegroundOpacity
double vtkSliceViewInteractorStyle::LastForegroundOpacity |
|
protected |
◆ LastLabelOpacity
double vtkSliceViewInteractorStyle::LastLabelOpacity |
|
protected |
◆ LastVolumeWindowLevel
double vtkSliceViewInteractorStyle::LastVolumeWindowLevel[2] |
|
protected |
◆ ShiftKeyUsedForPreviousAction
bool vtkSliceViewInteractorStyle::ShiftKeyUsedForPreviousAction |
|
protected |
Indicates whether the shift key was used during the previous action. This is used to require shift-up before returning to default mode.
Definition at line 180 of file vtkSliceViewInteractorStyle.h.
◆ SliceLogic
◆ StartActionEventPosition
int vtkSliceViewInteractorStyle::StartActionEventPosition[2] |
|
protected |
◆ StartActionFOV
double vtkSliceViewInteractorStyle::StartActionFOV[3] |
|
protected |
◆ StartActionSegmentationDisplayNode
◆ VolumeScalarRange
double vtkSliceViewInteractorStyle::VolumeScalarRange[2] |
|
protected |
The documentation for this class was generated from the following file: