Slicer  5.0
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 | Protected Attributes
vtkMRMLAbstractWidgetRepresentation Class Reference

Class for rendering a markups node. More...

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

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

Public Types

typedef vtkProp Superclass
 Standard methods for instances of this class. More...
 

Public Member Functions

virtual void AlwaysOnTopOff ()
 
virtual void AlwaysOnTopOn ()
 
virtual bool GetAlwaysOnTop ()
 
virtual const char * GetClassName ()
 
virtual double GetPickingTolerance ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 
virtual void SetAlwaysOnTop (bool)
 
virtual void SetPickingTolerance (double)
 
virtual void UpdateFromMRML (vtkMRMLNode *caller, unsigned long event, void *callData=nullptr)
 
double * GetBounds () VTK_SIZEHINT(6) override
 
void GetActors (vtkPropCollection *) override
 
void GetActors2D (vtkPropCollection *) override
 
void GetVolumes (vtkPropCollection *) override
 
void ReleaseGraphicsResources (vtkWindow *) override
 
int RenderOverlay (vtkViewport *vtkNotUsed(viewport)) override
 
int RenderOpaqueGeometry (vtkViewport *vtkNotUsed(viewport)) override
 
int RenderTranslucentPolygonalGeometry (vtkViewport *vtkNotUsed(viewport)) override
 
int RenderVolumetricGeometry (vtkViewport *vtkNotUsed(viewport)) override
 
vtkTypeBool HasTranslucentPolygonalGeometry () override
 
virtual void SetRenderer (vtkRenderer *ren)
 
virtual vtkRenderer * GetRenderer ()
 
virtual void SetViewNode (vtkMRMLAbstractViewNode *viewNode)
 
virtual vtkMRMLAbstractViewNodeGetViewNode ()
 
virtual bool GetNeedToRender ()
 
virtual void SetNeedToRender (bool)
 
virtual void NeedToRenderOn ()
 
virtual void NeedToRenderOff ()
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkMRMLAbstractWidgetRepresentationSafeDownCast (vtkObject *o)
 

Protected Member Functions

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

bool AlwaysOnTop
 
double Bounds [6]
 Temporary variable to store GetBounds() result. More...
 
bool NeedToRender
 
double PickingTolerance
 
vtkWeakPointer< vtkRenderer > Renderer
 The renderer in which this widget is placed. More...
 
double ScreenScaleFactor
 Allows global rescaling of all widgets (to compensate for larger or smaller physical screen size) More...
 
vtkWeakPointer< vtkMRMLAbstractViewNodeViewNode
 

Detailed Description

Class for rendering a markups node.

This class can display a markups node 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 end embedded in a scene like any other vtkActor.

See also
vtkMRMLAbstractWidgetRepresentation vtkMRMLAbstractWidget

Definition at line 55 of file vtkMRMLAbstractWidgetRepresentation.h.

Member Typedef Documentation

◆ Superclass

Standard methods for instances of this class.

Definition at line 59 of file vtkMRMLAbstractWidgetRepresentation.h.

Constructor & Destructor Documentation

◆ vtkMRMLAbstractWidgetRepresentation()

vtkMRMLAbstractWidgetRepresentation::vtkMRMLAbstractWidgetRepresentation ( )
protected

◆ ~vtkMRMLAbstractWidgetRepresentation()

vtkMRMLAbstractWidgetRepresentation::~vtkMRMLAbstractWidgetRepresentation ( )
overrideprotected

Member Function Documentation

◆ AddActorsBounds()

void vtkMRMLAbstractWidgetRepresentation::AddActorsBounds ( vtkBoundingBox &  bounds,
const std::vector< vtkProp *> &  actors,
double *  additionalBounds = nullptr 
)
protected

Helper function to add bounds of all listed actors to the supplied bounding box. additionalBounds is for convenience only, it allows defining additional bounds.

◆ AlwaysOnTopOff()

virtual void vtkMRMLAbstractWidgetRepresentation::AlwaysOnTopOff ( )
virtual

◆ AlwaysOnTopOn()

virtual void vtkMRMLAbstractWidgetRepresentation::AlwaysOnTopOn ( )
virtual

◆ GetActors()

void vtkMRMLAbstractWidgetRepresentation::GetActors ( vtkPropCollection *  )
inlineoverride

