Slicer  4.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions
vtkSlicerClosedCurveWidget Class Reference

create a curve with a set of N points More...

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

Inheritance diagram for vtkSlicerClosedCurveWidget:
Inheritance graph
[legend]
Collaboration diagram for vtkSlicerClosedCurveWidget:
Collaboration graph
[legend]

Public Types

typedef vtkSlicerMarkupsWidget Superclass
 Standard methods for a VTK class. More...
 
- Public Types inherited from vtkSlicerMarkupsWidget
enum  { WidgetStateDefine = WidgetStateUser, WidgetStateTranslateControlPoint }
 Widget states. More...
 
enum  {
  WidgetEventControlPointPlace = WidgetEventUser, WidgetEventStopPlace, WidgetEventControlPointMoveStart, WidgetEventControlPointMoveEnd,
  WidgetEventControlPointDelete, WidgetEventControlPointInsert, WidgetEventControlPointSnapToSlice
}
 Widget events. More...
 
typedef vtkMRMLAbstractWidget Superclass
 Standard methods for a VTK class. More...
 
- 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. More...
 
enum  WidgetEvents {
  WidgetEventNone, WidgetEventMouseMove, WidgetEventTranslateStart, WidgetEventTranslateEnd,
  WidgetEventRotateStart, WidgetEventRotateEnd, WidgetEventScaleStart, WidgetEventScaleEnd,
  WidgetEventPick, WidgetEventJumpCursor, WidgetEventAction, WidgetEventCustomAction1,
  WidgetEventCustomAction2, WidgetEventCustomAction3, WidgetEventSelect, WidgetEventUnselect,
  WidgetEventToggleSelect, WidgetEventMenu, WidgetEventReset, WidgetEventUser
}
 Widget events. More...
 

Public Member Functions

void CreateDefaultRepresentation (vtkMRMLMarkupsDisplayNode *markupsDisplayNode, vtkMRMLAbstractViewNode *viewNode, vtkRenderer *renderer) override
 Create the default widget representation and initializes the widget and representation. More...
 
virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
- Public Member Functions inherited from vtkSlicerMarkupsWidget
virtual int AddNodeOnWidget (const int displayPos[2])
 
virtual int AddPointFromWorldCoordinate (const double worldCoordinates[3])
 Add a point to the current active Markup at input World coordinates. More...
 
bool CanProcessInteractionEvent (vtkMRMLInteractionEventData *eventData, double &distance2) override
 Return true if the widget can process the event. More...
 
int GetActiveControlPoint ()
 
bool GetInteractive () override
 
vtkMRMLMarkupsDisplayNodeGetMarkupsDisplayNode ()
 
vtkMRMLMarkupsNodeGetMarkupsNode ()
 
vtkSlicerMarkupsWidgetRepresentationGetMarkupsRepresentation ()
 
int GetMouseCursor () override
 
bool IsPointPreviewed ()
 
void Leave (vtkMRMLInteractionEventData *eventData) override
 Called when the the widget loses the focus. More...
 
bool PlacePoint (vtkMRMLInteractionEventData *eventData)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
bool ProcessInteractionEvent (vtkMRMLInteractionEventData *eventData) override
 Process interaction event. More...
 
bool RemovePreviewPoint ()
 
void UpdatePreviewPoint (vtkMRMLInteractionEventData *eventData, const char *associatedNodeID, int positionStatus)
 Add/update a point preview to the current active Markup at the specified position. More...
 
- Public Member Functions inherited from vtkMRMLAbstractWidget
virtual bool GetGrabFocus ()
 
vtkMRMLInteractionNodeGetInteractionNode ()
 
vtkMRMLApplicationLogicGetMRMLApplicationLogic ()
 
virtual bool GetNeedToRender ()
 
virtual vtkRenderer * GetRenderer ()
 
virtual vtkMRMLAbstractWidgetRepresentationGetRepresentation ()
 Get the representation. More...
 
virtual int GetWidgetState ()
 Convenient method to determine the state of the method. More...
 
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. More...
 
virtual unsigned long TranslateInteractionEventToWidgetEvent (vtkMRMLInteractionEventData *eventData)
 Get widget event from translation event. More...
 
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. More...
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkSlicerClosedCurveWidgetNew ()
 Instantiate this class. More...
 
static vtkSlicerClosedCurveWidgetSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkSlicerMarkupsWidget
static int IsTypeOf (const char *type)
 
static vtkSlicerMarkupsWidgetSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkMRMLAbstractWidget
static int IsTypeOf (const char *type)
 
static vtkMRMLAbstractWidgetSafeDownCast (vtkObject *o)
 

Protected Member Functions

 vtkSlicerClosedCurveWidget ()
 
 ~vtkSlicerClosedCurveWidget () override
 
- Protected Member Functions inherited from vtkSlicerMarkupsWidget
bool ConvertDisplayPositionToWorld (const int displayPos[2], double worldPos[3], double worldOrientationMatrix[9], double *refWorldPos=nullptr)
 
void EndWidgetInteraction ()
 
bool IsAnyControlPointLocked ()
 
virtual bool ProcessControlPointDelete (vtkMRMLInteractionEventData *eventData)
 
virtual bool ProcessControlPointInsert (vtkMRMLInteractionEventData *eventData)
 
virtual bool ProcessControlPointMoveStart (vtkMRMLInteractionEventData *eventData)
 
virtual bool ProcessControlPointSnapToSlice (vtkMRMLInteractionEventData *eventData)
 
