Class vtkMRMLLayerDMObjectEventObserverScripted
Inheritance Relationships
Base Type
public vtkMRMLLayerDMObjectEventObserver(Class vtkMRMLLayerDMObjectEventObserver)
Class Documentation
-
class vtkMRMLLayerDMObjectEventObserverScripted : public vtkMRMLLayerDMObjectEventObserver
Inheritance diagram for vtkMRMLLayerDMObjectEventObserverScripted:
Collaboration diagram for vtkMRMLLayerDMObjectEventObserverScripted:
Python lambda implementation of
See also
vtkMRMLLayerDMObjectEventObserver Delegates full callback to underlying Python callable object.
Public Functions
-
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
-
void SetPythonCallback(PyObject *object)