Slicer 5.13
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkMRMLInteractionWidgetRepresentation Class Referenceabstract

Class for rendering interaction handles. More...

#include <Libs/MRML/DisplayableManager/vtkMRMLInteractionWidgetRepresentation.h>

Inheritance diagram for vtkMRMLInteractionWidgetRepresentation:
Collaboration diagram for vtkMRMLInteractionWidgetRepresentation:

Classes

struct  HandleInfo
 
class  InteractionPipeline
 
struct  RenderState
 

Public Types

enum  {
  InteractionNone , InteractionTranslationHandle , InteractionRotationHandle , InteractionScaleHandle ,
  Interaction_Last
}
 
enum  {
  GlyphArrow , GlyphCircle , GlyphRing , GlyphCrosshair ,
  GlyphArrowOutline , GlyphCircleOutline , GlyphRingOutline , GlyphCrosshairOutline
}
 
- Public Types inherited from vtkMRMLAbstractWidgetRepresentation
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 ()
 
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 double GetInteractionHandleOpacity ()
 Get the overall opacity multiplier applied to all interaction handles. Default is 1.0.
 
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 vtkMRMLSliceNodeGetSliceNode ()
 
virtual void GetSliceToWorldCoordinates (const double slicePos[2], double worldPos[3])
 
virtual bool GetTransformationReferencePoint (double referencePointWorld[3])
 Translation, rotation, scaling will happen around this position.
 
virtual double GetTranslationScaleFactor ()
 
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 SetRenderer (vtkRenderer *renderer) override
 
void UpdateFromMRML (vtkMRMLNode *caller, unsigned long event, void *callData=nullptr) override
 Update the representation from display node.
 
virtual void UpdateInteractionPipeline ()
 Update the interaction pipeline.
 
virtual void UpdateSlicePlaneFromSliceNode ()
 
virtual void UpdateHandleToWorldTransform ()
 
virtual void UpdateHandleToWorldTransform (vtkTransform *handleToWorldTransform)=0
 
- Public Member Functions inherited from vtkMRMLAbstractWidgetRepresentation
virtual void AlwaysOnTopOff ()
 
virtual void AlwaysOnTopOn ()
 
void GetActors (vtkPropCollection *) override
 
void GetActors2D (vtkPropCollection *) override
 
virtual bool GetAlwaysOnTop ()
 
virtual double GetAlwaysOnTopRelativeOffsetFactor ()
 
virtual double GetAlwaysOnTopRelativeOffsetUnits ()
 
virtual vtkMRMLApplicationLogicGetApplicationLogic ()
 
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 vtkMRMLAbstractViewNodeGetViewNode ()
 
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 SetViewNode (vtkMRMLAbstractViewNode *viewNode)
 

Protected Types

typedef std::vector< HandleInfoHandleInfoList
 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 ()
 
RenderState GetCurrentRenderState ()
 Get the state that the handle instance arrays would be built for if they were rebuilt now.
 
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 UpdateActorTransform ()
 
virtual void UpdateCameraState ()
 Cache camera state (direction, position, view up) for use by per-handle computations.
 
virtual void UpdateHandleSize ()
 
virtual void UpdateInstanceArrays ()
 
bool UpdatePipelineIfNeeded ()
 
virtual void UpdateViewScaleFactor ()
 Calculate view size and scale factor.
 
 vtkMRMLInteractionWidgetRepresentation ()
 
 ~vtkMRMLInteractionWidgetRepresentation () override
 
- Protected Member Functions inherited from vtkMRMLAbstractWidgetRepresentation
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 CachedCameraDirection [3] { 0.0, 0.0, 1.0 }
 
double CachedCameraPosition [3] { 0.0, 0.0, 0.0 }
 
bool CachedParallelProjection { true }
 
double CachedViewUp_World [3] { 0.0, 1.0, 0.0 }
 
double EndFadeAngleDegrees { 8.0 }
 The angle between the camera and the interaction axis at which point the interaction handle is completely faded out.
 
bool HasVisibleHandles { false }
 
bool Interacting { false }
 
double InteractionSize { 1.0 }
 
RenderState LastRenderState
 
InteractionPipelinePipeline
 
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 }
 