Definition at line 71 of file vtkMRMLAbstractWidgetRepresentation.h.

◆ GetActors2D()

void vtkMRMLAbstractWidgetRepresentation::GetActors2D ( vtkPropCollection *  )
inlineoverride

Definition at line 72 of file vtkMRMLAbstractWidgetRepresentation.h.

◆ GetAlwaysOnTop()

virtual bool vtkMRMLAbstractWidgetRepresentation::GetAlwaysOnTop ( )
virtual

◆ GetBounds()

double* vtkMRMLAbstractWidgetRepresentation::GetBounds ( )
inlineoverride

Methods to make this class behave as a vtkProp. They are repeated here (from the vtkProp superclass) as a reminder to the widget implementor. Failure to implement these methods properly may result in the representation not appearing in the scene (i.e., not implementing the Render() methods properly) or leaking graphics resources (i.e., not implementing ReleaseGraphicsResources() properly).

Definition at line 70 of file vtkMRMLAbstractWidgetRepresentation.h.

◆ GetClassName()

virtual const char* vtkMRMLAbstractWidgetRepresentation::GetClassName ( )
virtual

◆ GetNeedToRender()

virtual bool vtkMRMLAbstractWidgetRepresentation::GetNeedToRender ( )
virtual

The widget representation can set this data member to true to indicate that it needs to be re-rendered. If the rendering request is processed then the flag is cleared.

◆ GetPickingTolerance()

virtual double vtkMRMLAbstractWidgetRepresentation::GetPickingTolerance ( )
virtual

◆ GetRenderer()

virtual vtkRenderer* vtkMRMLAbstractWidgetRepresentation::GetRenderer ( )
virtual

◆ GetRendererComputedDisplayPositionFromWorldPosition()

void vtkMRMLAbstractWidgetRepresentation::GetRendererComputedDisplayPositionFromWorldPosition ( const double  worldPos[3],
double  displayPos[2] 
)
protected

Given a world position and orientation, this computes the display position using the renderer of this class.

◆ GetViewNode()

virtual vtkMRMLAbstractViewNode* vtkMRMLAbstractWidgetRepresentation::GetViewNode ( )
virtual

◆ GetVolumes()

void vtkMRMLAbstractWidgetRepresentation::GetVolumes ( vtkPropCollection *  )
inlineoverride

Definition at line 73 of file vtkMRMLAbstractWidgetRepresentation.h.

◆ HasTranslucentPolygonalGeometry()

vtkTypeBool vtkMRMLAbstractWidgetRepresentation::HasTranslucentPolygonalGeometry ( )
inlineoverride

Definition at line 79 of file vtkMRMLAbstractWidgetRepresentation.h.

◆ IsA()

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

◆ IsTypeOf()

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

◆ NeedToRenderOff()

virtual void vtkMRMLAbstractWidgetRepresentation::NeedToRenderOff ( )
virtual

◆ NeedToRenderOn()

virtual void vtkMRMLAbstractWidgetRepresentation::NeedToRenderOn ( )
virtual

◆ PrintSelf()

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

◆ ReleaseGraphicsResources()

void vtkMRMLAbstractWidgetRepresentation::ReleaseGraphicsResources ( vtkWindow *  )
inlineoverride

Definition at line 74 of file vtkMRMLAbstractWidgetRepresentation.h.

◆ RenderOpaqueGeometry()

int vtkMRMLAbstractWidgetRepresentation::RenderOpaqueGeometry ( vtkViewport *  vtkNotUsedviewport)
inlineoverride

Definition at line 76 of file vtkMRMLAbstractWidgetRepresentation.h.

◆ RenderOverlay()

int vtkMRMLAbstractWidgetRepresentation::RenderOverlay ( vtkViewport *  vtkNotUsedviewport)
inlineoverride

Definition at line 75 of file vtkMRMLAbstractWidgetRepresentation.h.

◆ RenderTranslucentPolygonalGeometry()

int vtkMRMLAbstractWidgetRepresentation::RenderTranslucentPolygonalGeometry ( vtkViewport *  vtkNotUsedviewport)
inlineoverride

Definition at line 77 of file vtkMRMLAbstractWidgetRepresentation.h.

◆ RenderVolumetricGeometry()

