Class vtkMRMLLayerDMScriptedPipelineBridge

Inheritance Relationships

Base Type

Class Documentation

class vtkMRMLLayerDMScriptedPipelineBridge : public vtkMRMLLayerDMPipelineI

Inheritance diagram for vtkMRMLLayerDMScriptedPipelineBridge:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "3" [label="vtkObject" tooltip="vtkObject"] "2" [label="vtkMRMLLayerDMPipelineI" tooltip="vtkMRMLLayerDMPipelineI"] "1" [label="vtkMRMLLayerDMScriptedPipelineBridge" tooltip="vtkMRMLLayerDMScriptedPipelineBridge" fillcolor="#BFBFBF"] "2" -> "3" [dir=forward tooltip="public-inheritance"] "1" -> "2" [dir=forward tooltip="public-inheritance"] }

Collaboration diagram for vtkMRMLLayerDMScriptedPipelineBridge:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "3" [label="vtkObject" tooltip="vtkObject"] "2" [label="vtkMRMLLayerDMPipelineI" tooltip="vtkMRMLLayerDMPipelineI"] "1" [label="vtkMRMLLayerDMScriptedPipelineBridge" tooltip="vtkMRMLLayerDMScriptedPipelineBridge" fillcolor="#BFBFBF"] "2" -> "3" [dir=forward tooltip="public-inheritance"] "1" -> "2" [dir=forward tooltip="public-inheritance"] }

Python bridge for vtkMRMLLayerDMPipelineI. Delegates calls to the pipeline to its underlying python object.

See also

vtkMRMLLayerDMScriptedPipeline

Public Functions

vtkTypeMacro(vtkMRMLLayerDMScriptedPipelineBridge, vtkMRMLLayerDMPipelineI)
virtual bool CanProcessInteractionEvent(vtkMRMLInteractionEventData *eventData, double &distance2) override

true if the pipeline can process the input event data

Parameters:
  • eventData – The MRML event needing to be processed

  • distance2 – Return value for the distance to the interaction (preferably actual RAS distance)

Returns:

true if the pipeline can process the input event data. Default = false;

virtual vtkCamera *GetCustomCamera() const override

Custom pipeline camera. If the returned value is not nullptr, then the pipeline (or dedicated logic) is expected to handle its own camera. Otherwise, the pipeline will be moved in a renderer with a default camera synchronized on its view default camera.

Returns:

nullptr by default.

virtual int GetMouseCursor() const override

Custom mouse cursor from VTK mouse cursor enum. This value is only used if the pipeline actually processes an event and is ignore otherwise.

virtual unsigned int GetRenderOrder() const override

Arbitrary render order number where the pipeline wants to be displayed. Return 0 to be at the default order (main 3D Slicer pipelines) Return larger values to be rendered on top of pipelines with lower render orders. Order number is read-only during update and is expected to be static per pipeline.

Returns:

default = 0

virtual int GetWidgetState() const override

Current widget state of the pipeline.

Returns:

default = WidgetStateIdle

virtual void LoseFocus(vtkMRMLInteractionEventData *eventData) override

Triggered when the pipeline had focus (processed an interaction) and loses the focus (other pipeline handled the new interaction or window leave event). default behavior: does nothing.

virtual void OnDefaultCameraModified(vtkCamera *camera) override

Triggered when the default camera is modified. default behavior: does nothing.

virtual void OnReferenceToDisplayNodeAdded(vtkMRMLNode *fromNode, const std::string &role) override

Triggered when a reference to the display node is added / removed default behavior: Triggers onUpdate with the display node as argument and ReferenceAdded / Removed eventId.

virtual void OnReferenceToDisplayNodeRemoved(vtkMRMLNode *fromNode, const std::string &role) override
virtual void OnRendererAdded(vtkRenderer *renderer) override

Triggered when the pipeline is displayed on a new renderer. default behavior: does nothing.

virtual void OnRendererRemoved(vtkRenderer *renderer) override

Triggered when the pipeline is removed from its previous renderer. default behavior: does nothing.

virtual bool ProcessInteractionEvent(vtkMRMLInteractionEventData *eventData) override

Triggered when the pipeline can process the interaction and is at the top of the priority list. default behavior: does nothing and returns false.

Parameters:

eventData – The MRML event needing to be processed

Returns:

True if event was processed. False otherwise (default = false)

virtual void SetDisplayNode(vtkMRMLNode *displayNode) override

Set the display node for the pipeline has changed (initialization). default behavior: Stored and display node is observed for vtkCommand::ModifiedEvent.

See also

UpdateObserver

See also

OnUpdate

virtual void SetViewNode(vtkMRMLAbstractViewNode *viewNode) override

Set the pipeline view node (initialization). default behavior: Stored and view node is observed for vtkCommand::ModifiedEvent.

Parameters:

viewNode – The instance of viewNode the pipeline is attached to

virtual void SetScene(vtkMRMLScene *scene) override

Set the pipeline scene (initialization). default behavior: Stores the scene for access (no active observer).

virtual void SetPipelineManager(vtkMRMLLayerDMPipelineManager *pipelineManager) override

Set the pipeline manager (initialization). default behavior: Stores the pipeline manager to delegate request render calls (no active observer).

Parameters:

pipelineManager – The instance of pipeline manager managing the current pipeline

void SetPythonObject(PyObject *object)
virtual void UpdatePipeline() override

Triggered on

See also

ResetDisplay calls default behavior: does nothing.

Public Static Functions

static vtkMRMLLayerDMScriptedPipelineBridge *New()
static PyObject *CastCallData(PyObject *object, int vtkType)

Protected Functions

vtkMRMLLayerDMScriptedPipelineBridge()
~vtkMRMLLayerDMScriptedPipelineBridge() override
virtual void OnUpdate(vtkObject *obj, unsigned long eventId, void *callData) override

Observer update callback. Triggered when any object & events observed using UpdateObserver is triggered.