NaviNIBS.util.pyvista.RemotePlotting.RemotePlotterProxy module

Bases: object

Parameters:
  • _actorID

  • _plotter

Return type:

bool

Bases: object

Parameters:

_plotter

Bases: object

Bases: object

Parameters:

_callbacks

Return type:

str

Within this context, most commands will be pushed out to remote for execution, and we won’t wait for the return value (i.e. we will immediately return None).

Some commands may still block.

Multiple calls are guaranteed to be executed in order by the remote plotter. If multiple non-blocking calls are made right before a blocking call, the blocking call will block until all preceding non-blocking calls are complete before starting.

Bases: RemotePlotterProxyBase, QWidget

There are issues with instantiating multiple pyvista BackgroundPlotters in the same process, related to opengl window binding and threaded render contexts. To work around this, we create a separate process for each plotter, embed it in the primary Qt process using QWidget.createWindowContainer(), and communicate with it via zmq sockets. This is

very inefficient (due to multiprocesing overhead), but has the side benefit of

parallelizing some of the rendering workload.

Note that this requires serializing / deserializing communication between the main process and the plotter. Only a limited subset of plotter methods are currently supported, and code working with the results of plotter calls (e.g. actors) may need to be further

adapted by the caller.

render(self, target: PySide6.QtGui.QPaintDevice, targetOffset: PySide6.QtCore.QPoint = Default(QPoint), sourceRegion: PySide6.QtGui.QRegion | PySide6.QtGui.QBitmap | PySide6.QtGui.QPolygon | PySide6.QtCore.QRect = Default(QRegion), renderFlags: PySide6.QtWidgets.QWidget.RenderFlag = Instance(QWidget.RenderFlags(QWidget.RenderFlag.DrawWindowBackground | QWidget.RenderFlag.DrawChildren))) None

Bases: object

Parameters:
  • _parentActor

  • _parentPlotter