Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
vtkMRMLSliceViewInteractorStyle Class Reference

Provides customizable interaction routines. More...

#include <Libs/MRML/DisplayableManager/vtkMRMLSliceViewInteractorStyle.h>

Inheritance diagram for vtkMRMLSliceViewInteractorStyle:
Collaboration diagram for vtkMRMLSliceViewInteractorStyle:

Public Types

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 ,
  SetCrosshairPosition = 2048 , TranslateSliceIntersection = 4096 , RotateSliceIntersection = 8192 , AllActionsMask
}
 Internal state management for multi-event sequences (like click-drag-release) More...
 
typedef vtkMRMLViewInteractorStyle Superclass
 
- Public Types inherited from vtkMRMLViewInteractorStyle
typedef vtkObject Superclass
 

Public Member Functions

virtual bool DelegateInteractionEventToDisplayableManagers (unsigned long event)
 
bool DelegateInteractionEventToDisplayableManagers (vtkEventData *inputEventData) override
 
bool GetActionEnabled (int actionsMask)
 
virtual const char * GetClassName ()
 
vtkMRMLCrosshairDisplayableManagerGetCrosshairDisplayableManager ()
 
vtkMRMLScalarBarDisplayableManagerGetScalarBarDisplayableManager ()
 
virtual vtkMRMLSliceLogicGetSliceLogic ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
void SetActionEnabled (int actionsMask, bool enable=true)
 
void SetSliceLogic (vtkMRMLSliceLogic *SliceLogic)
 Get/Set the SliceLogic.
 
- Public Member Functions inherited from vtkMRMLViewInteractorStyle
virtual bool DelegateInteractionEventDataToDisplayableManagers (vtkMRMLInteractionEventData *eventData)
 
virtual vtkRenderWindowInteractor * GetInteractor ()
 
virtual void OnButton3D (vtkEventData *eventData)
 3D event bindings
 
virtual void OnChar ()
 Keyboard functions.
 
virtual void OnConfigure ()
 
virtual void OnEndPan ()
 
virtual void OnEndPinch ()
 
virtual void OnEndRotate ()
 
virtual void OnEnter ()
 
virtual void OnExpose ()
 
virtual void OnKeyPress ()
 
virtual void OnKeyRelease ()
 
virtual void OnLeave ()
 
virtual void OnLeftButtonDoubleClick ()
 
virtual void OnLeftButtonDown ()
 
virtual void OnLeftButtonUp ()
 
virtual void OnLongTap ()
 
virtual void OnMiddleButtonDoubleClick ()
 
virtual void OnMiddleButtonDown ()
 
virtual void OnMiddleButtonUp ()
 
virtual void OnMouseMove ()
 Mouse functions.
 
virtual void OnMouseWheelBackward ()
 
virtual void OnMouseWheelForward ()
 
virtual void OnMove3D (vtkEventData *eventData)
 
virtual void OnPan ()
 
virtual void OnPinch ()
 
virtual void OnRightButtonDoubleClick ()
 
virtual void OnRightButtonDown ()
 
virtual void OnRightButtonUp ()
 
virtual void OnRotate ()
 
virtual void OnStartPan ()
 
virtual void OnStartPinch ()
 
virtual void OnStartRotate ()
 
virtual void OnTap ()
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
virtual void SetDisplayableManagers (vtkMRMLDisplayableManagerGroup *displayableManagers)
 
virtual void SetInteractor (vtkRenderWindowInteractor *interactor)
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkMRMLSliceViewInteractorStyleNew ()
 
static vtkMRMLSliceViewInteractorStyleSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkMRMLViewInteractorStyle
static int IsTypeOf (const char *type)
 
static vtkMRMLViewInteractorStyleNew ()
 
static vtkMRMLViewInteractorStyleSafeDownCast (vtkObject *o)
 

Protected Member Functions

void SetMouseCursor (int cursor)
 
 vtkMRMLSliceViewInteractorStyle ()
 
 ~vtkMRMLSliceViewInteractorStyle () override
 
- Protected Member Functions inherited from vtkMRMLViewInteractorStyle
vtkInteractorStyle * GetInteractorStyle ()
 
virtual void ProcessDisplayableManagerEvents (vtkMRMLAbstractDisplayableManager *displayableManager, unsigned long event, void *callData)
 
void SetMouseCursor (int cursor)
 
 vtkMRMLViewInteractorStyle ()
 
 ~vtkMRMLViewInteractorStyle () override
 

Static Protected Member Functions

static void SliceViewProcessEvents (vtkObject *object, unsigned long event, void *clientdata, void *calldata)
 
- Static Protected Member Functions inherited from vtkMRMLViewInteractorStyle
static void CustomProcessEvents (vtkObject *object, unsigned long event, void *clientdata, void *calldata)
 
static void DisplayableManagerCallback (vtkObject *object, unsigned long event, void *clientData, void *callData)
 
static void ProcessEvents (vtkObject *object, unsigned long event, void *clientdata, void *calldata)
 Process events not already delegated to displayable managers by CustomProcessEvents().
 

