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 <Modules/Loadable/Markups/VTKWidgets/vtkSlicerMarkupsWidgetRepresentation.h>
Classes | |
class | ControlPointsPipeline |
class | MarkupsInteractionPipeline |
Public Types | |
enum | { Unselected, Selected, Active, Project, ProjectBack, NumberOfControlPointTypes } |
typedef vtkMRMLAbstractWidgetRepresentation | Superclass |
Standard methods for instances of this class. More... | |
Public Types inherited from vtkMRMLAbstractWidgetRepresentation | |
typedef vtkProp | Superclass |
Standard methods for instances of this class. More... | |
Public Member Functions | |
virtual void | CanInteract (vtkMRMLInteractionEventData *interactionEventData, int &foundComponentType, int &foundComponentIndex, double &closestDistance2) |
virtual int | FindClosestPointOnWidget (const int displayPos[2], double worldPos[3], int *idx) |
void | GetActors (vtkPropCollection *) override |
Methods to make this class behave as a vtkProp. More... | |
virtual const char * | GetClassName () |
virtual vtkPolyData * | GetControlPointsPolyData (int controlPointType) |
virtual void | GetInteractionHandleAxisWorld (int type, int index, double axis[3]) |
Get the axis for the handle specified by the index. More... | |
virtual void | GetInteractionHandleOriginWorld (double origin[3]) |
Get the origin of the interaction handle widget. More... | |
virtual void | GetInteractionHandlePositionWorld (int type, int index, double position[3]) |
Get the position of an interaction handle in world coordinates. More... | |
virtual vtkPolyData * | GetLabelControlPointsPolyData (int pipeline) |
virtual vtkStringArray * | GetLabels (int pipeline) |
virtual vtkMRMLMarkupsDisplayNode * | GetMarkupsDisplayNode () |
virtual vtkMRMLMarkupsNode * | GetMarkupsNode () |
virtual vtkMRMLMarkupsNode::ControlPoint * | GetNthControlPoint (int n) |
Get the nth control point. More... | |
virtual int | GetNthControlPointDisplayPosition (int n, double pos[2]) |
virtual int | GetNumberOfControlPoints () |
Get number of control points. More... | |
virtual vtkPointPlacer * | GetPointPlacer () |
virtual bool | GetTransformationReferencePoint (double referencePointWorld[3]) |
Translation, rotation, scaling will happen around this position. More... | |
vtkTypeBool | HasTranslucentPolygonalGeometry () override |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) override |
void | ReleaseGraphicsResources (vtkWindow *) override |
int | RenderOpaqueGeometry (vtkViewport *viewport) override |
int | RenderOverlay (vtkViewport *viewport) override |
int | RenderTranslucentPolygonalGeometry (vtkViewport *viewport) override |
virtual void | SetMarkupsDisplayNode (vtkMRMLMarkupsDisplayNode *markupsDisplayNode) |
Set/Get the vtkMRMLMarkipsNode connected with this representation. More... | |
virtual void | UpdateCenterOfRotation () |
Compute the center of rotation and update it in the Markups node. More... | |
void | UpdateFromMRML (vtkMRMLNode *caller, unsigned long event, void *callData=nullptr) override |
Update the representation from markups node. More... | |
bool | IsDisplayable () |
Public Member Functions inherited from vtkMRMLAbstractWidgetRepresentation | |
virtual void | AlwaysOnTopOff () |
virtual void | AlwaysOnTopOn () |
virtual bool | GetAlwaysOnTop () |
virtual double | GetPickingTolerance () |
void | PrintSelf (ostream &os, vtkIndent indent) override |
virtual void | SetAlwaysOnTop (bool) |
virtual void | SetPickingTolerance (double) |
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 vtkSlicerMarkupsWidgetRepresentation * | SafeDownCast (vtkObject *o) |
Static Public Member Functions inherited from vtkMRMLAbstractWidgetRepresentation | |
static int | IsTypeOf (const char *type) |
static vtkMRMLAbstractWidgetRepresentation * | SafeDownCast (vtkObject *o) |
Protected Types | |
typedef std::vector< MarkupsInteractionPipeline::HandleInfo > | HandleInfoList |
Protected Member Functions | |
void | BuildLine (vtkPolyData *linePolyData, bool displayPosition) |
bool | GetAllControlPointsSelected () |
Convenience method. More... | |
virtual bool | GetAllControlPointsVisible () |
Convenience method. More... | |
double * | GetWidgetColor (int controlPointType) |
virtual void | SetMarkupsNode (vtkMRMLMarkupsNode *markupsNode) |
virtual void | SetupInteractionPipeline () |
virtual void | UpdateControlPointSize ()=0 |
virtual void | UpdateInteractionHandleSize () |
virtual void | UpdateInteractionPipeline () |
Update the interaction pipeline. More... | |
virtual void | UpdateViewScaleFactor ()=0 |
vtkSlicerMarkupsWidgetRepresentation () | |
~vtkSlicerMarkupsWidgetRepresentation () 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 | |
Static Protected Member Functions | |
static int | GetGlyphTypeSourceFromDisplay (int glyphTypeDisplay) |
Protected Attributes | |
ControlPointsPipeline * | ControlPoints [NumberOfControlPointTypes] |
double | ControlPointSize |
vtkTypeBool | CurveClosed |
MarkupsInteractionPipeline * | InteractionPipeline |
vtkWeakPointer< vtkMRMLMarkupsDisplayNode > | MarkupsDisplayNode |
vtkWeakPointer< vtkMRMLMarkupsNode > | MarkupsNode |
vtkTimeStamp | MarkupsTransformModifiedTime |
vtkSmartPointer< vtkPointPlacer > | PointPlacer |
double | ScreenSizePixel |
vtkSmartPointer< vtkTextActor > | TextActor |
double | ViewScaleFactorMmPerPixel |
Protected Attributes inherited from vtkMRMLAbstractWidgetRepresentation | |
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 72 of file vtkSlicerMarkupsWidgetRepresentation.h.
|
protected |
Definition at line 294 of file vtkSlicerMarkupsWidgetRepresentation.h.
Standard methods for instances of this class.
Definition at line 86 of file vtkSlicerMarkupsWidgetRepresentation.h.
anonymous enum |
Enumerator | |
---|---|
Unselected | |
Selected | |
Active | |
Project | |
ProjectBack | |
NumberOfControlPointTypes |
Definition at line 75 of file vtkSlicerMarkupsWidgetRepresentation.h.
|
protected |
|
overrideprotected |
|
protected |
|
virtual |
Return found component type (as vtkMRMLMarkupsDisplayNode::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 vtkSlicerROIRepresentation3D, vtkSlicerPlaneRepresentation3D, vtkSlicerPlaneRepresentation2D, vtkSlicerROIRepresentation2D, vtkSlicerAngleRepresentation3D, vtkSlicerAngleRepresentation2D, vtkSlicerCurveRepresentation3D, vtkSlicerMarkupsWidgetRepresentation3D, vtkSlicerLineRepresentation3D, vtkSlicerCurveRepresentation2D, vtkSlicerMarkupsWidgetRepresentation2D, and vtkSlicerLineRepresentation2D.
|
virtual |
|
override |
Methods to make this class behave as a vtkProp.
|
protected |
Convenience method.
|
protectedvirtual |
Convenience method.
Reimplemented in vtkSlicerMarkupsWidgetRepresentation2D.
|
virtual |
Reimplemented from vtkMRMLAbstractWidgetRepresentation.
Reimplemented in vtkSlicerROIRepresentation3D, vtkSlicerPlaneRepresentation3D, vtkSlicerPlaneRepresentation2D, vtkSlicerROIRepresentation2D, vtkSlicerMarkupsWidgetRepresentation2D, vtkSlicerAngleRepresentation2D, vtkSlicerCurveRepresentation3D, vtkSlicerAngleRepresentation3D, vtkSlicerCurveRepresentation2D, vtkSlicerLineRepresentation3D, vtkSlicerMarkupsWidgetRepresentation3D, vtkSlicerLineRepresentation2D, vtkSlicerPointsRepresentation2D, and vtkSlicerPointsRepresentation3D.
|
virtual |
Get internal control points polydata - for testing purposes. controlPointType can be Unselected, Selected, Active, Project, ProjectBack.
|
staticprotected |
|
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 an interaction handle in world coordinates.
|
virtual |
Get internal label control points polydata - for testing purposes. controlPointType can be Unselected, Selected, Active, Project, ProjectBack.
|
virtual |
Get internal labels list - for testing purposes. controlPointType can be Unselected, Selected, Active, Project, ProjectBack.
|
virtual |
|
virtual |
|
virtual |
Get the nth control point.
|
virtual |
Get the nth node's display position. Will return 1 on success, or 0 if there are not at least (n+1) nodes (0 based counting).
Reimplemented in vtkSlicerMarkupsWidgetRepresentation2D.
|
virtual |
Get number of control points.
|
virtual |
|
virtual |
Translation, rotation, scaling will happen around this position.
Reimplemented in vtkSlicerPlaneRepresentation2D, vtkSlicerPlaneRepresentation3D, vtkSlicerAngleRepresentation2D, and vtkSlicerAngleRepresentation3D.
|
protected |
|
override |
|
virtual |
Reimplemented from vtkMRMLAbstractWidgetRepresentation.
Reimplemented in vtkSlicerROIRepresentation3D, vtkSlicerPlaneRepresentation3D, vtkSlicerPlaneRepresentation2D, vtkSlicerROIRepresentation2D, vtkSlicerMarkupsWidgetRepresentation2D, vtkSlicerAngleRepresentation2D, vtkSlicerCurveRepresentation3D, vtkSlicerAngleRepresentation3D, vtkSlicerCurveRepresentation2D, vtkSlicerLineRepresentation3D, vtkSlicerMarkupsWidgetRepresentation3D, vtkSlicerLineRepresentation2D, vtkSlicerPointsRepresentation2D, and vtkSlicerPointsRepresentation3D.
bool vtkSlicerMarkupsWidgetRepresentation::IsDisplayable | ( | ) |
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.
|
static |
|
override |
|
override |
|
override |
|
override |
|
override |
|
static |
|
virtual |
Set/Get the vtkMRMLMarkipsNode connected with this representation.
|
protectedvirtual |
|
protectedvirtual |
|
virtual |
Compute the center of rotation and update it in the Markups node.
|
protectedpure virtual |
Implemented in vtkSlicerMarkupsWidgetRepresentation2D, and vtkSlicerMarkupsWidgetRepresentation3D.
|
overridevirtual |
Update the representation from markups node.
Reimplemented from vtkMRMLAbstractWidgetRepresentation.
Reimplemented in vtkSlicerMarkupsWidgetRepresentation2D, vtkSlicerROIRepresentation3D, vtkSlicerPlaneRepresentation3D, vtkSlicerPlaneRepresentation2D, vtkSlicerROIRepresentation2D, and vtkSlicerMarkupsWidgetRepresentation3D.
|
protectedvirtual |
|
protectedvirtual |
Update the interaction pipeline.
Reimplemented in vtkSlicerPlaneRepresentation3D, vtkSlicerMarkupsWidgetRepresentation3D, vtkSlicerMarkupsWidgetRepresentation2D, vtkSlicerROIRepresentation3D, vtkSlicerAngleRepresentation3D, vtkSlicerPlaneRepresentation2D, vtkSlicerAngleRepresentation2D, vtkSlicerROIRepresentation2D, vtkSlicerLineRepresentation2D, and vtkSlicerLineRepresentation3D.
|
protectedpure virtual |
Implemented in vtkSlicerMarkupsWidgetRepresentation2D, and vtkSlicerMarkupsWidgetRepresentation3D.
|
protected |
Definition at line 340 of file vtkSlicerMarkupsWidgetRepresentation.h.
|
protected |
Definition at line 311 of file vtkSlicerMarkupsWidgetRepresentation.h.
|
protected |
Definition at line 322 of file vtkSlicerMarkupsWidgetRepresentation.h.
|
protected |
Definition at line 343 of file vtkSlicerMarkupsWidgetRepresentation.h.
|
protected |
Definition at line 315 of file vtkSlicerMarkupsWidgetRepresentation.h.
|
protected |
Definition at line 316 of file vtkSlicerMarkupsWidgetRepresentation.h.
|
protected |
Definition at line 336 of file vtkSlicerMarkupsWidgetRepresentation.h.
|
protected |
Definition at line 318 of file vtkSlicerMarkupsWidgetRepresentation.h.
|
protected |
Definition at line 305 of file vtkSlicerMarkupsWidgetRepresentation.h.
|
protected |
Definition at line 320 of file vtkSlicerMarkupsWidgetRepresentation.h.
|
protected |
Definition at line 304 of file vtkSlicerMarkupsWidgetRepresentation.h.