Slicer  5.2
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
vtkSlicerPlaneWidget Class Reference

create a plane with a set of 3 points More...

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

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

Public Types

enum  { WidgetStateTranslatePlane = WidgetStateMarkups_Last, WidgetStateSymmetricScale, WidgetStateMarkupsPlane_Last }
 Widget states. More...
 
enum  {
  WidgetEventControlPointPlace = WidgetEventMarkups_Last, WidgetEventControlPointPlacePlaneNormal, WidgetEventPlaneMoveStart, WidgetEventPlaneMoveEnd,
  WidgetEventSymmetricScaleStart, WidgetEventSymmetricScaleEnd, WidgetEventMarkupsPlane_Last
}
 Widget events. More...
 
typedef vtkSlicerMarkupsWidget Superclass
 Standard methods for a VTK class. More...
 
- Public Types inherited from vtkSlicerMarkupsWidget
enum  {
  WidgetStateDefine = WidgetStateUser, WidgetStateTranslateControlPoint, WidgetStateOnTranslationHandle, WidgetStateOnRotationHandle,
  WidgetStateOnScaleHandle, WidgetStateMarkups_Last
}
 Widget states. More...
 
enum  {
  WidgetEventControlPointPlace = WidgetEventUser, WidgetEventClickAndDragStart, WidgetEventClickAndDragEnd, WidgetEventStopPlace,
  WidgetEventControlPointMoveStart, WidgetEventControlPointMoveEnd, WidgetEventControlPointDelete, WidgetEventControlPointInsert,
  WidgetEventControlPointSnapToSlice, WidgetEventReserved, WidgetEventMarkups_Last
}
 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, WidgetEventCustomAction4, WidgetEventCustomAction5,
  WidgetEventCustomAction6, WidgetEventSelect, WidgetEventUnselect, WidgetEventToggleSelect,
  WidgetEventMenu, WidgetEventReset, WidgetEventUser
}
 Widget events. More...
 

Public Member Functions

bool CanProcessInteractionEvent (vtkMRMLInteractionEventData *eventData, double &distance2) override
 Return true if the widget can process the event. More...
 
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)
 
virtual bool PlacePlaneNormal (vtkMRMLInteractionEventData *eventData)
 
bool PlacePoint (vtkMRMLInteractionEventData *eventData) override
 
bool ProcessEndMouseDrag (vtkMRMLInteractionEventData *eventData) override
 
bool ProcessInteractionEvent (vtkMRMLInteractionEventData *eventData) override
 Process interaction event. More...
 
bool ProcessMouseMove (vtkMRMLInteractionEventData *eventData) override
 
bool ProcessPlaneMoveEnd (vtkMRMLInteractionEventData *event)
 
bool ProcessPlaneMoveStart (vtkMRMLInteractionEventData *event)
 
bool ProcessPlaneSymmetricScale (vtkMRMLInteractionEventData *event)
 
bool ProcessPlaneTranslate (vtkMRMLInteractionEventData *event)
 
bool ProcessUpdatePlaneFromViewNormal (vtkMRMLInteractionEventData *event)
 
bool ProcessWidgetStopPlace (vtkMRMLInteractionEventData *eventData) override
 
bool ProcessWidgetSymmetricScaleStart (vtkMRMLInteractionEventData *eventData)
 
 vtkSlicerMarkupsWidgetCreateInstanceMacro (vtkSlicerPlaneWidget)
 Create instance of the markups widget. More...
 
- 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...
 
virtual vtkSlicerMarkupsWidgetCreateInstance () const =0
 Create instance of the markups widget. More...
 
int GetActiveComponentIndex ()
 
int GetActiveComponentType ()
 
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...
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
bool RemovePreviewPoint ()
 
vtkMRMLSelectionNodeselectionNode ()
 
void UpdatePreviewPoint (vtkMRMLInteractionEventData *eventData, const char *associatedNodeID, int positionStatus)
 Add/update a point preview to the current active Markup at the specified position. More...
 
void UpdatePreviewPointIndex (vtkMRMLInteractionEventData *eventData)
 Update a the current index of the point preview being previewed. More...
 
- 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. 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 vtkSlicerPlaneWidgetNew ()
 Instantiate this class. More...
 
static vtkSlicerPlaneWidgetSafeDownCast (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

void FlipPlaneHandles (bool flipLRHandle, bool flipAPHandle)
 
void RotateWidget (double eventPos[2]) override
 
void ScaleWidget (double eventPos[2]) override
 
virtual void ScaleWidget (double eventPos[2], bool symmetricScale)
 
 vtkSlicerPlaneWidget ()
 
 ~vtkSlicerPlaneWidget () override
 
- Protected Member Functions inherited from vtkSlicerMarkupsWidget
bool ConvertDisplayPositionToWorld (const int displayPos[2], double worldPos[3], double worldOrientationMatrix[9], double *refWorldPos=nullptr)
 
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])
 
bool IsAnyControlPointLocked ()
 
virtual bool ProcessControlPointDelete (vtkMRMLInteractionEventData *eventData)
 
virtual bool ProcessControlPointInsert (vtkMRMLInteractionEventData *eventData)
 
virtual bool ProcessControlPointMoveStart (vtkMRMLInteractionEventData *eventData)
 
virtual bool ProcessControlPointSnapToSlice (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)
 
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
bool CanProcessButtonClickEvent (vtkMRMLInteractionEventData *eventData, double &distance2)
 Generate a button click event and checks if it can be processed with CanProcessInteractionEvent. More...
 
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. More...
 
 vtkMRMLAbstractWidget ()
 
 ~vtkMRMLAbstractWidget () override
 

Additional Inherited Members

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

Detailed Description

create a plane with a set of 3 points

The vtkSlicerPlaneWidget is used to create a plane widget with a set of 3 points.

