Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes
vtkSlicerMarkupsWidgetRepresentation3D Class Reference

Default representation for the markups widget in 3D views. More...

#include <Modules/Loadable/Markups/VTKWidgets/vtkSlicerMarkupsWidgetRepresentation3D.h>

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

Classes

class  ControlPointsPipeline3D
 

Public Types

typedef vtkSlicerMarkupsWidgetRepresentation Superclass
 Standard methods for instances of this class.
 
- Public Types inherited from vtkSlicerMarkupsWidgetRepresentation
enum  {
  Unselected , Selected , Active , Project ,
  ProjectBack , NumberOfControlPointTypes
}
 
typedef vtkMRMLAbstractWidgetRepresentation Superclass
 Standard methods for instances of this class.
 
- Public Types inherited from vtkMRMLAbstractWidgetRepresentation
typedef vtkProp Superclass
 Standard methods for instances of this class.
 

Public Member Functions

bool AccuratePick (int x, int y, double pickPoint[3], double pickNormal[3]=nullptr)
 
void CanInteract (vtkMRMLInteractionEventData *interactionEventData, int &foundComponentType, int &foundComponentIndex, double &closestDistance2) override
 
void CanInteractWithLine (vtkMRMLInteractionEventData *interactionEventData, int &foundComponentType, int &foundComponentIndex, double &closestDistance2)
 
void GetActors (vtkPropCollection *) override
 Methods to make this class behave as a vtkProp.
 
double * GetBounds () VTK_SIZEHINT(6) override
 Return the bounds of the representation.
 
virtual const char * GetClassName ()
 
bool GetNthControlPointViewVisibility (int n)
 
virtual double GetOccludedRelativeOffset ()
 
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 SetOccludedRelativeOffset (double)
 
void SetRenderer (vtkRenderer *ren) override
 
void UpdateFromMRMLInternal (vtkMRMLNode *caller, unsigned long event, void *callData=nullptr) override
 
- Public Member Functions inherited from vtkSlicerMarkupsWidgetRepresentation
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.
 
virtual vtkPolyData * GetControlPointsPolyData (int controlPointType)
 
virtual vtkPolyData * GetLabelControlPointsPolyData (int pipeline)
 
virtual vtkStringArray * GetLabels (int pipeline)
 
virtual vtkMRMLMarkupsDisplayNodeGetMarkupsDisplayNode ()
 
virtual vtkMRMLMarkupsNodeGetMarkupsNode ()
 
virtual vtkMRMLMarkupsNode::ControlPointGetNthControlPoint (int n)
 Get the nth control point.
 
virtual int GetNthControlPointDisplayPosition (int n, double pos[2])
 
virtual int GetNumberOfControlPoints ()
 Get number of control points.
 
virtual vtkPointPlacer * GetPointPlacer ()
 
virtual bool GetTransformationReferencePoint (double referencePointWorld[3])
 Translation, rotation, scaling will happen around this position.
 
vtkTypeBool HasTranslucentPolygonalGeometry () override
 
bool IsDisplayable ()
 
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 vtkMRMLMarkupsNode connected with this representation.
 
virtual void UpdateCenterOfRotation ()
 Compute the center of rotation and update it in the Markups node.
 
void UpdateFromMRML (vtkMRMLNode *caller, unsigned long event, void *callData=nullptr) override
 Update the representation from markups node.
 
- 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)
 

Static Public Member Functions

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

Protected Member Functions

ControlPointsPipeline3DGetControlPointsPipeline (int controlPointType)
 
virtual void UpdateAllPointsAndLabelsFromMRML ()
 
virtual void UpdateControlPointGlyphOrientation ()
 
void UpdateControlPointSize () override
 
virtual void UpdateNthPointAndLabelFromMRML (int n)
 
virtual void UpdateRelativeCoincidentTopologyOffsets (vtkMapper *mapper)
 
