![]() |
Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
Process interaction events to update state of interaction widgets. More...
#include <Libs/MRML/DisplayableManager/vtkMRMLInteractionWidget.h>
Public Member Functions | |
bool | CanProcessInteractionEvent (vtkMRMLInteractionEventData *eventData, double &distance2) override |
Return true if the widget can process the event. | |
virtual int | GetActiveComponentIndex () |
virtual int | GetActiveComponentType () |
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. | |
bool | ProcessInteractionEvent (vtkMRMLInteractionEventData *eventData) override |
Process interaction event. | |
virtual void | SetActiveComponentIndex (int index) |
virtual void | SetActiveComponentType (int type) |
![]() | |
virtual vtkWidgetEventTranslator * | GetEventTranslator (int widgetState) |
virtual bool | GetGrabFocus () |
vtkMRMLInteractionNode * | GetInteractionNode () |
vtkMRMLApplicationLogic * | GetMRMLApplicationLogic () |
virtual bool | GetNeedToRender () |
virtual int | GetNumberOfEventTranslators () |
vtkRenderer * | GetRenderer () |
virtual vtkMRMLAbstractWidgetRepresentation * | GetRepresentation () |
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. | |
Protected Member Functions | |
virtual void | ApplyTransform (vtkTransform *transform)=0 |
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 vtkMRMLNode * | GetMRMLNode ()=0 |
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 | ProcessWidgetMenu (vtkMRMLInteractionEventData *eventData)=0 |
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 () |
virtual void | ScaleWidget (double eventPos[2], bool uniform=false) |
void | StartWidgetInteraction (vtkMRMLInteractionEventData *eventData) |
virtual void | TranslateWidget (double eventPos[2]) |
vtkMRMLInteractionWidget () | |
~vtkMRMLInteractionWidget () override | |
![]() | |
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 | |
Protected Attributes | |
double | LastEventPosition [2] |
Variables for translate/rotate/scale. | |
vtkSmartPointer< vtkMRMLNode > | OriginalStateNode { nullptr } |
int | PreviewPointIndex |
![]() | |
vtkWeakPointer< vtkMRMLApplicationLogic > | ApplicationLogic |
std::vector< vtkSmartPointer< vtkWidgetEventTranslator > > | EventTranslators |
vtkWeakPointer< vtkRenderer > | Renderer |
vtkSmartPointer< vtkMRMLAbstractWidgetRepresentation > | WidgetRep |
int | WidgetState |
typedef vtkMRMLAbstractWidget | Superclass |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) override |
static int | IsTypeOf (const char *type) |
static vtkMRMLInteractionWidget * | SafeDownCast (vtkObject *o) |
Additional Inherited Members | |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkMRMLAbstractWidget * | SafeDownCast (vtkObject *o) |
Process interaction events to update state of interaction widgets.
Definition at line 49 of file vtkMRMLInteractionWidget.h.
Standard VTK class macros.
Definition at line 55 of file vtkMRMLInteractionWidget.h.
anonymous enum |
Widget events.
Enumerator | |
---|---|
WidgetEventInteraction_First | |
WidgetEventReserved | |
WidgetEventUniformScaleStart | |
WidgetEventUniformScaleEnd | |
WidgetEventCancel | |
WidgetEventInteraction_Last |
Definition at line 79 of file vtkMRMLInteractionWidget.h.
anonymous enum |
Enumerator | |
---|---|
InteractionNone | |
InteractionTranslationHandle | |
InteractionRotationHandle | |
InteractionScaleHandle |
Definition at line 59 of file vtkMRMLInteractionWidget.h.
anonymous enum |
Widget states.
Enumerator | |
---|---|
WidgetStateInteraction_First | |
WidgetStateOnTranslationHandle | |
WidgetStateOnRotationHandle | |
WidgetStateOnScaleHandle | |
WidgetStateUniformScale | |
WidgetStateInteraction_Last |
Definition at line 68 of file vtkMRMLInteractionWidget.h.
|
protected |
|
overrideprotected |
|
protectedpure virtual |
Implemented in vtkMRMLTransformHandleWidget, and vtkSlicerMarkupsInteractionWidget.
|
overridevirtual |
Return true if the widget can process the event.
Reimplemented from vtkMRMLAbstractWidget.
Reimplemented in vtkMRMLTransformHandleWidget.
|
protected |
|
virtual |
Reimplemented in vtkSlicerMarkupsInteractionWidget.
|
virtual |
Reimplemented in vtkSlicerMarkupsInteractionWidget.
|
virtual |
Reimplemented from vtkMRMLAbstractWidget.
Reimplemented in vtkMRMLTransformHandleWidget, and vtkSlicerMarkupsInteractionWidget.
|
protectedvirtual |
Get the closest point on the line defined by the interaction handle axis. Input coordinates are in display coordinates, while output are in world coordinates.
|
overridevirtual |
Allows the widget to request interactive mode (faster updates)
Reimplemented from vtkMRMLAbstractWidget.
|
protectedvirtual |
Get the closest point on the plane defined using the interaction handle axis as the plane normal. Input coordinates are in display coordinates, while output are in world coordinates
|
overridevirtual |
Allows the widget to request a cursor shape.
Reimplemented from vtkMRMLAbstractWidget.
|
protectedpure virtual |
Implemented in vtkMRMLTransformHandleWidget, and vtkSlicerMarkupsInteractionWidget.
|
virtual |
Reimplemented from vtkMRMLAbstractWidget.
Reimplemented in vtkMRMLTransformHandleWidget, and vtkSlicerMarkupsInteractionWidget.
|
static |
|
protectedvirtual |
|
overridevirtual |
Called when the the widget loses the focus.
Reimplemented from vtkMRMLAbstractWidget.
|
override |
|
protectedvirtual |
|
protectedvirtual |
Reimplemented in vtkMRMLTransformHandleWidget.
|
overridevirtual |
Process interaction event.
Reimplemented from vtkMRMLAbstractWidget.
Reimplemented in vtkMRMLTransformHandleWidget, and vtkSlicerMarkupsInteractionWidget.
|
protectedvirtual |
Reimplemented in vtkMRMLTransformHandleWidget.
|
protectedvirtual |
Callback interface to capture events when placing the widget. Return true if the event is processed.
Reimplemented in vtkMRMLTransformHandleWidget.
|
protectedpure virtual |
Implemented in vtkMRMLTransformHandleWidget, and vtkSlicerMarkupsInteractionWidget.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
static |
|
protectedvirtual |
|
protectedvirtual |
Reimplemented in vtkSlicerMarkupsInteractionWidget.
|
virtual |
Reimplemented in vtkSlicerMarkupsInteractionWidget.
|
virtual |
Reimplemented in vtkSlicerMarkupsInteractionWidget.
|
protected |
|
protectedvirtual |
|
protected |
Variables for translate/rotate/scale.
Definition at line 155 of file vtkMRMLInteractionWidget.h.
|
protected |
Definition at line 157 of file vtkMRMLInteractionWidget.h.
|
protected |
Index of the control point that is currently being previewed (follows the mouse pointer). If <0 it means that there is currently no point being previewed.
Definition at line 123 of file vtkMRMLInteractionWidget.h.