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
vtkSlicerMarkupsInteractionWidget Class Reference

Process interaction events to update state of interaction widgets. More...

#include <Modules/Loadable/Markups/VTKWidgets/vtkSlicerMarkupsInteractionWidget.h>

Inheritance diagram for vtkSlicerMarkupsInteractionWidget:
Collaboration diagram for vtkSlicerMarkupsInteractionWidget:

Public Member Functions

virtual void CreateDefaultRepresentation (vtkMRMLMarkupsDisplayNode *displayNode, vtkMRMLAbstractViewNode *viewNode, vtkRenderer *renderer)
 Create the default widget representation and initializes the widget and representation.
 
virtual vtkSlicerMarkupsInteractionWidgetCreateInstance () const
 
virtual void FlipPlaneHandles (bool flipLRHandle, bool flipPAHandle)
 
virtual void FlipROIHandles (bool flipLRHandle, bool flipPAHandle, bool flipISHandle)
 
int GetActiveComponentIndex () override
 
int GetActiveComponentType () override
 
virtual vtkMRMLMarkupsDisplayNodeGetDisplayNode ()
 
virtual vtkMRMLMarkupsNodeGetMarkupsNode ()
 
vtkMRMLNodeGetMRMLNode () override
 
bool ProcessInteractionEvent (vtkMRMLInteractionEventData *eventData) override
 Process interaction event.
 
bool ProcessWidgetJumpCursor (vtkMRMLInteractionEventData *eventData)
 
bool ProcessWidgetMenu (vtkMRMLInteractionEventData *eventData) override
 
void ScaleWidget (double eventPos[2], bool uniformScale=false) override
 
virtual void ScaleWidgetPlane (double eventPos[2], bool symmetricScale)
 
virtual void ScaleWidgetROI (double eventPos[2], bool symmetricScale)
 
void SetActiveComponentIndex (int type) override
 
void SetActiveComponentType (int type) override
 
- Public Member Functions inherited from vtkMRMLInteractionWidget
bool CanProcessInteractionEvent (vtkMRMLInteractionEventData *eventData, double &distance2) override
 Return true if the widget can process the event.
 
bool GetInteractive () override
 Allows the widget to request interactive mode (faster updates)
 
int GetMouseCursor () override
 Allows the widget to request a cursor shape.
 
void Leave (vtkMRMLInteractionEventData *eventData) override
 Called when the the widget loses the focus.
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
- Public Member Functions inherited from vtkMRMLAbstractWidget
virtual vtkWidgetEventTranslator * GetEventTranslator (int widgetState)
 
virtual bool GetGrabFocus ()
 
vtkMRMLInteractionNodeGetInteractionNode ()
 
vtkMRMLApplicationLogicGetMRMLApplicationLogic ()
 
virtual bool GetNeedToRender ()
 
virtual int GetNumberOfEventTranslators ()
 
vtkRenderer * GetRenderer ()
 
virtual vtkMRMLAbstractWidgetRepresentationGetRepresentation ()
 Get the representation.
 
virtual int GetWidgetState ()
 Convenient method to determine the state of the method.
 
virtual void NeedToRenderOff ()
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
void SetEventTranslation (int widgetState, unsigned long interactionEvent, int modifiers, unsigned long widgetEvent)
 
void SetEventTranslation (unsigned long interactionEvent, int modifiers, unsigned long widgetEvent)
 
void SetEventTranslationClickAndDrag (int widgetState, unsigned long startInteractionEvent, int modifiers, int widgetStateDragging, unsigned long widgetStartEvent, unsigned long widgetEndEvent)
 
void SetKeyboardEventTranslation (int modifier, char keyCode, int repeatCount, const char *keySym, unsigned long widgetEvent)
 
void SetKeyboardEventTranslation (int widgetState, int modifier, char keyCode, int repeatCount, const char *keySym, unsigned long widgetEvent)
 
virtual void SetMRMLApplicationLogic (vtkMRMLApplicationLogic *applicationLogic)
 
