Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::InteractionPositionEvent Class Reference

Super class for all position-aware interaction events. More...

#include <mitkInteractionPositionEvent.h>

Inheritance diagram for mitk::InteractionPositionEvent:
Collaboration diagram for mitk::InteractionPositionEvent:

Public Member Functions

 mitkClassMacro (InteractionPositionEvent, InteractionEvent)
 
 mitkNewMacro2Param (Self, BaseRenderer *, const Point2D &)
 
Point2D GetPointerPositionOnScreen () const
 Get the pointer position in display (screen) coordinates. More...
 
Point3D GetPositionInWorld () const
 Get the pointer position converted to 3D world coordinates. More...
 
bool IsSuperClassOf (const InteractionEvent::Pointer &baseClass) const override
 Check if the provided event is an InteractionPositionEvent or derived. More...
 
- Public Member Functions inherited from mitk::InteractionEvent
 mitkClassMacroItkParent (InteractionEvent, itk::LightObject)
 
 mitkNewMacro1Param (Self, BaseRenderer *)
 
void SetSender (BaseRenderer *sender)
 Set the BaseRenderer that sent this event. More...
 
BaseRenderer * GetSender () const
 Get the BaseRenderer that sent this event. More...
 

Protected Member Functions

 InteractionPositionEvent (BaseRenderer *baseRenderer, const Point2D &mousePosition)
 
 ~InteractionPositionEvent () override
 
bool IsEqual (const InteractionEvent &) const override
 
- Protected Member Functions inherited from mitk::InteractionEvent
 InteractionEvent (BaseRenderer *)
 
 ~InteractionEvent () override
 

Additional Inherited Members

- Public Types inherited from mitk::InteractionEvent
enum  MouseButtons { NoButton , LeftMouseButton , RightMouseButton , MiddleMouseButton }
 Enumeration of mouse button states. More...
 
enum  ModifierKeys { NoKey , ShiftKey , ControlKey , AltKey }
 Enumeration of keyboard modifier keys. More...
 
- Static Public Attributes inherited from mitk::InteractionEvent
static const std::string KeyEsc
 String constants for special keys used in key events and state machine patterns. More...
 
static const std::string KeyEnter
 "Enter" key constant. More...
 
static const std::string KeyReturn
 "Return" key constant. More...
 
static const std::string KeyDelete
 "Delete" key constant. More...
 
static const std::string KeyArrowUp
 "ArrowUp" key constant. More...
 
static const std::string KeyArrowDown
 "ArrowDown" key constant. More...
 
static const std::string KeyArrowLeft
 "ArrowLeft" key constant. More...
 
static const std::string KeyArrowRight
 "ArrowRight" key constant. More...
 
static const std::string KeyF1
 "F1" key constant. More...
 
static const std::string KeyF2
 "F2" key constant. More...
 
static const std::string KeyF3
 "F3" key constant. More...
 
static const std::string KeyF4
 "F4" key constant. More...
 
static const std::string KeyF5
 "F5" key constant. More...
 
static const std::string KeyF6
 "F6" key constant. More...
 
static const std::string KeyF7
 "F7" key constant. More...
 
static const std::string KeyF8
 "F8" key constant. More...
 
static const std::string KeyF9
 "F9" key constant. More...
 
static const std::string KeyF10
 "F10" key constant. More...
 
static const std::string KeyF11
 "F11" key constant. More...
 
static const std::string KeyF12
 "F12" key constant. More...
 
static const std::string KeyPos1
 "Pos1" (Home) key constant. More...
 
static const std::string KeyEnd
 "End" key constant. More...
 
static const std::string KeyInsert
 "Insert" key constant. More...
 
static const std::string KeyPageUp
 "PageUp" key constant. More...
 
static const std::string KeyPageDown
 "PageDown" key constant. More...
 
static const std::string KeySpace
 "Space" key constant. More...
 

Detailed Description

Super class for all position-aware interaction events.

This class stores the 2D pointer position (in display coordinates) relative to the BaseRenderer. On demand, it converts this to a 3D world coordinate via the renderer's DisplayToWorld() method.

See also
InteractionEvent
InteractionKeyEvent

Definition at line 40 of file mitkInteractionPositionEvent.h.

Constructor & Destructor Documentation

◆ InteractionPositionEvent()

mitk::InteractionPositionEvent::InteractionPositionEvent ( BaseRenderer *  baseRenderer,
const Point2D &  mousePosition 
)
protected

◆ ~InteractionPositionEvent()

mitk::InteractionPositionEvent::~InteractionPositionEvent ( )
overrideprotected

Member Function Documentation

◆ GetPointerPositionOnScreen()

Point2D mitk::InteractionPositionEvent::GetPointerPositionOnScreen ( ) const

Get the pointer position in display (screen) coordinates.

Returns
The 2D pointer position in pixels.

◆ GetPositionInWorld()

Point3D mitk::InteractionPositionEvent::GetPositionInWorld ( ) const

Get the pointer position converted to 3D world coordinates.

The conversion is performed via the sender renderer's DisplayToWorld() method.

Returns
The 3D world position corresponding to the pointer position.

◆ IsEqual()

bool mitk::InteractionPositionEvent::IsEqual ( const InteractionEvent &  ) const
overrideprotectedvirtual

◆ IsSuperClassOf()

bool mitk::InteractionPositionEvent::IsSuperClassOf ( const InteractionEvent::Pointer &  baseClass) const
overridevirtual

Check if the provided event is an InteractionPositionEvent or derived.

Parameters
[in]baseClassThe event to check.
Returns
true if baseClass is an InteractionPositionEvent or derived from it.

Reimplemented from mitk::InteractionEvent.

Reimplemented in mitk::MouseWheelEvent, mitk::MouseReleaseEvent, mitk::MousePressEvent, mitk::MouseMoveEvent, and mitk::MouseDoubleClickEvent.

◆ mitkClassMacro()

mitk::InteractionPositionEvent::mitkClassMacro ( InteractionPositionEvent  ,
InteractionEvent   
)

◆ mitkNewMacro2Param()

mitk::InteractionPositionEvent::mitkNewMacro2Param ( Self  ,
BaseRenderer *  ,
const Point2D &   
)

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