- Protected Attributes inherited from vtkMRMLAbstractWidgetRepresentation
bool AlwaysOnTop
 
double AlwaysOnTopRelativeOffsetFactor { 0.0 }
 Relative offset used for rendering occluded actors.
 
double AlwaysOnTopRelativeOffsetUnits { -66000.0 }
 
vtkWeakPointer< vtkMRMLApplicationLogicApplicationLogic
 
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< vtkMRMLAbstractViewNodeViewNode
 
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 vtkMRMLInteractionWidgetRepresentationSafeDownCast (vtkObject *o)
 
static std::map< vtkRenderer *, std::unique_ptr< SharedHandleRenderer > > SharedHandleRenderers
 
void RegisterWithSharedHandleRenderer ()
 
void UnregisterFromSharedHandleRenderer ()
 
bool IsSharedRenderingRepresentation (SharedHandleRenderer *shared) const
 
static SharedHandleRenderer * GetSharedHandleRenderer (vtkRenderer *renderer, bool create=false)
 
static void OnSharedRendererStartEvent (vtkObject *caller, unsigned long eid, void *clientData, void *callData)
 
static void OnSharedRendererDelete (vtkObject *caller, unsigned long eid, void *clientData, void *callData)
 
static void ConfigureHandleInstancePipeline (vtkSmartPointer< vtkPolyData > &instancePolyData, vtkSmartPointer< vtkFloatArray > &orientationArray, vtkSmartPointer< vtkFloatArray > &scaleArray, vtkSmartPointer< vtkIntArray > &sourceIndexArray, vtkSmartPointer< vtkUnsignedCharArray > &colorArray, vtkSmartPointer< vtkGlyph3DMapper > &mapper, vtkSmartPointer< vtkProperty > &property, vtkSmartPointer< vtkActor > &actor)
 
static unsigned char ColorComponentToUChar (double c)
 

Additional Inherited Members

- Static Public Member Functions inherited from vtkMRMLAbstractWidgetRepresentation
static int IsTypeOf (const char *type)
 
static vtkMRMLAbstractWidgetRepresentationSafeDownCast (vtkObject *o)
 

Detailed Description

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.

See also
vtkMRMLInteractionWidgetRepresentation vtkMRMLAbstractWidget vtkPointPlacer

Definition at line 75 of file vtkMRMLInteractionWidgetRepresentation.h.

Member Typedef Documentation

◆ HandleInfoList

Get the list of info for all interaction handles.

Definition at line 281 of file vtkMRMLInteractionWidgetRepresentation.h.

◆ Superclass

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
InteractionNone 
InteractionTranslationHandle 
InteractionRotationHandle 
InteractionScaleHandle 
Interaction_Last 

Definition at line 137 of file vtkMRMLInteractionWidgetRepresentation.h.

◆ anonymous enum

anonymous enum
Enumerator
GlyphArrow 
GlyphCircle 
GlyphRing 
GlyphCrosshair 
GlyphArrowOutline 
GlyphCircleOutline 
GlyphRingOutline 
GlyphCrosshairOutline 

Definition at line 146 of file vtkMRMLInteractionWidgetRepresentation.h.

Constructor & Destructor Documentation

◆ vtkMRMLInteractionWidgetRepresentation()

vtkMRMLInteractionWidgetRepresentation::vtkMRMLInteractionWidgetRepresentation ( )
protected

◆ ~vtkMRMLInteractionWidgetRepresentation()

vtkMRMLInteractionWidgetRepresentation::~vtkMRMLInteractionWidgetRepresentation ( )
overrideprotected

Member Function Documentation

◆ CanInteract()

virtual void vtkMRMLInteractionWidgetRepresentation::CanInteract ( vtkMRMLInteractionEventData * interactionEventData,
int & foundComponentType,
int & foundComponentIndex,
double & closestDistance2 )
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).

Reimplemented in vtkMRMLTransformHandleWidgetRepresentation.

◆ CanInteractWithArrowHandle()

virtual void vtkMRMLInteractionWidgetRepresentation::CanInteractWithArrowHandle ( vtkMRMLInteractionEventData * interactionEventData,
int & foundComponentType,
int & foundComponentIndex,
double & closestDistance2,
HandleInfo & handleInfo )
protectedvirtual

