NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
Public Member Functions | Protected Member Functions | List of all members
niftk::DnDDisplayInteractor Class Reference

Observer that manages the interaction with the display. More...

Inheritance diagram for niftk::DnDDisplayInteractor:
Inheritance graph
[legend]
Collaboration diagram for niftk::DnDDisplayInteractor:
Collaboration graph
[legend]

Public Member Functions

 mitkClassMacro (DnDDisplayInteractor, DisplayInteractor) mitkNewMacro1Param(Self
 
SingleViewerWidget *virtual void Notify (mitk::InteractionEvent *interactionEvent, bool isHandled) override
 

Protected Member Functions

 DnDDisplayInteractor (SingleViewerWidget *viewer)
 
virtual ~DnDDisplayInteractor ()
 
virtual void ConnectActionsAndFunctions () override
 
virtual bool StartSelectingPosition (mitk::StateMachineAction *action, mitk::InteractionEvent *interactionEvent)
 
virtual bool SelectPosition (mitk::StateMachineAction *action, mitk::InteractionEvent *interactionEvent)
 
virtual bool StopSelectingPosition (mitk::StateMachineAction *action, mitk::InteractionEvent *interactionEvent)
 
virtual bool StartPanning (mitk::StateMachineAction *action, mitk::InteractionEvent *interactionEvent)
 Like Superclass::Init, but blocks the update and selects the focused window. More...
 
virtual bool Pan (mitk::StateMachineAction *action, mitk::InteractionEvent *interactionEvent)
 
virtual bool StopPanning (mitk::StateMachineAction *action, mitk::InteractionEvent *interactionEvent)
 
virtual bool StartZooming (mitk::StateMachineAction *action, mitk::InteractionEvent *interactionEvent)
 Like Superclass::Init, but blocks the update and selects the focused window. It also changes the selected position to the middle of the focused voxel. More...
 
virtual bool Zoom (mitk::StateMachineAction *action, mitk::InteractionEvent *interactionEvent) override
 
virtual bool StopZooming (mitk::StateMachineAction *action, mitk::InteractionEvent *interactionEvent)
 
virtual bool SetWindowLayoutToAxial (mitk::StateMachineAction *action, mitk::InteractionEvent *interactionEvent)
 Switches to axial window layout. More...
 
virtual bool SetWindowLayoutToSagittal (mitk::StateMachineAction *action, mitk::InteractionEvent *interactionEvent)
 Switches to sagittal window layout. More...
 
virtual bool SetWindowLayoutToCoronal (mitk::StateMachineAction *action, mitk::InteractionEvent *interactionEvent)
 Switches to coronal window layout. More...
 
virtual bool SetWindowLayoutTo3D (mitk::StateMachineAction *action, mitk::InteractionEvent *interactionEvent)
 Switches to 3D window layout. More...
 
virtual bool SetWindowLayoutToMulti (mitk::StateMachineAction *action, mitk::InteractionEvent *interactionEvent)
 Switches to multi window layout. More...
 
virtual bool ToggleMultiWindowLayout (mitk::StateMachineAction *action, mitk::InteractionEvent *interactionEvent)
 Toggles between single and multi window layout. More...
 
virtual bool ToggleCursorVisibility (mitk::StateMachineAction *action, mitk::InteractionEvent *interactionEvent)
 Toggles the visibility of the cursor. More...
 
virtual bool ToggleDirectionAnnotations (mitk::StateMachineAction *action, mitk::InteractionEvent *interactionEvent)
 Toggles displaying the direction annotations on/off. More...
 
virtual bool ToggleIntensityAnnotation (mitk::StateMachineAction *action, mitk::InteractionEvent *interactionEvent)
 Toggles displaying the intensity annotation on/off. More...
 
virtual bool SelectPreviousSlice (mitk::StateMachineAction *action, mitk::InteractionEvent *interactionEvent)
 Selects the previous slice. The slices are ordered in the following way: axial: inferior to superior sagittal: right to left coronal: anterior to posterior. More...
 
virtual bool SelectNextSlice (mitk::StateMachineAction *action, mitk::InteractionEvent *interactionEvent)
 Selects the next slice. The slices are ordered in the following way: axial: inferior to superior sagittal: right to left coronal: anterior to posterior. More...
 
virtual bool SelectPreviousTimeStep (mitk::StateMachineAction *action, mitk::InteractionEvent *interactionEvent)
 Selects the previous time step. More...
 
virtual bool SelectNextTimeStep (mitk::StateMachineAction *action, mitk::InteractionEvent *interactionEvent)
 Selects the next time step. More...
 
virtual bool StartScrollingThroughSlicesBackwards (mitk::StateMachineAction *action, mitk::InteractionEvent *interactionEvent)
 Starts scrolling through slices in a loop backwards. More...
 
virtual bool StartScrollingThroughSlicesForwards (mitk::StateMachineAction *action, mitk::InteractionEvent *interactionEvent)
 Starts scrolling through slices in a loop in posterior direction. More...
 
virtual bool StartScrollingThroughTimeStepsBackwards (mitk::StateMachineAction *action, mitk::InteractionEvent *interactionEvent)
 Starts scrolling through time steps in a loop, backwards. More...
 
virtual bool StartScrollingThroughTimeStepsForwards (mitk::StateMachineAction *action, mitk::InteractionEvent *interactionEvent)
 Starts scrolling through time steps in a loop, forwards. More...
 
virtual bool StopScrolling (mitk::StateMachineAction *action, mitk::InteractionEvent *interactionEvent)
 Stops scrolling through slices. More...
 

Detailed Description

Observer that manages the interaction with the display.

Inherits from mitk::InteractionEventObserver since it doesn't alter any data (only their representation), and its actions cannot be associated with a DataNode. Also inherits from EventStateMachine

mitk::ToolManager reloads the configuration of the registered mitk::DisplayInteractor objects when a tool is switched on. This configuration conflicts with most of the tools.

Constructor & Destructor Documentation

niftk::DnDDisplayInteractor::DnDDisplayInteractor ( SingleViewerWidget viewer)
protected
niftk::DnDDisplayInteractor::~DnDDisplayInteractor ( )
protectedvirtual

Member Function Documentation

void niftk::DnDDisplayInteractor::ConnectActionsAndFunctions ( )
overrideprotectedvirtual

Note: We do not call the overridden function here. It assign handlers to actions that are not defined for this state machine.

niftk::DnDDisplayInteractor::mitkClassMacro ( DnDDisplayInteractor  ,
DisplayInteractor   
)
void niftk::DnDDisplayInteractor::Notify ( mitk::InteractionEvent *  interactionEvent,
bool  isHandled 
)
overridevirtual

By this function the Observer gets notifier about new events. Here it is adapted to pass the events to the state machine in order to use its infrastructure. It also checks if event is to be accepted when i already has been processed by a DataInteractor.

bool niftk::DnDDisplayInteractor::Pan ( mitk::StateMachineAction *  action,
mitk::InteractionEvent *  interactionEvent 
)
protectedvirtual
bool niftk::DnDDisplayInteractor::SelectNextSlice ( mitk::StateMachineAction *  action,
mitk::InteractionEvent *  interactionEvent 
)
protectedvirtual

Selects the next slice. The slices are ordered in the following way: axial: inferior to superior sagittal: right to left coronal: anterior to posterior.

Note: We do not implement scrolling for the 3D window.

Note: This does not work if the slice are locked. See: SingleViewerWidget::SetNavigationControllerEventListening(bool) and QmitkMultiWindowWidget::SetWidgetPlanesLocked(bool)

bool niftk::DnDDisplayInteractor::SelectNextTimeStep ( mitk::StateMachineAction *  action,
mitk::InteractionEvent *  interactionEvent 
)
protectedvirtual

Selects the next time step.

bool niftk::DnDDisplayInteractor::SelectPosition ( mitk::StateMachineAction *  action,
mitk::InteractionEvent *  interactionEvent 
)
protectedvirtual

Note: We do not re-implement position selection for the 3D window.

bool niftk::DnDDisplayInteractor::SelectPreviousSlice ( mitk::StateMachineAction *  action,
mitk::InteractionEvent *  interactionEvent 
)
protectedvirtual

Selects the previous slice. The slices are ordered in the following way: axial: inferior to superior sagittal: right to left coronal: anterior to posterior.

Note: We do not implement scrolling for the 3D window.

Note: This does not work if the slice are locked. See: SingleViewerWidget::SetNavigationControllerEventListening(bool) and QmitkMultiWindowWidget::SetWidgetPlanesLocked(bool)

bool niftk::DnDDisplayInteractor::SelectPreviousTimeStep ( mitk::StateMachineAction *  action,
mitk::InteractionEvent *  interactionEvent 
)
protectedvirtual

Selects the previous time step.

bool niftk::DnDDisplayInteractor::SetWindowLayoutTo3D ( mitk::StateMachineAction *  action,
mitk::InteractionEvent *  interactionEvent 
)
protectedvirtual

Switches to 3D window layout.

bool niftk::DnDDisplayInteractor::SetWindowLayoutToAxial ( mitk::StateMachineAction *  action,
mitk::InteractionEvent *  interactionEvent 
)
protectedvirtual

Switches to axial window layout.

bool niftk::DnDDisplayInteractor::SetWindowLayoutToCoronal ( mitk::StateMachineAction *  action,
mitk::InteractionEvent *  interactionEvent 
)
protectedvirtual

Switches to coronal window layout.

bool niftk::DnDDisplayInteractor::SetWindowLayoutToMulti ( mitk::StateMachineAction *  action,
mitk::InteractionEvent *  interactionEvent 
)
protectedvirtual

Switches to multi window layout.

bool niftk::DnDDisplayInteractor::SetWindowLayoutToSagittal ( mitk::StateMachineAction *  action,
mitk::InteractionEvent *  interactionEvent 
)
protectedvirtual

Switches to sagittal window layout.

bool niftk::DnDDisplayInteractor::StartPanning ( mitk::StateMachineAction *  action,
mitk::InteractionEvent *  interactionEvent 
)
protectedvirtual

Like Superclass::Init, but blocks the update and selects the focused window.

bool niftk::DnDDisplayInteractor::StartScrollingThroughSlicesBackwards ( mitk::StateMachineAction *  action,
mitk::InteractionEvent *  interactionEvent 
)
protectedvirtual

Starts scrolling through slices in a loop backwards.

bool niftk::DnDDisplayInteractor::StartScrollingThroughSlicesForwards ( mitk::StateMachineAction *  action,
mitk::InteractionEvent *  interactionEvent 
)
protectedvirtual

Starts scrolling through slices in a loop in posterior direction.

bool niftk::DnDDisplayInteractor::StartScrollingThroughTimeStepsBackwards ( mitk::StateMachineAction *  action,
mitk::InteractionEvent *  interactionEvent 
)
protectedvirtual

Starts scrolling through time steps in a loop, backwards.

bool niftk::DnDDisplayInteractor::StartScrollingThroughTimeStepsForwards ( mitk::StateMachineAction *  action,
mitk::InteractionEvent *  interactionEvent 
)
protectedvirtual

Starts scrolling through time steps in a loop, forwards.

bool niftk::DnDDisplayInteractor::StartSelectingPosition ( mitk::StateMachineAction *  action,
mitk::InteractionEvent *  interactionEvent 
)
protectedvirtual
bool niftk::DnDDisplayInteractor::StartZooming ( mitk::StateMachineAction *  action,
mitk::InteractionEvent *  interactionEvent 
)
protectedvirtual

Like Superclass::Init, but blocks the update and selects the focused window. It also changes the selected position to the middle of the focused voxel.

Note that the zoom focus must always be the selected position, i.e. the position at the cursor (crosshair).

bool niftk::DnDDisplayInteractor::StopPanning ( mitk::StateMachineAction *  action,
mitk::InteractionEvent *  interactionEvent 
)
protectedvirtual
bool niftk::DnDDisplayInteractor::StopScrolling ( mitk::StateMachineAction *  action,
mitk::InteractionEvent *  interactionEvent 
)
protectedvirtual

Stops scrolling through slices.

bool niftk::DnDDisplayInteractor::StopSelectingPosition ( mitk::StateMachineAction *  action,
mitk::InteractionEvent *  interactionEvent 
)
protectedvirtual
bool niftk::DnDDisplayInteractor::StopZooming ( mitk::StateMachineAction *  action,
mitk::InteractionEvent *  interactionEvent 
)
protectedvirtual
bool niftk::DnDDisplayInteractor::ToggleCursorVisibility ( mitk::StateMachineAction *  action,
mitk::InteractionEvent *  interactionEvent 
)
protectedvirtual

Toggles the visibility of the cursor.

bool niftk::DnDDisplayInteractor::ToggleDirectionAnnotations ( mitk::StateMachineAction *  action,
mitk::InteractionEvent *  interactionEvent 
)
protectedvirtual

Toggles displaying the direction annotations on/off.

bool niftk::DnDDisplayInteractor::ToggleIntensityAnnotation ( mitk::StateMachineAction *  action,
mitk::InteractionEvent *  interactionEvent 
)
protectedvirtual

Toggles displaying the intensity annotation on/off.

bool niftk::DnDDisplayInteractor::ToggleMultiWindowLayout ( mitk::StateMachineAction *  action,
mitk::InteractionEvent *  interactionEvent 
)
protectedvirtual

Toggles between single and multi window layout.

bool niftk::DnDDisplayInteractor::Zoom ( mitk::StateMachineAction *  action,
mitk::InteractionEvent *  interactionEvent 
)
overrideprotectedvirtual

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