Protected Attributes

bool EnableCursorUpdate
 
vtkMRMLSliceLogicSliceLogic
 
- Protected Attributes inherited from vtkMRMLViewInteractorStyle
vtkCallbackCommand * DisplayableManagerCallbackCommand
 
vtkWeakPointer< vtkMRMLDisplayableManagerGroupDisplayableManagers
 
vtkCallbackCommand * EventCallbackCommand
 
vtkMRMLAbstractDisplayableManagerFocusedDisplayableManager
 
vtkRenderWindowInteractor * Interactor {nullptr}
 
bool MouseMovedSinceButtonDown
 

Detailed Description

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 41 of file vtkMRMLSliceViewInteractorStyle.h.

Member Typedef Documentation

◆ Superclass

Member Enumeration Documentation

◆ anonymous enum

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 
SetCrosshairPosition 
TranslateSliceIntersection 
RotateSliceIntersection 
AllActionsMask 

Definition at line 57 of file vtkMRMLSliceViewInteractorStyle.h.

Constructor & Destructor Documentation

◆ vtkMRMLSliceViewInteractorStyle()

vtkMRMLSliceViewInteractorStyle::vtkMRMLSliceViewInteractorStyle ( )
protected

◆ ~vtkMRMLSliceViewInteractorStyle()

vtkMRMLSliceViewInteractorStyle::~vtkMRMLSliceViewInteractorStyle ( )
overrideprotected

Member Function Documentation

◆ DelegateInteractionEventToDisplayableManagers() [1/2]

virtual bool vtkMRMLViewInteractorStyle::DelegateInteractionEventToDisplayableManagers ( unsigned long event)
virtual

Give a chance to displayable managers to process the event. Return true if the event is processed.

Reimplemented from vtkMRMLViewInteractorStyle.

◆ DelegateInteractionEventToDisplayableManagers() [2/2]

bool vtkMRMLSliceViewInteractorStyle::DelegateInteractionEventToDisplayableManagers ( vtkEventData * inputEventData)
overridevirtual

Give a chance to displayable managers to process the event. It just creates vtkMRMLInteractionEventData and calls DelegateInteractionEventDataToDisplayableManagers. Return true if the event is processed.

Reimplemented from vtkMRMLViewInteractorStyle.

◆ GetActionEnabled()

bool vtkMRMLSliceViewInteractorStyle::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.

◆ GetClassName()

virtual const char * vtkMRMLSliceViewInteractorStyle::GetClassName ( )
virtual

Reimplemented from vtkMRMLViewInteractorStyle.

◆ GetCrosshairDisplayableManager()

vtkMRMLCrosshairDisplayableManager * vtkMRMLSliceViewInteractorStyle::GetCrosshairDisplayableManager ( )

◆ GetScalarBarDisplayableManager()

vtkMRMLScalarBarDisplayableManager * vtkMRMLSliceViewInteractorStyle::GetScalarBarDisplayableManager ( )

◆ GetSliceLogic()

virtual vtkMRMLSliceLogic * vtkMRMLSliceViewInteractorStyle::GetSliceLogic ( )
virtual

◆ IsA()

virtual int vtkMRMLSliceViewInteractorStyle::IsA ( const char * type)
virtual

Reimplemented from vtkMRMLViewInteractorStyle.

◆ IsTypeOf()

static int vtkMRMLSliceViewInteractorStyle::IsTypeOf ( const char * type)
static

◆ New()

static vtkMRMLSliceViewInteractorStyle * vtkMRMLSliceViewInteractorStyle::New ( )
static

◆ PrintSelf()

void vtkMRMLSliceViewInteractorStyle::PrintSelf ( ostream & os,
vtkIndent indent )
override

◆ SafeDownCast()

static vtkMRMLSliceViewInteractorStyle * vtkMRMLSliceViewInteractorStyle::SafeDownCast ( vtkObject * o)
static

◆ SetActionEnabled()

void vtkMRMLSliceViewInteractorStyle::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.

◆ SetMouseCursor()

void vtkMRMLSliceViewInteractorStyle::SetMouseCursor ( int cursor)
protected

◆ SetSliceLogic()

void vtkMRMLSliceViewInteractorStyle::SetSliceLogic ( vtkMRMLSliceLogic * SliceLogic)

Get/Set the SliceLogic.

◆ SliceViewProcessEvents()

static void vtkMRMLSliceViewInteractorStyle::SliceViewProcessEvents ( vtkObject * object,
unsigned long event,
void * clientdata,
void * calldata )
staticprotected

Member Data Documentation

◆ EnableCursorUpdate

bool vtkMRMLSliceViewInteractorStyle::EnableCursorUpdate
protected

Definition at line 107 of file vtkMRMLSliceViewInteractorStyle.h.

◆ SliceLogic

vtkMRMLSliceLogic* vtkMRMLSliceViewInteractorStyle::SliceLogic
protected

Definition at line 105 of file vtkMRMLSliceViewInteractorStyle.h.


The documentation for this class was generated from the following file: