Class vtkMRMLLayerDMObjectEventObserverScripted

Inheritance Relationships

Base Type

Class Documentation

class vtkMRMLLayerDMObjectEventObserverScripted : public vtkMRMLLayerDMObjectEventObserver

Inheritance diagram for vtkMRMLLayerDMObjectEventObserverScripted:

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="vtkMRMLLayerDMObjectEventObserver" tooltip="vtkMRMLLayerDMObjectEventObserver"] "1" [label="vtkMRMLLayerDMObjectEventObserverScripted" tooltip="vtkMRMLLayerDMObjectEventObserverScripted" fillcolor="#BFBFBF"] "2" -> "3" [dir=forward tooltip="public-inheritance"] "1" -> "2" [dir=forward tooltip="public-inheritance"] }

Collaboration diagram for vtkMRMLLayerDMObjectEventObserverScripted:

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="vtkMRMLLayerDMObjectEventObserver" tooltip="vtkMRMLLayerDMObjectEventObserver"] "1" [label="vtkMRMLLayerDMObjectEventObserverScripted" tooltip="vtkMRMLLayerDMObjectEventObserverScripted" fillcolor="#BFBFBF"] "2" -> "3" [dir=forward tooltip="public-inheritance"] "1" -> "2" [dir=forward tooltip="public-inheritance"] }

Python lambda implementation of

See also

vtkMRMLLayerDMObjectEventObserver Delegates full callback to underlying Python callable object.

Public Functions

vtkTypeMacro(vtkMRMLLayerDMObjectEventObserverScripted, vtkMRMLLayerDMObjectEventObserver)
void SetPythonCallback(PyObject *object)

Sets the Python callable object to be invoked on events.

The provided Python object should be callable (e.g., a function, lambda, or an object with a call method). This callable will be invoked whenever the observed event is triggered.

The python callable will be invoked with the following args: (vtkObject* node, unsigned long eventId, void* callData)

If callData is not nullptr, the callData can be converted to the right Python type using the

See also

CastCallData method.

Public Static Functions

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

Cast call data to appropriate Python type based on VTK type.

Parameters:
  • object – Python object to cast

  • vtkType – VTK type identifier to cast to

Returns:

PyObject* Casted Python object

Protected Functions

vtkMRMLLayerDMObjectEventObserverScripted()
~vtkMRMLLayerDMObjectEventObserverScripted() override