Slicer
5.0
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
Class for rendering a markups node. More...
#include <Libs/MRML/DisplayableManager/vtkMRMLAbstractWidgetRepresentation.h>
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 vtkMRMLAbstractViewNode * | GetViewNode () |
virtual bool | GetNeedToRender () |
virtual void | SetNeedToRender (bool) |
virtual void | NeedToRenderOn () |
virtual void | NeedToRenderOff () |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkMRMLAbstractWidgetRepresentation * | SafeDownCast (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< vtkMRMLAbstractViewNode > | ViewNode |
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.
Definition at line 55 of file vtkMRMLAbstractWidgetRepresentation.h.
typedef vtkProp vtkMRMLAbstractWidgetRepresentation::Superclass |
Standard methods for instances of this class.
Definition at line 59 of file vtkMRMLAbstractWidgetRepresentation.h.
|
protected |
|
overrideprotected |
|
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.
|
virtual |
|
virtual |
|
inlineoverride |
Definition at line 71 of file vtkMRMLAbstractWidgetRepresentation.h.
|
inlineoverride |
Definition at line 72 of file vtkMRMLAbstractWidgetRepresentation.h.
|
virtual |
|
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.
|
virtual |
Reimplemented in vtkSlicerMarkupsWidgetRepresentation, vtkMRMLSliceIntersectionInteractionRepresentation, vtkMRMLSliceIntersectionInteractionRepresentationHelper, vtkMRMLSliceIntersectionRepresentation2D, vtkSlicerROIRepresentation3D, vtkSlicerPlaneRepresentation3D, vtkSlicerPlaneRepresentation2D, vtkSlicerROIRepresentation2D, vtkSlicerMarkupsWidgetRepresentation2D, vtkSlicerAngleRepresentation2D, vtkSlicerCurveRepresentation3D, vtkSlicerAngleRepresentation3D, vtkSlicerCurveRepresentation2D, vtkSlicerLineRepresentation3D, vtkSlicerMarkupsWidgetRepresentation3D, vtkSlicerLineRepresentation2D, vtkMRMLRubberBandWidgetRepresentation, vtkSlicerPointsRepresentation2D, and vtkSlicerPointsRepresentation3D.
|
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.
|
virtual |
|
virtual |
|
protected |
Given a world position and orientation, this computes the display position using the renderer of this class.
|
virtual |
|
inlineoverride |
Definition at line 73 of file vtkMRMLAbstractWidgetRepresentation.h.
|
inlineoverride |
Definition at line 79 of file vtkMRMLAbstractWidgetRepresentation.h.
|
virtual |
Reimplemented in vtkSlicerMarkupsWidgetRepresentation, vtkMRMLSliceIntersectionInteractionRepresentation, vtkMRMLSliceIntersectionInteractionRepresentationHelper, vtkMRMLSliceIntersectionRepresentation2D, vtkSlicerROIRepresentation3D, vtkSlicerPlaneRepresentation3D, vtkSlicerPlaneRepresentation2D, vtkSlicerROIRepresentation2D, vtkSlicerMarkupsWidgetRepresentation2D, vtkSlicerAngleRepresentation2D, vtkSlicerCurveRepresentation3D, vtkSlicerAngleRepresentation3D, vtkSlicerCurveRepresentation2D, vtkSlicerLineRepresentation3D, vtkSlicerMarkupsWidgetRepresentation3D, vtkSlicerLineRepresentation2D, vtkMRMLRubberBandWidgetRepresentation, vtkSlicerPointsRepresentation2D, and vtkSlicerPointsRepresentation3D.
|
static |
|
virtual |
|
virtual |
|
override |
|
inlineoverride |
Definition at line 74 of file vtkMRMLAbstractWidgetRepresentation.h.
|
inlineoverride |
Definition at line 76 of file vtkMRMLAbstractWidgetRepresentation.h.
|
inlineoverride |
Definition at line 75 of file vtkMRMLAbstractWidgetRepresentation.h.
|
inlineoverride |
Definition at line 77 of file vtkMRMLAbstractWidgetRepresentation.h.
|
inlineoverride |
Definition at line 78 of file vtkMRMLAbstractWidgetRepresentation.h.
|
static |
|
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.
|
virtual |
|
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.
|
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.
|
virtual |
Set the view node where this widget is displayed.
|
virtual |
UpdateFromMRML() - update the widget from its state stored in MRML. if event is non-zero then a specific update (faster, smaller scope) is performed instead of a full update.
Reimplemented in vtkSlicerMarkupsWidgetRepresentation, vtkMRMLSliceIntersectionInteractionRepresentation, vtkSlicerMarkupsWidgetRepresentation2D, vtkSlicerROIRepresentation3D, vtkSlicerPlaneRepresentation3D, vtkSlicerPlaneRepresentation2D, vtkSlicerROIRepresentation2D, vtkSlicerAngleRepresentation2D, vtkSlicerCurveRepresentation3D, vtkSlicerMarkupsWidgetRepresentation3D, vtkSlicerAngleRepresentation3D, vtkSlicerCurveRepresentation2D, vtkSlicerLineRepresentation3D, and vtkSlicerLineRepresentation2D.
|
protectedvirtual |
|
protected |
Definition at line 165 of file vtkMRMLAbstractWidgetRepresentation.h.
|
protected |
Temporary variable to store GetBounds() result.
Definition at line 168 of file vtkMRMLAbstractWidgetRepresentation.h.
|
protected |
Definition at line 153 of file vtkMRMLAbstractWidgetRepresentation.h.
|
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.
|
protected |
The renderer in which this widget is placed.
Definition at line 151 of file vtkMRMLAbstractWidgetRepresentation.h.
|
protected |
Allows global rescaling of all widgets (to compensate for larger or smaller physical screen size)
Definition at line 161 of file vtkMRMLAbstractWidgetRepresentation.h.
|
protected |
Definition at line 163 of file vtkMRMLAbstractWidgetRepresentation.h.