◆ CanInteractWithCircleHandle()

virtual void vtkMRMLInteractionWidgetRepresentation::CanInteractWithCircleHandle ( vtkMRMLInteractionEventData * interactionEventData,
int & foundComponentType,
int & foundComponentIndex,
double & closestDistance2,
HandleInfo & handleInfo )
protectedvirtual

◆ CanInteractWithRingHandle()

virtual void vtkMRMLInteractionWidgetRepresentation::CanInteractWithRingHandle ( vtkMRMLInteractionEventData * interactionEventData,
int & foundComponentType,
int & foundComponentIndex,
double & closestDistance2,
HandleInfo & handleInfo )
protectedvirtual

◆ ColorComponentToUChar()

static unsigned char vtkMRMLInteractionWidgetRepresentation::ColorComponentToUChar ( double c)
staticprotected

◆ ConfigureHandleInstancePipeline()

static void vtkMRMLInteractionWidgetRepresentation::ConfigureHandleInstancePipeline ( vtkSmartPointer< vtkPolyData > & instancePolyData,
vtkSmartPointer< vtkFloatArray > & orientationArray,
vtkSmartPointer< vtkFloatArray > & scaleArray,
vtkSmartPointer< vtkIntArray > & sourceIndexArray,
vtkSmartPointer< vtkUnsignedCharArray > & colorArray,
vtkSmartPointer< vtkGlyph3DMapper > & mapper,
vtkSmartPointer< vtkProperty > & property,
vtkSmartPointer< vtkActor > & actor )
staticprotected

◆ CreateRotationHandles()

virtual void vtkMRMLInteractionWidgetRepresentation::CreateRotationHandles ( )
protectedvirtual

◆ CreateScaleHandles()

virtual void vtkMRMLInteractionWidgetRepresentation::CreateScaleHandles ( )
protectedvirtual

◆ CreateTranslationHandles()

virtual void vtkMRMLInteractionWidgetRepresentation::CreateTranslationHandles ( )
protectedvirtual

◆ GetActiveComponentIndex()

virtual int vtkMRMLInteractionWidgetRepresentation::GetActiveComponentIndex ( )
pure virtual

◆ GetActiveComponentType()

virtual int vtkMRMLInteractionWidgetRepresentation::GetActiveComponentType ( )
pure virtual

◆ GetActors()

void vtkMRMLInteractionWidgetRepresentation::GetActors ( vtkPropCollection * )
override

Methods to make this class behave as a vtkProp.

◆ GetApplyScaleToPosition()

virtual bool vtkMRMLInteractionWidgetRepresentation::GetApplyScaleToPosition ( int type,
int index )
virtual

Get if the view scaling should be applied to the position of the handle.

Reimplemented in vtkSlicerMarkupsInteractionWidgetRepresentation.

◆ GetClassName()

virtual const char * vtkMRMLInteractionWidgetRepresentation::GetClassName ( )
virtual

◆ GetCurrentRenderState()

RenderState vtkMRMLInteractionWidgetRepresentation::GetCurrentRenderState ( )
protected

Get the state that the handle instance arrays would be built for if they were rebuilt now.

◆ GetHandleColor()

virtual void vtkMRMLInteractionWidgetRepresentation::GetHandleColor ( int type,
int index,
double color[4] )
virtual

Get the color of the specified handle Type is specified using InteractionType enum

Reimplemented in vtkMRMLTransformHandleWidgetRepresentation, and vtkSlicerMarkupsInteractionWidgetRepresentation.

◆ GetHandleGlyphType()

virtual int vtkMRMLInteractionWidgetRepresentation::GetHandleGlyphType ( int type,
int index )
virtual

Get the type of glyph (Arrow, Circle, Ring, etc.) of the specified handle.

Reimplemented in vtkMRMLTransformHandleWidgetRepresentation.

◆ GetHandleInfo()

virtual HandleInfo vtkMRMLInteractionWidgetRepresentation::GetHandleInfo ( int type,
int index )
protectedvirtual

◆ GetHandleInfoList()

virtual HandleInfoList vtkMRMLInteractionWidgetRepresentation::GetHandleInfoList ( )
protectedvirtual