void SetRenderer (vtkRenderer *renderer)
 
virtual void SetRepresentation (vtkMRMLAbstractWidgetRepresentation *r)
 
virtual void SetWidgetState (int)
 Convenient method to change what state the widget is in.
 
virtual unsigned long TranslateInteractionEventToWidgetEvent (vtkMRMLInteractionEventData *eventData)
 Get widget event from translation event.
 
virtual void UpdateFromMRML (vtkMRMLNode *caller, unsigned long event, void *callData=nullptr)
 Build the actors of the representation with the info stored in the MRML scene.
 

Static Public Member Functions

static vtkSlicerMarkupsInteractionWidgetNew ()
 Instantiate this class.
 
static int IsTypeOf (const char *type)
 
static vtkMRMLInteractionWidgetSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkMRMLAbstractWidget
static int IsTypeOf (const char *type)
 
static vtkMRMLAbstractWidgetSafeDownCast (vtkObject *o)
 

Protected Member Functions

void ApplyTransform (vtkTransform *transform) override
 
 vtkSlicerMarkupsInteractionWidget ()
 
 ~vtkSlicerMarkupsInteractionWidget () override
 
- Protected Member Functions inherited from vtkMRMLInteractionWidget
void EndWidgetInteraction ()
 
virtual bool GetClosestPointOnInteractionAxis (int type, int index, const double inputDisplay[2], double outputIntersectionWorld[3])
 
virtual bool GetIntersectionOnAxisPlane (int type, int index, const double inputDisplay[2], double outputIntersectionWorld[3])
 
virtual bool JumpToHandlePosition (int type, int index)
 
virtual bool ProcessCancelEvent (vtkMRMLInteractionEventData *eventData)
 
virtual bool ProcessEndMouseDrag (vtkMRMLInteractionEventData *eventData)
 
virtual bool ProcessJumpCursor (vtkMRMLInteractionEventData *eventData)
 
virtual bool ProcessMouseMove (vtkMRMLInteractionEventData *eventData)
 
virtual bool ProcessWidgetMenuDisplayNodeTypeAndIndex (vtkMRMLInteractionEventData *eventData, vtkMRMLDisplayNode *displayNode, int type, int index)
 
virtual bool ProcessWidgetRotateStart (vtkMRMLInteractionEventData *eventData)
 
virtual bool ProcessWidgetScaleStart (vtkMRMLInteractionEventData *eventData)
 
virtual bool ProcessWidgetTranslateStart (vtkMRMLInteractionEventData *eventData)
 
virtual bool ProcessWidgetUniformScaleStart (vtkMRMLInteractionEventData *eventData)
 
virtual void RestoreInitialState ()
 
virtual void RotateWidget (double eventPos[2])
 
virtual void SaveInitialState ()
 
void StartWidgetInteraction (vtkMRMLInteractionEventData *eventData)
 
virtual void TranslateWidget (double eventPos[2])
 
 vtkMRMLInteractionWidget ()
 
 ~vtkMRMLInteractionWidget () override
 
- Protected Member Functions inherited from vtkMRMLAbstractWidget
bool CanProcessButtonClickEvent (vtkMRMLInteractionEventData *eventData, double &distance2)
 Generate a button click event and checks if it can be processed with CanProcessInteractionEvent.
 
const char * GetAssociatedNodeID (vtkMRMLInteractionEventData *eventData)
 
virtual int ProcessButtonClickEvent (vtkMRMLInteractionEventData *eventData)
 
unsigned long TranslateInteractionEventToWidgetEvent (vtkWidgetEventTranslator *translator, vtkMRMLInteractionEventData *eventData)
 Helper function that attempts to translate an event with a specific translator only.
 
 vtkMRMLAbstractWidget ()
 
 ~vtkMRMLAbstractWidget () override
 
typedef vtkMRMLInteractionWidget Superclass
 
static int IsTypeOf (const char *type)
 