void UpdateRelativeCoincidentTopologyOffsets (vtkMapper *mapper, vtkMapper *occludedMapper)
 
void UpdateViewScaleFactor () override
 
 vtkSlicerMarkupsWidgetRepresentation3D ()
 
 ~vtkSlicerMarkupsWidgetRepresentation3D () override
 
- Protected Member Functions inherited from vtkSlicerMarkupsWidgetRepresentation
void BuildLine (vtkPolyData *linePolyData, bool displayPosition)
 
bool GetAllControlPointsSelected ()
 Convenience method.
 
virtual bool GetAllControlPointsVisible ()
 Convenience method.
 
double * GetWidgetColor (int controlPointType) VTK_SIZEHINT(3)
 
virtual void SetMarkupsNode (vtkMRMLMarkupsNode *markupsNode)
 
 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])
 
 vtkMRMLAbstractWidgetRepresentation ()
 
 ~vtkMRMLAbstractWidgetRepresentation () override
 

Static Protected Member Functions

static vtkFloatArray * GetCachedZBuffer (vtkRenderer *renderer)
 
static void OnRenderCompleted (vtkObject *caller, unsigned long event, void *clientData, void *callData)
 
- Static Protected Member Functions inherited from vtkSlicerMarkupsWidgetRepresentation
static int GetGlyphTypeSourceFromDisplay (int glyphTypeDisplay)
 

Protected Attributes

vtkSmartPointer< vtkCellPicker > AccuratePicker
 
bool HideTextActorIfAllPointsOccluded
 
double OccludedRelativeOffset
 
vtkSmartPointer< vtkCallbackCommand > RenderCompletedCallback
 
bool TextActorOccluded
 
double TextActorPositionWorld [3]
 
- Protected Attributes inherited from vtkSlicerMarkupsWidgetRepresentation
ControlPointsPipelineControlPoints [NumberOfControlPointTypes]
 
double ControlPointSize
 
vtkTypeBool CurveClosed
 
vtkWeakPointer< vtkMRMLMarkupsDisplayNodeMarkupsDisplayNode
 
vtkWeakPointer< vtkMRMLMarkupsNodeMarkupsNode
 
vtkTimeStamp MarkupsTransformModifiedTime
 
vtkSmartPointer< vtkPointPlacer > PointPlacer
 
double ScreenSizePixel
 
vtkSmartPointer< vtkTextActor > TextActor
 
double ViewScaleFactorMmPerPixel
 
- 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
 

Static Protected Attributes

static std::map< vtkRenderer *, vtkSmartPointer< vtkFloatArray > > CachedZBuffers
 

Detailed Description

Default representation for the markups widget in 3D views.

See also
vtkSlicerMarkupsWidgetRepresentation vtkSlicerMarkupsWidget

Definition at line 46 of file vtkSlicerMarkupsWidgetRepresentation3D.h.

Member Typedef Documentation

◆ Superclass

Standard methods for instances of this class.

Definition at line 50 of file vtkSlicerMarkupsWidgetRepresentation3D.h.

Constructor & Destructor Documentation

◆ vtkSlicerMarkupsWidgetRepresentation3D()

vtkSlicerMarkupsWidgetRepresentation3D::vtkSlicerMarkupsWidgetRepresentation3D ( )
protected

◆ ~vtkSlicerMarkupsWidgetRepresentation3D()

vtkSlicerMarkupsWidgetRepresentation3D::~vtkSlicerMarkupsWidgetRepresentation3D ( )
overrideprotected

Member Function Documentation

◆ AccuratePick()

bool vtkSlicerMarkupsWidgetRepresentation3D::AccuratePick ( int x,
int y,
double pickPoint[3],
double pickNormal[3] = nullptr )

◆ CanInteract()

void vtkSlicerMarkupsWidgetRepresentation3D::CanInteract ( vtkMRMLInteractionEventData * interactionEventData,
int & foundComponentType,
int & foundComponentIndex,
double & closestDistance2 )
overridevirtual

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 from vtkSlicerMarkupsWidgetRepresentation.