◆ GetHandleOpacity()

virtual double vtkMRMLInteractionWidgetRepresentation::GetHandleOpacity ( int type,
int index )
virtual

Get the opacity of the specified handle.

◆ GetHandlePolydata()

virtual vtkPolyData * vtkMRMLInteractionWidgetRepresentation::GetHandlePolydata ( int type)
protectedvirtual

◆ GetHandleToCameraVectorWorld()

virtual void vtkMRMLInteractionWidgetRepresentation::GetHandleToCameraVectorWorld ( double handlePosition_World[3],
double normal_World[3] )
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. Uses cached camera state from UpdateCameraState().

◆ GetHandleToWorldTransform()

virtual vtkTransform * vtkMRMLInteractionWidgetRepresentation::GetHandleToWorldTransform ( )
virtual

◆ GetHandleVisibility()

virtual bool vtkMRMLInteractionWidgetRepresentation::GetHandleVisibility ( int type,
int index )
virtual

Get the visibility of the specified handle.

Reimplemented in vtkMRMLTransformHandleWidgetRepresentation, and vtkSlicerMarkupsInteractionWidgetRepresentation.

◆ GetInteracting()

virtual bool vtkMRMLInteractionWidgetRepresentation::GetInteracting ( )
virtual

◆ GetInteractionActor()

vtkProp * vtkMRMLInteractionWidgetRepresentation::GetInteractionActor ( )

Returns the per-representation actor for the interaction widget. In slice views this is the actor that renders the handles. In 3D views the handles are drawn by a shared per-renderer actor and only this actor's visibility is honored; property, mapper, or transform changes on the returned actor have no effect on the rendered handles.

◆ GetInteractionHandleAxisLocal()

virtual void vtkMRMLInteractionWidgetRepresentation::GetInteractionHandleAxisLocal ( int type,
int index,
double axis[3] )
virtual

Get the axis for the handle specified by the index in local coordinates.

Reimplemented in vtkSlicerMarkupsInteractionWidgetRepresentation.

◆ GetInteractionHandleAxisWorld()

virtual void vtkMRMLInteractionWidgetRepresentation::GetInteractionHandleAxisWorld ( int type,
int index,
double axis[3] )
virtual

Get the axis for the handle specified by the index.

◆ GetInteractionHandleOpacity()

virtual double vtkMRMLInteractionWidgetRepresentation::GetInteractionHandleOpacity ( )
virtual

Get the overall opacity multiplier applied to all interaction handles. Default is 1.0.

Reimplemented in vtkMRMLTransformHandleWidgetRepresentation, and vtkSlicerMarkupsInteractionWidgetRepresentation.

◆ GetInteractionHandleOriginWorld()

virtual void vtkMRMLInteractionWidgetRepresentation::GetInteractionHandleOriginWorld ( double origin[3])
virtual

Get the origin of the interaction handle widget.

◆ GetInteractionHandlePositionLocal()

virtual void vtkMRMLInteractionWidgetRepresentation::GetInteractionHandlePositionLocal ( int type,
int index,
double position[3] )
virtual

Get the position of the interaction handle in local coordinates Type is specified using vtkMRMLInteractionDisplayNode::ComponentType

◆ GetInteractionHandlePositionWorld()

virtual void vtkMRMLInteractionWidgetRepresentation::GetInteractionHandlePositionWorld ( int type,
int index,
double position[3] )
virtual

Get the position of the interaction handle in world coordinates Type is specified using vtkMRMLInteractionDisplayNode::ComponentType

Reimplemented in vtkSlicerMarkupsInteractionWidgetRepresentation.

◆ GetInteractionScalePercent()

virtual double vtkMRMLInteractionWidgetRepresentation::GetInteractionScalePercent ( )
protectedvirtual

◆ GetInteractionSizeAbsolute()

virtual bool vtkMRMLInteractionWidgetRepresentation::GetInteractionSizeAbsolute ( )
protectedvirtual

◆ GetInteractionSizeMm()

virtual double vtkMRMLInteractionWidgetRepresentation::GetInteractionSizeMm ( )
protectedvirtual