Definition at line 39 of file vtkSlicerPlaneWidget.h.

Member Typedef Documentation

◆ Superclass

Standard methods for a VTK class.

Definition at line 46 of file vtkSlicerPlaneWidget.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Widget states.

Enumerator
WidgetStateTranslatePlane 
WidgetStateSymmetricScale 
WidgetStateMarkupsPlane_Last 

Definition at line 52 of file vtkSlicerPlaneWidget.h.

◆ anonymous enum

anonymous enum

Widget events.

Enumerator
WidgetEventControlPointPlace 
WidgetEventControlPointPlacePlaneNormal 
WidgetEventPlaneMoveStart 
WidgetEventPlaneMoveEnd 
WidgetEventSymmetricScaleStart 
WidgetEventSymmetricScaleEnd 
WidgetEventMarkupsPlane_Last 

Definition at line 60 of file vtkSlicerPlaneWidget.h.

Constructor & Destructor Documentation

◆ vtkSlicerPlaneWidget()

vtkSlicerPlaneWidget::vtkSlicerPlaneWidget ( )
protected

◆ ~vtkSlicerPlaneWidget()

vtkSlicerPlaneWidget::~vtkSlicerPlaneWidget ( )
overrideprotected

Member Function Documentation

◆ CanProcessInteractionEvent()

bool vtkSlicerPlaneWidget::CanProcessInteractionEvent ( vtkMRMLInteractionEventData eventData,
double &  distance2 
)
overridevirtual

Return true if the widget can process the event.

Reimplemented from vtkSlicerMarkupsWidget.

◆ CreateDefaultRepresentation()

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

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

Implements vtkSlicerMarkupsWidget.

◆ FlipPlaneHandles()

void vtkSlicerPlaneWidget::FlipPlaneHandles ( bool  flipLRHandle,
bool  flipAPHandle 
)
protected

Flip the selected index across the specified axis. Ex. Switch between L–R face. Used when the user drags an ROI handle across the ROI origin.

◆ GetClassName()

virtual const char* vtkSlicerPlaneWidget::GetClassName ( )
virtual

Reimplemented from vtkSlicerMarkupsWidget.

◆ IsA()

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

Reimplemented from vtkSlicerMarkupsWidget.

◆ IsTypeOf()

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

◆ New()

static vtkSlicerPlaneWidget* vtkSlicerPlaneWidget::New ( )
static

Instantiate this class.

◆ PlacePlaneNormal()

virtual bool vtkSlicerPlaneWidget::PlacePlaneNormal ( vtkMRMLInteractionEventData eventData)
virtual

◆ PlacePoint()

bool vtkSlicerPlaneWidget::PlacePoint ( vtkMRMLInteractionEventData eventData)
overridevirtual

Reimplemented from vtkSlicerMarkupsWidget.

◆ ProcessEndMouseDrag()

bool vtkSlicerPlaneWidget::ProcessEndMouseDrag ( vtkMRMLInteractionEventData eventData)
overridevirtual

Reimplemented from vtkSlicerMarkupsWidget.

◆ ProcessInteractionEvent()

bool vtkSlicerPlaneWidget::ProcessInteractionEvent ( vtkMRMLInteractionEventData eventData)
overridevirtual

Process interaction event.

Reimplemented from vtkSlicerMarkupsWidget.

◆ ProcessMouseMove()

bool vtkSlicerPlaneWidget::ProcessMouseMove ( vtkMRMLInteractionEventData eventData)
overridevirtual

Reimplemented from vtkSlicerMarkupsWidget.

◆ ProcessPlaneMoveEnd()

bool vtkSlicerPlaneWidget::ProcessPlaneMoveEnd ( vtkMRMLInteractionEventData event)

◆ ProcessPlaneMoveStart()

bool vtkSlicerPlaneWidget::ProcessPlaneMoveStart ( vtkMRMLInteractionEventData event)

◆ ProcessPlaneSymmetricScale()

bool vtkSlicerPlaneWidget::ProcessPlaneSymmetricScale ( vtkMRMLInteractionEventData event)

◆ ProcessPlaneTranslate()

bool vtkSlicerPlaneWidget::ProcessPlaneTranslate ( vtkMRMLInteractionEventData event)

◆ ProcessUpdatePlaneFromViewNormal()

bool vtkSlicerPlaneWidget::ProcessUpdatePlaneFromViewNormal ( vtkMRMLInteractionEventData event)

◆ ProcessWidgetStopPlace()

bool vtkSlicerPlaneWidget::ProcessWidgetStopPlace ( vtkMRMLInteractionEventData eventData)
overridevirtual

Reimplemented from vtkSlicerMarkupsWidget.

◆ ProcessWidgetSymmetricScaleStart()

bool vtkSlicerPlaneWidget::ProcessWidgetSymmetricScaleStart ( vtkMRMLInteractionEventData eventData)

◆ RotateWidget()

void vtkSlicerPlaneWidget::RotateWidget ( double  eventPos[2])
overrideprotectedvirtual

Reimplemented from vtkSlicerMarkupsWidget.

◆ SafeDownCast()

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

◆ ScaleWidget() [1/2]

void vtkSlicerPlaneWidget::ScaleWidget ( double  eventPos[2])
overrideprotectedvirtual

Reimplemented from vtkSlicerMarkupsWidget.

◆ ScaleWidget() [2/2]

virtual void vtkSlicerPlaneWidget::ScaleWidget ( double  eventPos[2],
bool  symmetricScale 
)
protectedvirtual

◆ vtkSlicerMarkupsWidgetCreateInstanceMacro()

vtkSlicerPlaneWidget::vtkSlicerMarkupsWidgetCreateInstanceMacro ( vtkSlicerPlaneWidget  )

Create instance of the markups widget.


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