Reimplemented in vtkSlicerPlaneRepresentation3D, and vtkSlicerROIRepresentation3D.

◆ CanInteractWithLine()

void vtkSlicerMarkupsWidgetRepresentation3D::CanInteractWithLine ( vtkMRMLInteractionEventData * interactionEventData,
int & foundComponentType,
int & foundComponentIndex,
double & closestDistance2 )

Checks if interaction with straight line between visible points is possible. Can be used on the output of CanInteract, as if no better component is found then the input is returned.

◆ GetActors()

void vtkSlicerMarkupsWidgetRepresentation3D::GetActors ( vtkPropCollection * )
override

Methods to make this class behave as a vtkProp.

◆ GetBounds()

double * vtkSlicerMarkupsWidgetRepresentation3D::GetBounds ( )
override

Return the bounds of the representation.

◆ GetCachedZBuffer()

static vtkFloatArray * vtkSlicerMarkupsWidgetRepresentation3D::GetCachedZBuffer ( vtkRenderer * renderer)
staticprotected

◆ GetClassName()

virtual const char * vtkSlicerMarkupsWidgetRepresentation3D::GetClassName ( )
virtual

◆ GetControlPointsPipeline()

ControlPointsPipeline3D * vtkSlicerMarkupsWidgetRepresentation3D::GetControlPointsPipeline ( int controlPointType)
protected

◆ GetNthControlPointViewVisibility()

bool vtkSlicerMarkupsWidgetRepresentation3D::GetNthControlPointViewVisibility ( int n)

Return true if the control point is actually visible (displayed and not occluded by other objects in the view). Useful for non-regression tests that need to inspect internal state of the widget.

◆ GetOccludedRelativeOffset()

virtual double vtkSlicerMarkupsWidgetRepresentation3D::GetOccludedRelativeOffset ( )
virtual

◆ HasTranslucentPolygonalGeometry()

vtkTypeBool vtkSlicerMarkupsWidgetRepresentation3D::HasTranslucentPolygonalGeometry ( )
override

◆ IsA()

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

◆ IsTypeOf()

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

◆ OnRenderCompleted()

static void vtkSlicerMarkupsWidgetRepresentation3D::OnRenderCompleted ( vtkObject * caller,
unsigned long event,
void * clientData,
void * callData )
staticprotected

◆ PrintSelf()

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

◆ ReleaseGraphicsResources()

void vtkSlicerMarkupsWidgetRepresentation3D::ReleaseGraphicsResources ( vtkWindow * )
override

◆ RenderOpaqueGeometry()

int vtkSlicerMarkupsWidgetRepresentation3D::RenderOpaqueGeometry ( vtkViewport * viewport)
override

◆ RenderOverlay()

int vtkSlicerMarkupsWidgetRepresentation3D::RenderOverlay ( vtkViewport * viewport)
override

◆ RenderTranslucentPolygonalGeometry()

int vtkSlicerMarkupsWidgetRepresentation3D::RenderTranslucentPolygonalGeometry ( vtkViewport * viewport)
override

◆ SafeDownCast()

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

◆ SetOccludedRelativeOffset()

virtual void vtkSlicerMarkupsWidgetRepresentation3D::SetOccludedRelativeOffset ( double )
virtual

Relative offset used for rendering occluded actors. The range of coincident offset can be between +/- 65000. Positive values move the occluded objects away from the camera, and negative values towards. Default value is -25000.

◆ SetRenderer()

void vtkSlicerMarkupsWidgetRepresentation3D::SetRenderer ( vtkRenderer * ren)
overridevirtual

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 from vtkMRMLAbstractWidgetRepresentation.

◆ UpdateAllPointsAndLabelsFromMRML()

virtual void vtkSlicerMarkupsWidgetRepresentation3D::UpdateAllPointsAndLabelsFromMRML ( )
protectedvirtual

