![]() |
Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
Class for rendering interaction handles. More...
#include <Libs/MRML/DisplayableManager/vtkMRMLInteractionWidgetRepresentation.h>
Classes | |
struct | HandleInfo |
class | InteractionPipeline |
Public Types | |
enum | { InteractionNone , InteractionTranslationHandle , InteractionRotationHandle , InteractionScaleHandle , Interaction_Last } |
enum | { GlyphArrow , GlyphCircle , GlyphRing } |
![]() | |
typedef vtkProp | Superclass |
Standard methods for instances of this class. | |
Public Member Functions | |
virtual void | CanInteract (vtkMRMLInteractionEventData *interactionEventData, int &foundComponentType, int &foundComponentIndex, double &closestDistance2) |
virtual int | GetActiveComponentIndex ()=0 |
virtual int | GetActiveComponentType ()=0 |
void | GetActors (vtkPropCollection *) override |
Methods to make this class behave as a vtkProp. | |
virtual bool | GetApplyScaleToPosition (int type, int index) |
Get if the view scaling should be applied to the position of the handle. | |
virtual void | GetHandleColor (int type, int index, double color[4]) |
virtual int | GetHandleGlyphType (int type, int index) |
Get the type of glyph (Arrow, Circle, Ring, etc.) of the specified handle. | |
virtual double | GetHandleOpacity (int type, int index) |
Get the opacity of the specified handle. | |
virtual vtkTransform * | GetHandleToWorldTransform () |
virtual bool | GetHandleVisibility (int type, int index) |
Get the visibility of the specified handle. | |
virtual bool | GetInteracting () |
vtkProp * | GetInteractionActor () |
Returns the actor for the interaction widget. | |
virtual void | GetInteractionHandleAxisLocal (int type, int index, double axis[3]) |
Get the axis for the handle specified by the index in local coordinates. | |
virtual void | GetInteractionHandleAxisWorld (int type, int index, double axis[3]) |
Get the axis for the handle specified by the index. | |
virtual void | GetInteractionHandleOriginWorld (double origin[3]) |
Get the origin of the interaction handle widget. | |
virtual void | GetInteractionHandlePositionLocal (int type, int index, double position[3]) |
virtual void | GetInteractionHandlePositionWorld (int type, int index, double position[3]) |
virtual double | GetMaximumHandlePickingDistance2 () |
virtual int | GetNumberOfHandles () |
virtual int | GetNumberOfHandles (int type) |
virtual vtkPointPlacer * | GetPointPlacer () |
virtual vtkMRMLSliceNode * | GetSliceNode () |
virtual void | GetSliceToWorldCoordinates (const double slicePos[2], double worldPos[3]) |
virtual bool | GetTransformationReferencePoint (double referencePointWorld[3]) |
Translation, rotation, scaling will happen around this position. | |
vtkTypeBool | HasTranslucentPolygonalGeometry () override |
virtual void | InteractingOff () |
virtual void | InteractingOn () |
virtual bool | IsDisplayable ()=0 |
void | ReleaseGraphicsResources (vtkWindow *) override |
int | RenderOpaqueGeometry (vtkViewport *viewport) override |
int | RenderOverlay (vtkViewport *viewport) override |
int | RenderTranslucentPolygonalGeometry (vtkViewport *viewport) override |
virtual void | SetActiveComponentIndex (int index)=0 |
virtual void | SetActiveComponentType (int type)=0 |
virtual void | SetInteracting (bool) |
void | UpdateFromMRML (vtkMRMLNode *caller, unsigned long event, void *callData=nullptr) override |
Update the representation from display node. | |
virtual void | UpdateHandlePolyData () |
virtual void | UpdateInteractionPipeline () |
Update the interaction pipeline. | |
virtual void | UpdateSlicePlaneFromSliceNode () |
virtual void | UpdateHandleToWorldTransform () |
virtual void | UpdateHandleToWorldTransform (vtkTransform *handleToWorldTransform)=0 |
![]() | |
virtual void | AlwaysOnTopOff () |
virtual void | AlwaysOnTopOn () |
void | GetActors (vtkPropCollection *) override |
void | GetActors2D (vtkPropCollection *) override |
virtual bool | GetAlwaysOnTop () |
virtual double | GetAlwaysOnTopRelativeOffsetFactor () |
virtual double | GetAlwaysOnTopRelativeOffsetUnits () |
virtual vtkMRMLApplicationLogic * | GetApplicationLogic () |
double * | GetBounds () VTK_SIZEHINT(6) override |
virtual bool | GetNeedToRender () |
virtual double | GetPickingTolerance () |
virtual vtkRenderer * | GetRenderer () |
double | GetScreenScaleFactor () |
Convenience method for getting screen scale factor from the associated view node. | |
virtual vtkMRMLAbstractViewNode * | GetViewNode () |
void | GetVolumes (vtkPropCollection *) override |
vtkTypeBool | HasTranslucentPolygonalGeometry () override |
virtual void | NeedToRenderOff () |
virtual void | NeedToRenderOn () |
void | PrintSelf (ostream &os, vtkIndent indent) override |
void | ReleaseGraphicsResources (vtkWindow *) override |
int | RenderOpaqueGeometry (vtkViewport *vtkNotUsed(viewport)) override |
int | RenderOverlay (vtkViewport *vtkNotUsed(viewport)) override |
int | RenderTranslucentPolygonalGeometry (vtkViewport *vtkNotUsed(viewport)) override |
int | RenderVolumetricGeometry (vtkViewport *vtkNotUsed(viewport)) override |
virtual void | SetAlwaysOnTop (bool) |
virtual void | SetAlwaysOnTopRelativeOffsetFactor (double) |
virtual void | SetAlwaysOnTopRelativeOffsetUnits (double) |
virtual void | SetApplicationLogic (vtkMRMLApplicationLogic *appLogic) |
virtual void | SetNeedToRender (bool) |
virtual void | SetPickingTolerance (double) |
virtual void | SetRenderer (vtkRenderer *ren) |
virtual void | SetViewNode (vtkMRMLAbstractViewNode *viewNode) |
Protected Types | |
typedef std::vector< HandleInfo > | HandleInfoList |
Get the list of info for all interaction handles. | |
Protected Member Functions | |
virtual void | CanInteractWithArrowHandle (vtkMRMLInteractionEventData *interactionEventData, int &foundComponentType, int &foundComponentIndex, double &closestDistance2, HandleInfo &handleInfo) |
virtual void | CanInteractWithCircleHandle (vtkMRMLInteractionEventData *interactionEventData, int &foundComponentType, int &foundComponentIndex, double &closestDistance2, HandleInfo &handleInfo) |
virtual void | CanInteractWithRingHandle (vtkMRMLInteractionEventData *interactionEventData, int &foundComponentType, int &foundComponentIndex, double &closestDistance2, HandleInfo &handleInfo) |
virtual void | CreateRotationHandles () |
virtual void | CreateScaleHandles () |
virtual void | CreateTranslationHandles () |
virtual HandleInfo | GetHandleInfo (int type, int index) |
virtual HandleInfoList | GetHandleInfoList () |
virtual vtkPolyData * | GetHandlePolydata (int type) |
virtual void | GetHandleToCameraVectorWorld (double handlePosition_World[3], double normal_World[3]) |
virtual double | GetInteractionScalePercent () |
virtual bool | GetInteractionSizeAbsolute () |
virtual double | GetInteractionSizeMm () |
virtual void | InitializePipeline () |
virtual void | OrthoganalizeTransform (vtkTransform *transform) |
Orthogonalize the transform axes. The Z-axis will not be changed. | |
virtual void | SetupInteractionPipeline () |
virtual void | SetWidgetScale (double scale) |
Set the scale of the interaction handles in world coordinates. | |
virtual void | UpdateHandleColors () |
virtual int | UpdateHandleColors (int type, int startIndex) |
virtual void | UpdateHandleOrientation () |
virtual void | UpdateHandleSize () |
virtual void | UpdateRotationHandleOrientation () |
virtual void | UpdateScaleHandleOrientation () |
virtual void | UpdateTranslationHandleOrientation () |
virtual void | UpdateViewScaleFactor () |
Calculate view size and scale factor. | |
vtkMRMLInteractionWidgetRepresentation () | |
~vtkMRMLInteractionWidgetRepresentation () override | |
![]() | |
void | AddActorsBounds (vtkBoundingBox &bounds, const std::vector< vtkProp * > &actors, double *additionalBounds=nullptr) |
void | GetRendererComputedDisplayPositionFromWorldPosition (const double worldPos[3], double displayPos[2]) |
virtual void | UpdateRelativeCoincidentTopologyOffsets (vtkMapper *mapper) |
vtkMRMLAbstractWidgetRepresentation () | |
~vtkMRMLAbstractWidgetRepresentation () override | |
Protected Attributes | |
double | EndFadeAngleDegrees {8.0} |
The angle between the camera and the interaction axis at which point the interaction handle is completely faded out. | |
bool | Interacting {false} |
double | InteractionSize {1.0} |
InteractionPipeline * | Pipeline |
vtkSmartPointer< vtkPointPlacer > | PointPlacer |
double | ScreenSizePixel |
vtkSmartPointer< vtkPlane > | SlicePlane |
double | StartFadeAngleDegrees {10.0} |
The angle between the camera and the interaction axis at which point the interaction handle starts to fade out. | |
double | ViewScaleFactorMmPerPixel |
double | WidgetScale {1.0} |
![]() | |
bool | AlwaysOnTop |
double | AlwaysOnTopRelativeOffsetFactor { 0.0 } |
Relative offset used for rendering occluded actors. | |
double | AlwaysOnTopRelativeOffsetUnits { -66000.0 } |
vtkWeakPointer< vtkMRMLApplicationLogic > | ApplicationLogic |
double | Bounds [6] |
Temporary variable to store GetBounds() result. | |
bool | NeedToRender |
double | PickingTolerance |
vtkWeakPointer< vtkRenderer > | Renderer |
The renderer in which this widget is placed. | |
vtkWeakPointer< vtkMRMLAbstractViewNode > | ViewNode |
typedef vtkMRMLAbstractWidgetRepresentation | 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 vtkMRMLInteractionWidgetRepresentation * | SafeDownCast (vtkObject *o) |
Additional Inherited Members | |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkMRMLAbstractWidgetRepresentation * | SafeDownCast (vtkObject *o) |
Class for rendering interaction handles.
This class can display interaction handles in the scene. It plays a similar role to vtkWidgetRepresentation, but it is simplified and specialized for optimal use in Slicer. It state is stored in the associated MRML display node to avoid extra synchronization mechanisms. The representation only observes MRML node changes, it does not directly process any interaction events directly (interaction events are processed by vtkMRMLAbstractWidget, which then modifies MRML nodes).
This class (and subclasses) are a type of vtkProp; meaning that they can be associated with a vtkRenderer and embedded in a scene like any other vtkActor.
Definition at line 78 of file vtkMRMLInteractionWidgetRepresentation.h.
|
protected |
Get the list of info for all interaction handles.
Definition at line 268 of file vtkMRMLInteractionWidgetRepresentation.h.
Standard VTK class macros.
Definition at line 85 of file vtkMRMLInteractionWidgetRepresentation.h.
anonymous enum |
Enumerator | |
---|---|
InteractionNone | |
InteractionTranslationHandle | |
InteractionRotationHandle | |
InteractionScaleHandle | |
Interaction_Last |
Definition at line 136 of file vtkMRMLInteractionWidgetRepresentation.h.
anonymous enum |
Enumerator | |
---|---|
GlyphArrow | |
GlyphCircle | |
GlyphRing |
Definition at line 145 of file vtkMRMLInteractionWidgetRepresentation.h.
|
protected |
|
overrideprotected |
|
virtual |
Return found component type (as vtkMRMLInteractionDisplayNode::ComponentType). closestDistance2 is the squared distance in display coordinates from the closest position where interaction is possible. componentIndex returns index of the found component (e.g., if control point is found then control point index is returned).
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Reimplemented in vtkSlicerMarkupsInteractionWidgetRepresentation.
|
protectedvirtual |
|
pure virtual |
|
pure virtual |
|
override |
Methods to make this class behave as a vtkProp.
|
virtual |
Get if the view scaling should be applied to the position of the handle.
Reimplemented in vtkSlicerMarkupsInteractionWidgetRepresentation.
|
virtual |
Reimplemented from vtkMRMLAbstractWidgetRepresentation.
Reimplemented in vtkMRMLTransformHandleWidgetRepresentation, and vtkSlicerMarkupsInteractionWidgetRepresentation.
|
virtual |
Get the color of the specified handle Type is specified using InteractionType enum
Reimplemented in vtkSlicerMarkupsInteractionWidgetRepresentation.
|
virtual |
Get the type of glyph (Arrow, Circle, Ring, etc.) of the specified handle.
|
protectedvirtual |
|
protectedvirtual |
|
virtual |
Get the opacity of the specified handle.
|
protectedvirtual |
|
protectedvirtual |
Get the vector from the interaction handle to the camera in world coordinates. In slice views and in 3D with parallel projection this is the same as the camera view direction.
|
virtual |
|
virtual |
Get the visibility of the specified handle.
Reimplemented in vtkMRMLTransformHandleWidgetRepresentation, and vtkSlicerMarkupsInteractionWidgetRepresentation.
|
virtual |
vtkProp * vtkMRMLInteractionWidgetRepresentation::GetInteractionActor | ( | ) |
Returns the actor for the interaction widget.
|
virtual |
Get the axis for the handle specified by the index in local coordinates.
Reimplemented in vtkSlicerMarkupsInteractionWidgetRepresentation.
|
virtual |
Get the axis for the handle specified by the index.
|
virtual |
Get the origin of the interaction handle widget.
|
virtual |
Get the position of the interaction handle in local coordinates Type is specified using vtkMRMLInteractionDisplayNode::ComponentType
|
virtual |
Get the position of the interaction handle in world coordinates Type is specified using vtkMRMLInteractionDisplayNode::ComponentType
Reimplemented in vtkSlicerMarkupsInteractionWidgetRepresentation.
|
protectedvirtual |
Reimplemented in vtkMRMLTransformHandleWidgetRepresentation, and vtkSlicerMarkupsInteractionWidgetRepresentation.
|
protectedvirtual |
Reimplemented in vtkMRMLTransformHandleWidgetRepresentation, and vtkSlicerMarkupsInteractionWidgetRepresentation.
|
protectedvirtual |
Reimplemented in vtkMRMLTransformHandleWidgetRepresentation, and vtkSlicerMarkupsInteractionWidgetRepresentation.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Translation, rotation, scaling will happen around this position.
|
override |
|
protectedvirtual |
|
virtual |
|
virtual |
|
virtual |
Reimplemented from vtkMRMLAbstractWidgetRepresentation.
Reimplemented in vtkMRMLTransformHandleWidgetRepresentation, and vtkSlicerMarkupsInteractionWidgetRepresentation.
|
pure virtual |
Returns true if the representation is displayable in the current view. It takes into account current view node's display node and parent folder's visibility.
Implemented in vtkMRMLTransformHandleWidgetRepresentation, and vtkSlicerMarkupsInteractionWidgetRepresentation.
|
static |
|
protectedvirtual |
Orthogonalize the transform axes. The Z-axis will not be changed.
|
override |
|
override |
|
override |
|
override |
|
override |
|
static |
|
pure virtual |
|
pure virtual |
|
virtual |
|
protectedvirtual |
|
protectedvirtual |
Set the scale of the interaction handles in world coordinates.
|
overridevirtual |
Update the representation from display node.
Reimplemented from vtkMRMLAbstractWidgetRepresentation.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
virtual |
|
protectedvirtual |
|
virtual |
Update HandleToWorldTransform. This controls the position and orientation of the interaction handles.
Reimplemented in vtkMRMLTransformHandleWidgetRepresentation, and vtkSlicerMarkupsInteractionWidgetRepresentation.
|
pure virtual |
|
virtual |
Update the interaction pipeline.
Reimplemented in vtkMRMLTransformHandleWidgetRepresentation, and vtkSlicerMarkupsInteractionWidgetRepresentation.
|
protectedvirtual |
|
protectedvirtual |
|
virtual |
|
protectedvirtual |
|
protectedvirtual |
Calculate view size and scale factor.
|
protected |
The angle between the camera and the interaction axis at which point the interaction handle is completely faded out.
Definition at line 313 of file vtkMRMLInteractionWidgetRepresentation.h.
|
protected |
Definition at line 328 of file vtkMRMLInteractionWidgetRepresentation.h.
|
protected |
Handle size, specified in renderer world coordinate system. For slice views, renderer world coordinate system is the display coordinate system, so it is measured in pixels. For 3D views, renderer world coordinate system is the Slicer world coordinate system, so it is measured in the scene length unit (typically millimeters).
Definition at line 324 of file vtkMRMLInteractionWidgetRepresentation.h.
|
protected |
Definition at line 333 of file vtkMRMLInteractionWidgetRepresentation.h.
|
protected |
Definition at line 330 of file vtkMRMLInteractionWidgetRepresentation.h.
|
protected |
Definition at line 316 of file vtkMRMLInteractionWidgetRepresentation.h.
|
protected |
Definition at line 318 of file vtkMRMLInteractionWidgetRepresentation.h.
|
protected |
The angle between the camera and the interaction axis at which point the interaction handle starts to fade out.
Definition at line 311 of file vtkMRMLInteractionWidgetRepresentation.h.
|
protected |
Definition at line 315 of file vtkMRMLInteractionWidgetRepresentation.h.
|
protected |
Definition at line 326 of file vtkMRMLInteractionWidgetRepresentation.h.