◆ GetMaximumHandlePickingDistance2()

virtual double vtkMRMLInteractionWidgetRepresentation::GetMaximumHandlePickingDistance2 ( )
virtual

◆ GetNumberOfHandles() [1/2]

virtual int vtkMRMLInteractionWidgetRepresentation::GetNumberOfHandles ( )
virtual

◆ GetNumberOfHandles() [2/2]

virtual int vtkMRMLInteractionWidgetRepresentation::GetNumberOfHandles ( int type)
virtual

◆ GetPointPlacer()

virtual vtkPointPlacer * vtkMRMLInteractionWidgetRepresentation::GetPointPlacer ( )
virtual

◆ GetSharedHandleRenderer()

static SharedHandleRenderer * vtkMRMLInteractionWidgetRepresentation::GetSharedHandleRenderer ( vtkRenderer * renderer,
bool create = false )
staticprotected

◆ GetSliceNode()

virtual vtkMRMLSliceNode * vtkMRMLInteractionWidgetRepresentation::GetSliceNode ( )
virtual

◆ GetSliceToWorldCoordinates()

virtual void vtkMRMLInteractionWidgetRepresentation::GetSliceToWorldCoordinates ( const double slicePos[2],
double worldPos[3] )
virtual

◆ GetTransformationReferencePoint()

virtual bool vtkMRMLInteractionWidgetRepresentation::GetTransformationReferencePoint ( double referencePointWorld[3])
virtual

Translation, rotation, scaling will happen around this position.

◆ GetTranslationScaleFactor()

virtual double vtkMRMLInteractionWidgetRepresentation::GetTranslationScaleFactor ( )
virtual

Get the factor that the translation vector is scaled by during an interactive translate operation. Default is 1.0 (no scaling).

Reimplemented in vtkMRMLTransformHandleWidgetRepresentation.

◆ HasTranslucentPolygonalGeometry()

vtkTypeBool vtkMRMLInteractionWidgetRepresentation::HasTranslucentPolygonalGeometry ( )
override

◆ InitializePipeline()

virtual void vtkMRMLInteractionWidgetRepresentation::InitializePipeline ( )
protectedvirtual

◆ InteractingOff()

virtual void vtkMRMLInteractionWidgetRepresentation::InteractingOff ( )
virtual

◆ InteractingOn()

virtual void vtkMRMLInteractionWidgetRepresentation::InteractingOn ( )
virtual

◆ IsA()

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

◆ IsDisplayable()

virtual bool vtkMRMLInteractionWidgetRepresentation::IsDisplayable ( )
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.

◆ IsSharedRenderingRepresentation()

bool vtkMRMLInteractionWidgetRepresentation::IsSharedRenderingRepresentation ( SharedHandleRenderer * shared) const
protected

◆ IsTypeOf()

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

◆ OnSharedRendererDelete()

static void vtkMRMLInteractionWidgetRepresentation::OnSharedRendererDelete ( vtkObject * caller,
unsigned long eid,
void * clientData,
void * callData )
staticprotected

◆ OnSharedRendererStartEvent()

static void vtkMRMLInteractionWidgetRepresentation::OnSharedRendererStartEvent ( vtkObject * caller,
unsigned long eid,
void * clientData,
void * callData )
staticprotected

◆ OrthoganalizeTransform()

virtual void vtkMRMLInteractionWidgetRepresentation::OrthoganalizeTransform ( vtkTransform * transform)
protectedvirtual

Orthogonalize the transform axes. The Z-axis will not be changed.

◆ PrintSelf()

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

◆ RegisterWithSharedHandleRenderer()

void vtkMRMLInteractionWidgetRepresentation::RegisterWithSharedHandleRenderer ( )
protected

◆ ReleaseGraphicsResources()

void vtkMRMLInteractionWidgetRepresentation::ReleaseGraphicsResources ( vtkWindow * )
override

◆ RenderOpaqueGeometry()

int vtkMRMLInteractionWidgetRepresentation::RenderOpaqueGeometry ( vtkViewport * viewport)
override

◆ RenderOverlay()

int vtkMRMLInteractionWidgetRepresentation::RenderOverlay ( vtkViewport * viewport)
override