◆ UpdateControlPointGlyphOrientation()

virtual void vtkSlicerMarkupsWidgetRepresentation3D::UpdateControlPointGlyphOrientation ( )
protectedvirtual

◆ UpdateControlPointSize()

void vtkSlicerMarkupsWidgetRepresentation3D::UpdateControlPointSize ( )
overrideprotectedvirtual

◆ UpdateFromMRMLInternal()

void vtkSlicerMarkupsWidgetRepresentation3D::UpdateFromMRMLInternal ( vtkMRMLNode * caller,
unsigned long event,
void * callData = nullptr )
overridevirtual

Subclasses of vtkSlicerMarkupsWidgetRepresentation3D must implement these methods. These are the methods that the widget and its representation use to communicate with each other.

Reimplemented from vtkSlicerMarkupsWidgetRepresentation.

Reimplemented in vtkSlicerPlaneRepresentation3D, and vtkSlicerROIRepresentation3D.

◆ UpdateNthPointAndLabelFromMRML()

virtual void vtkSlicerMarkupsWidgetRepresentation3D::UpdateNthPointAndLabelFromMRML ( int n)
protectedvirtual

◆ UpdateRelativeCoincidentTopologyOffsets() [1/2]

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

◆ UpdateRelativeCoincidentTopologyOffsets() [2/2]

void vtkSlicerMarkupsWidgetRepresentation3D::UpdateRelativeCoincidentTopologyOffsets ( vtkMapper * mapper,
vtkMapper * occludedMapper )
protected

Update the occluded relative offsets for an occluded mapper Allows occluded regions to be rendered on top. Sets the following parameter on the mappers:

  • RelativeCoincidentTopologyLineOffsetParameters
  • RelativeCoincidentTopologyPolygonOffsetParameters
  • RelativeCoincidentTopologyPointOffsetParameter

◆ UpdateViewScaleFactor()

void vtkSlicerMarkupsWidgetRepresentation3D::UpdateViewScaleFactor ( )
overrideprotectedvirtual

Member Data Documentation

◆ AccuratePicker

vtkSmartPointer<vtkCellPicker> vtkSlicerMarkupsWidgetRepresentation3D::AccuratePicker
protected

Definition at line 152 of file vtkSlicerMarkupsWidgetRepresentation3D.h.

◆ CachedZBuffers

std::map<vtkRenderer*, vtkSmartPointer<vtkFloatArray> > vtkSlicerMarkupsWidgetRepresentation3D::CachedZBuffers
staticprotected

Definition at line 159 of file vtkSlicerMarkupsWidgetRepresentation3D.h.

◆ HideTextActorIfAllPointsOccluded

bool vtkSlicerMarkupsWidgetRepresentation3D::HideTextActorIfAllPointsOccluded
protected

Definition at line 156 of file vtkSlicerMarkupsWidgetRepresentation3D.h.

◆ OccludedRelativeOffset

double vtkSlicerMarkupsWidgetRepresentation3D::OccludedRelativeOffset
protected

Definition at line 157 of file vtkSlicerMarkupsWidgetRepresentation3D.h.

◆ RenderCompletedCallback

vtkSmartPointer<vtkCallbackCommand> vtkSlicerMarkupsWidgetRepresentation3D::RenderCompletedCallback
protected

Definition at line 161 of file vtkSlicerMarkupsWidgetRepresentation3D.h.

◆ TextActorOccluded

bool vtkSlicerMarkupsWidgetRepresentation3D::TextActorOccluded
protected

Definition at line 155 of file vtkSlicerMarkupsWidgetRepresentation3D.h.

◆ TextActorPositionWorld

double vtkSlicerMarkupsWidgetRepresentation3D::TextActorPositionWorld[3]
protected

Definition at line 154 of file vtkSlicerMarkupsWidgetRepresentation3D.h.


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