int vtkMRMLAbstractWidgetRepresentation::RenderVolumetricGeometry ( vtkViewport *  vtkNotUsedviewport)
inlineoverride

Definition at line 78 of file vtkMRMLAbstractWidgetRepresentation.h.

◆ SafeDownCast()

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

◆ SetAlwaysOnTop()

virtual void vtkMRMLAbstractWidgetRepresentation::SetAlwaysOnTop ( bool  )
virtual

Controls whether the widget should always appear on top of other actors in the scene. (In effect, this will disable OpenGL Depth buffer tests while rendering the widget). Default is to set it to false.

◆ SetNeedToRender()

virtual void vtkMRMLAbstractWidgetRepresentation::SetNeedToRender ( bool  )
virtual

◆ SetPickingTolerance()

virtual void vtkMRMLAbstractWidgetRepresentation::SetPickingTolerance ( double  )
virtual

Specify tolerance for performing pick operations of points. For display renderers it is defined in pixels. The specified value is scaled with ScreenScaleFactor. For VR renderer it is defined in millimeters. The specified value is scaled with WorldToPhysicalScale.

◆ SetRenderer()

virtual void vtkMRMLAbstractWidgetRepresentation::SetRenderer ( vtkRenderer *  ren)
virtual

Set the renderer in which the representations draws itself. Typically the renderer is set by the associated widget. Use the widget's SetCurrentRenderer() method in most cases; otherwise there is a risk of inconsistent behavior as events and drawing may be performed in different viewports. WARNING: The renderer is NOT reference counted by the representation, in order to avoid reference loops. Be sure that the representation lifetime does not extend beyond the renderer lifetime.

Reimplemented in vtkSlicerMarkupsWidgetRepresentation3D.

◆ SetViewNode()

virtual void vtkMRMLAbstractWidgetRepresentation::SetViewNode ( vtkMRMLAbstractViewNode viewNode)
virtual

Set the view node where this widget is displayed.

◆ UpdateFromMRML()

virtual void vtkMRMLAbstractWidgetRepresentation::UpdateFromMRML ( vtkMRMLNode caller,
unsigned long  event,
void *  callData = nullptr 
)
virtual

◆ UpdateRelativeCoincidentTopologyOffsets()

virtual void vtkMRMLAbstractWidgetRepresentation::UpdateRelativeCoincidentTopologyOffsets ( vtkMapper *  mapper)
protectedvirtual

Member Data Documentation

◆ AlwaysOnTop

bool vtkMRMLAbstractWidgetRepresentation::AlwaysOnTop
protected

Definition at line 165 of file vtkMRMLAbstractWidgetRepresentation.h.

◆ Bounds

double vtkMRMLAbstractWidgetRepresentation::Bounds[6]
protected

Temporary variable to store GetBounds() result.

Definition at line 168 of file vtkMRMLAbstractWidgetRepresentation.h.

◆ NeedToRender

bool vtkMRMLAbstractWidgetRepresentation::NeedToRender
protected

Definition at line 153 of file vtkMRMLAbstractWidgetRepresentation.h.

◆ PickingTolerance

double vtkMRMLAbstractWidgetRepresentation::PickingTolerance
protected

Tolerance for performing pick operations of points. For display renderers it is defined in pixels. The specified value is scaled with ScreenScaleFactor. For VR renderer it is defined in millimeters. The specified value is scaled with WorldToPhysicalScale.

Definition at line 158 of file vtkMRMLAbstractWidgetRepresentation.h.

◆ Renderer

vtkWeakPointer<vtkRenderer> vtkMRMLAbstractWidgetRepresentation::Renderer
protected

The renderer in which this widget is placed.

Definition at line 151 of file vtkMRMLAbstractWidgetRepresentation.h.

◆ ScreenScaleFactor

double vtkMRMLAbstractWidgetRepresentation::ScreenScaleFactor
protected

Allows global rescaling of all widgets (to compensate for larger or smaller physical screen size)

Definition at line 161 of file vtkMRMLAbstractWidgetRepresentation.h.

◆ ViewNode

vtkWeakPointer<vtkMRMLAbstractViewNode> vtkMRMLAbstractWidgetRepresentation::ViewNode
protected

Definition at line 163 of file vtkMRMLAbstractWidgetRepresentation.h.


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