python_view Module¶
python_view is a module providing access to a PythonView. It is possible to use the PythonView API directly, but this module provides convenience classes in Python.
- paraview.python_view.call_render(render_function, view, width, height)[source]¶
Utility function to call the user-defined render function. This is called by the C++ side of the vtkPythonView class.
- view
vtkPythonView object
- width
Width of view
- height
Height of view
- paraview.python_view.figure_to_data(figure)[source]¶
Convert a Matplotlib figure to a numpy 2D array with RGBA uint8 channels and return it.
- figure
A matplotlib figure.
- return
A numpy 2D array of RGBA values.
- paraview.python_view.figure_to_image(figure)[source]¶
Convert a Matplotlib figure to a vtkImageData with RGBA unsigned char channels.
- figure
A matplotlib figure.
- return
A vtkImageData with the Matplotlib figure content.