virtual bool ProcessEndMouseDrag (vtkMRMLInteractionEventData *eventData)
 
virtual bool ProcessMouseMove (vtkMRMLInteractionEventData *eventData)
 
virtual bool ProcessWidgetAction (vtkMRMLInteractionEventData *eventData)
 
virtual bool ProcessWidgetJumpCursor (vtkMRMLInteractionEventData *eventData)
 
virtual bool ProcessWidgetMenu (vtkMRMLInteractionEventData *eventData)
 
virtual bool ProcessWidgetReset (vtkMRMLInteractionEventData *eventData)
 
virtual bool ProcessWidgetRotateStart (vtkMRMLInteractionEventData *eventData)
 
virtual bool ProcessWidgetScaleStart (vtkMRMLInteractionEventData *eventData)
 
virtual bool ProcessWidgetTranslateStart (vtkMRMLInteractionEventData *eventData)
 
virtual void RotateWidget (double eventPos[2])
 
virtual void ScaleWidget (double eventPos[2])
 
void StartWidgetInteraction (vtkMRMLInteractionEventData *eventData)
 
virtual void TranslatePoint (double eventPos[2], bool snapToSlice=false)
 
virtual void TranslateWidget (double eventPos[2])
 
 vtkSlicerMarkupsWidget ()
 
 ~vtkSlicerMarkupsWidget () override
 
- Protected Member Functions inherited from vtkMRMLAbstractWidget
const char * GetAssociatedNodeID (vtkMRMLInteractionEventData *eventData)
 
unsigned long TranslateInteractionEventToWidgetEvent (vtkWidgetEventTranslator *translator, vtkMRMLInteractionEventData *eventData)
 Helper function that attempts to translate an event with a specific translator only. More...
 
 vtkMRMLAbstractWidget ()
 
 ~vtkMRMLAbstractWidget () override
 

Static Protected Member Functions

static void AddPointOnCurveAction (vtkAbstractWidget *)
 

Additional Inherited Members

- Protected Attributes inherited from vtkSlicerMarkupsWidget
double LastEventPosition [2]
 
bool MousePressedSinceMarkupPlace
 
int PreviewPointIndex
 
double StartEventOffsetPosition [2]
 
- Protected Attributes inherited from vtkMRMLAbstractWidget
vtkMRMLApplicationLogicApplicationLogic
 
std::vector< vtkSmartPointer< vtkWidgetEventTranslator > > EventTranslators
 
vtkRenderer * Renderer
 
vtkSmartPointer< vtkMRMLAbstractWidgetRepresentationWidgetRep
 
int WidgetState
 

Detailed Description

create a curve with a set of N points

The vtkSlicerClosedCurveWidget is used to create a closed curve widget with a set of N points. The widget handles all processing of widget events (that are triggered by VTK events). The vtkSlicerCurveRepresentation is responsible for all placement of the points, and curve manipulation. This is done through a main helper class: vtkPointPlacer. The representation is also responsible for drawing the points.

Event Bindings:
By default, the widget responds to the following VTK events (i.e., it watches the vtkRenderWindowInteractor for these events):
  LeftButtonPressEvent - triggers a Select event
  Alt + LeftButtonPressEvent - triggers a Rotate event
  MiddleButtonPressEvent - triggers a Translate event
  RightButtonPressEvent - triggers a Pick event
  Alt + RightButtonPressEvent - triggers a Scale event

MouseMoveEvent - triggers a Move event

  LeftButtonReleaseEvent - triggers an EndAction event
  MiddleButtonReleaseEvent - triggers an EndAction event
  RightButtonReleaseEvent - triggers an EndAction event
  LeftButtonDoubleClickEvent - triggers an Pick event
  MiddleButtonDoubleClickEvent - triggers an Pick event
  RightButtonDoubleClickEvent - triggers an Pick event
  Delete key event - triggers a Delete event
  Shift + Delete key event - triggers a Reset event

Definition at line 68 of file vtkSlicerClosedCurveWidget.h.

Member Typedef Documentation

◆ Superclass

Standard methods for a VTK class.

Definition at line 75 of file vtkSlicerClosedCurveWidget.h.

Constructor & Destructor Documentation

◆ vtkSlicerClosedCurveWidget()

vtkSlicerClosedCurveWidget::vtkSlicerClosedCurveWidget ( )
protected

◆ ~vtkSlicerClosedCurveWidget()

vtkSlicerClosedCurveWidget::~vtkSlicerClosedCurveWidget ( )
overrideprotected

Member Function Documentation

◆ AddPointOnCurveAction()

static void vtkSlicerClosedCurveWidget::AddPointOnCurveAction ( vtkAbstractWidget *  )
staticprotected

◆ CreateDefaultRepresentation()

void vtkSlicerClosedCurveWidget::CreateDefaultRepresentation ( vtkMRMLMarkupsDisplayNode markupsDisplayNode,
vtkMRMLAbstractViewNode viewNode,
vtkRenderer *  renderer 
)
overridevirtual

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

Implements vtkSlicerMarkupsWidget.

◆ GetClassName()

virtual const char* vtkSlicerClosedCurveWidget::GetClassName ( )
virtual

Reimplemented from vtkSlicerMarkupsWidget.

◆ IsA()

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

Reimplemented from vtkSlicerMarkupsWidget.

◆ IsTypeOf()

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

◆ New()

static vtkSlicerClosedCurveWidget* vtkSlicerClosedCurveWidget::New ( )
static

Instantiate this class.

◆ SafeDownCast()

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

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