static vtkSlicerMarkupsInteractionWidgetSafeDownCast (vtkObject *o)
 
virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 

Additional Inherited Members

- Public Types inherited from vtkMRMLInteractionWidget
enum  {
  WidgetEventInteraction_First = WidgetEventUser , WidgetEventReserved = WidgetEventInteraction_First , WidgetEventUniformScaleStart , WidgetEventUniformScaleEnd ,
  WidgetEventCancel , WidgetEventInteraction_Last
}
 Widget events. More...
 
enum  { InteractionNone , InteractionTranslationHandle , InteractionRotationHandle , InteractionScaleHandle }
 
enum  {
  WidgetStateInteraction_First = WidgetStateUser , WidgetStateOnTranslationHandle = WidgetStateInteraction_First , WidgetStateOnRotationHandle , WidgetStateOnScaleHandle ,
  WidgetStateUniformScale , WidgetStateInteraction_Last
}
 Widget states. More...
 
typedef vtkMRMLAbstractWidget Superclass
 
- Public Types inherited from vtkMRMLAbstractWidget
enum  {
  WidgetStateAny , WidgetStateIdle , WidgetStateOnWidget , WidgetStateTranslate ,
  WidgetStateRotate , WidgetStateScale , WidgetStateUser
}
 The state of the widget. More...
 
typedef vtkObject Superclass
 Standard methods for a VTK class.
 
enum  WidgetEvents {
  WidgetEventNone , WidgetEventMouseMove , WidgetEventTranslateStart , WidgetEventTranslateEnd ,
  WidgetEventRotateStart , WidgetEventRotateEnd , WidgetEventScaleStart , WidgetEventScaleEnd ,
  WidgetEventPick , WidgetEventJumpCursor , WidgetEventAction , WidgetEventCustomAction1 ,
  WidgetEventCustomAction2 , WidgetEventCustomAction3 , WidgetEventCustomAction4 , WidgetEventCustomAction5 ,
  WidgetEventCustomAction6 , WidgetEventSelect , WidgetEventUnselect , WidgetEventToggleSelect ,
  WidgetEventMenu , WidgetEventReset , WidgetEventUser
}
 Widget events. More...
 
- Protected Attributes inherited from vtkMRMLInteractionWidget
double LastEventPosition [2]
 Variables for translate/rotate/scale.
 
vtkSmartPointer< vtkMRMLNodeOriginalStateNode { nullptr }
 
int PreviewPointIndex
 
- Protected Attributes inherited from vtkMRMLAbstractWidget
vtkWeakPointer< vtkMRMLApplicationLogicApplicationLogic
 
std::vector< vtkSmartPointer< vtkWidgetEventTranslator > > EventTranslators
 
vtkWeakPointer< vtkRenderer > Renderer
 
vtkSmartPointer< vtkMRMLAbstractWidgetRepresentationWidgetRep
 
int WidgetState
 

Detailed Description

Process interaction events to update state of interaction widgets.

See also
vtkMRMLAbstractWidget vtkSlicerWidgetRepresentation vtkSlicerWidgetEventTranslator

Definition at line 46 of file vtkSlicerMarkupsInteractionWidget.h.

Member Typedef Documentation

◆ Superclass

Constructor & Destructor Documentation

◆ vtkSlicerMarkupsInteractionWidget()

vtkSlicerMarkupsInteractionWidget::vtkSlicerMarkupsInteractionWidget ( )
protected

◆ ~vtkSlicerMarkupsInteractionWidget()

vtkSlicerMarkupsInteractionWidget::~vtkSlicerMarkupsInteractionWidget ( )
overrideprotected

Member Function Documentation

◆ ApplyTransform()

void vtkSlicerMarkupsInteractionWidget::ApplyTransform ( vtkTransform * transform)
overrideprotectedvirtual

◆ CreateDefaultRepresentation()