◆ RenderTranslucentPolygonalGeometry()

int vtkMRMLInteractionWidgetRepresentation::RenderTranslucentPolygonalGeometry ( vtkViewport * viewport)
override

◆ SafeDownCast()

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

◆ SetActiveComponentIndex()

virtual void vtkMRMLInteractionWidgetRepresentation::SetActiveComponentIndex ( int index)
pure virtual

◆ SetActiveComponentType()

virtual void vtkMRMLInteractionWidgetRepresentation::SetActiveComponentType ( int type)
pure virtual

◆ SetInteracting()

virtual void vtkMRMLInteractionWidgetRepresentation::SetInteracting ( bool )
virtual

◆ SetRenderer()

void vtkMRMLInteractionWidgetRepresentation::SetRenderer ( vtkRenderer * renderer)
overridevirtual

Set the renderer that the representation is displayed in. Unregisters the representation from the renderer that it was previously displayed in, so that its interaction handles are no longer rendered there.

Reimplemented from vtkMRMLAbstractWidgetRepresentation.

◆ SetupInteractionPipeline()

virtual void vtkMRMLInteractionWidgetRepresentation::SetupInteractionPipeline ( )
protectedvirtual

◆ SetWidgetScale()

virtual void vtkMRMLInteractionWidgetRepresentation::SetWidgetScale ( double scale)
protectedvirtual

Set the scale of the interaction handles in world coordinates.

◆ UnregisterFromSharedHandleRenderer()

void vtkMRMLInteractionWidgetRepresentation::UnregisterFromSharedHandleRenderer ( )
protected

◆ UpdateActorTransform()

virtual void vtkMRMLInteractionWidgetRepresentation::UpdateActorTransform ( )
protectedvirtual

◆ UpdateCameraState()

virtual void vtkMRMLInteractionWidgetRepresentation::UpdateCameraState ( )
protectedvirtual

Cache camera state (direction, position, view up) for use by per-handle computations.

◆ UpdateFromMRML()

void vtkMRMLInteractionWidgetRepresentation::UpdateFromMRML ( vtkMRMLNode * caller,
unsigned long event,
void * callData = nullptr )
overridevirtual

Update the representation from display node.

Reimplemented from vtkMRMLAbstractWidgetRepresentation.

◆ UpdateHandleSize()

virtual void vtkMRMLInteractionWidgetRepresentation::UpdateHandleSize ( )
protectedvirtual

◆ UpdateHandleToWorldTransform() [1/2]

virtual void vtkMRMLInteractionWidgetRepresentation::UpdateHandleToWorldTransform ( )
virtual

Update HandleToWorldTransform. This controls the position and orientation of the interaction handles.

Reimplemented in vtkMRMLTransformHandleWidgetRepresentation, and vtkSlicerMarkupsInteractionWidgetRepresentation.

◆ UpdateHandleToWorldTransform() [2/2]

virtual void vtkMRMLInteractionWidgetRepresentation::UpdateHandleToWorldTransform ( vtkTransform * handleToWorldTransform)
pure virtual

◆ UpdateInstanceArrays()

virtual void vtkMRMLInteractionWidgetRepresentation::UpdateInstanceArrays ( )
protectedvirtual

◆ UpdateInteractionPipeline()

virtual void vtkMRMLInteractionWidgetRepresentation::UpdateInteractionPipeline ( )
virtual

◆ UpdatePipelineIfNeeded()

bool vtkMRMLInteractionWidgetRepresentation::UpdatePipelineIfNeeded ( )
protected

Rebuild the handle instance arrays if the state that they were built for has changed. Returns true if the arrays have been rebuilt.

◆ UpdateSlicePlaneFromSliceNode()

virtual void vtkMRMLInteractionWidgetRepresentation::UpdateSlicePlaneFromSliceNode ( )
virtual

◆ UpdateViewScaleFactor()

virtual void vtkMRMLInteractionWidgetRepresentation::UpdateViewScaleFactor ( )
protectedvirtual

Calculate view size and scale factor.

Member Data Documentation

◆ CachedCameraDirection

double vtkMRMLInteractionWidgetRepresentation::CachedCameraDirection[3] { 0.0, 0.0, 1.0 }
protected