virtual void vtkSlicerMarkupsInteractionWidget::CreateDefaultRepresentation ( vtkMRMLMarkupsDisplayNode * displayNode,
vtkMRMLAbstractViewNode * viewNode,
vtkRenderer * renderer )
virtual

Create the default widget representation and initializes the widget and representation.

◆ CreateInstance()

virtual vtkSlicerMarkupsInteractionWidget * vtkSlicerMarkupsInteractionWidget::CreateInstance ( ) const
virtual

◆ FlipPlaneHandles()

virtual void vtkSlicerMarkupsInteractionWidget::FlipPlaneHandles ( bool flipLRHandle,
bool flipPAHandle )
virtual

◆ FlipROIHandles()

virtual void vtkSlicerMarkupsInteractionWidget::FlipROIHandles ( bool flipLRHandle,
bool flipPAHandle,
bool flipISHandle )
virtual

◆ GetActiveComponentIndex()

int vtkSlicerMarkupsInteractionWidget::GetActiveComponentIndex ( )
overridevirtual

Reimplemented from vtkMRMLInteractionWidget.

◆ GetActiveComponentType()

int vtkSlicerMarkupsInteractionWidget::GetActiveComponentType ( )
overridevirtual

Reimplemented from vtkMRMLInteractionWidget.

◆ GetClassName()

virtual const char * vtkSlicerMarkupsInteractionWidget::GetClassName ( )
virtual

Reimplemented from vtkMRMLInteractionWidget.

◆ GetDisplayNode()

virtual vtkMRMLMarkupsDisplayNode * vtkSlicerMarkupsInteractionWidget::GetDisplayNode ( )
virtual

◆ GetMarkupsNode()

virtual vtkMRMLMarkupsNode * vtkSlicerMarkupsInteractionWidget::GetMarkupsNode ( )
virtual

◆ GetMRMLNode()

vtkMRMLNode * vtkSlicerMarkupsInteractionWidget::GetMRMLNode ( )
overridevirtual

◆ IsA()

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

Reimplemented from vtkMRMLInteractionWidget.

◆ IsTypeOf()

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

◆ New()

static vtkSlicerMarkupsInteractionWidget * vtkSlicerMarkupsInteractionWidget::New ( )
static

Instantiate this class.

◆ PrintSelf()

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

◆ ProcessInteractionEvent()

bool vtkSlicerMarkupsInteractionWidget::ProcessInteractionEvent ( vtkMRMLInteractionEventData * eventData)
overridevirtual

Process interaction event.

Reimplemented from vtkMRMLInteractionWidget.

◆ ProcessWidgetJumpCursor()

bool vtkSlicerMarkupsInteractionWidget::ProcessWidgetJumpCursor ( vtkMRMLInteractionEventData * eventData)

◆ ProcessWidgetMenu()

bool vtkSlicerMarkupsInteractionWidget::ProcessWidgetMenu ( vtkMRMLInteractionEventData * eventData)
overridevirtual

◆ SafeDownCast()

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

◆ ScaleWidget()

void vtkSlicerMarkupsInteractionWidget::ScaleWidget ( double eventPos[2],
bool uniformScale = false )
overridevirtual

Reimplemented from vtkMRMLInteractionWidget.

◆ ScaleWidgetPlane()

virtual void vtkSlicerMarkupsInteractionWidget::ScaleWidgetPlane ( double eventPos[2],
bool symmetricScale )
virtual

◆ ScaleWidgetROI()

virtual void vtkSlicerMarkupsInteractionWidget::ScaleWidgetROI ( double eventPos[2],
bool symmetricScale )
virtual

◆ SetActiveComponentIndex()

void vtkSlicerMarkupsInteractionWidget::SetActiveComponentIndex ( int type)
overridevirtual

Reimplemented from vtkMRMLInteractionWidget.

◆ SetActiveComponentType()

void vtkSlicerMarkupsInteractionWidget::SetActiveComponentType ( int type)
overridevirtual

Reimplemented from vtkMRMLInteractionWidget.


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