Definition at line 351 of file vtkMRMLInteractionWidgetRepresentation.h.

◆ CachedCameraPosition

double vtkMRMLInteractionWidgetRepresentation::CachedCameraPosition[3] { 0.0, 0.0, 0.0 }
protected

Definition at line 350 of file vtkMRMLInteractionWidgetRepresentation.h.

◆ CachedParallelProjection

bool vtkMRMLInteractionWidgetRepresentation::CachedParallelProjection { true }
protected

Definition at line 349 of file vtkMRMLInteractionWidgetRepresentation.h.

◆ CachedViewUp_World

double vtkMRMLInteractionWidgetRepresentation::CachedViewUp_World[3] { 0.0, 1.0, 0.0 }
protected

Definition at line 352 of file vtkMRMLInteractionWidgetRepresentation.h.

◆ EndFadeAngleDegrees

double vtkMRMLInteractionWidgetRepresentation::EndFadeAngleDegrees { 8.0 }
protected

The angle between the camera and the interaction axis at which point the interaction handle is completely faded out.

Definition at line 334 of file vtkMRMLInteractionWidgetRepresentation.h.

◆ HasVisibleHandles

bool vtkMRMLInteractionWidgetRepresentation::HasVisibleHandles { false }
protected

Definition at line 388 of file vtkMRMLInteractionWidgetRepresentation.h.

◆ Interacting

bool vtkMRMLInteractionWidgetRepresentation::Interacting { false }
protected

Definition at line 390 of file vtkMRMLInteractionWidgetRepresentation.h.

◆ InteractionSize

double vtkMRMLInteractionWidgetRepresentation::InteractionSize { 1.0 }
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 345 of file vtkMRMLInteractionWidgetRepresentation.h.

◆ LastRenderState

RenderState vtkMRMLInteractionWidgetRepresentation::LastRenderState
protected

Definition at line 387 of file vtkMRMLInteractionWidgetRepresentation.h.

◆ Pipeline

InteractionPipeline* vtkMRMLInteractionWidgetRepresentation::Pipeline
protected

Definition at line 395 of file vtkMRMLInteractionWidgetRepresentation.h.

◆ PointPlacer

vtkSmartPointer<vtkPointPlacer> vtkMRMLInteractionWidgetRepresentation::PointPlacer
protected

Definition at line 392 of file vtkMRMLInteractionWidgetRepresentation.h.

◆ ScreenSizePixel

double vtkMRMLInteractionWidgetRepresentation::ScreenSizePixel
protected

Definition at line 337 of file vtkMRMLInteractionWidgetRepresentation.h.

◆ SharedHandleRenderers

std::map<vtkRenderer*, std::unique_ptr<SharedHandleRenderer> > vtkMRMLInteractionWidgetRepresentation::SharedHandleRenderers
staticprotected

Shared handle renderer: in 3D views, all interaction handle instances are rendered by a single shared actor per vtkRenderer (one instanced draw per glyph source instead of one actor per handle). The map is keyed by renderer pointer; entries are created on first use and removed when the last representation unregisters or when the renderer fires DeleteEvent.

Definition at line 402 of file vtkMRMLInteractionWidgetRepresentation.h.

◆ SlicePlane

vtkSmartPointer<vtkPlane> vtkMRMLInteractionWidgetRepresentation::SlicePlane
protected

Definition at line 339 of file vtkMRMLInteractionWidgetRepresentation.h.

◆ StartFadeAngleDegrees

double vtkMRMLInteractionWidgetRepresentation::StartFadeAngleDegrees { 10.0 }
protected

The angle between the camera and the interaction axis at which point the interaction handle starts to fade out.

Definition at line 332 of file vtkMRMLInteractionWidgetRepresentation.h.

◆ ViewScaleFactorMmPerPixel

double vtkMRMLInteractionWidgetRepresentation::ViewScaleFactorMmPerPixel
protected

Definition at line 336 of file vtkMRMLInteractionWidgetRepresentation.h.

◆ WidgetScale

double vtkMRMLInteractionWidgetRepresentation::WidgetScale { 1.0 }
protected

Definition at line 347 of file vtkMRMLInteractionWidgetRepresentation.h.


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