[Python] Pyvista volume rendering blocking main thread

Discussão em 'Python' iniciado por Stack, Agosto 13, 2025.

  1. Stack

    Stack Membro Participativo

    I am using QtInteractor to use pyvista in a PySide2 application.

    from pyvistaqt import QtInteractor

    plotter = QtInteractor(self)
    layout_3d = QVBoxLayout()
    layout_3d.addWidget(plotter.interactor)
    plotter.add_volume(volume, cmap='gray')


    Here add_volume takes some time to complete and is blocking the main thread. Is there any way I can add volume without blocking the main thread? Is there something like do the add_volume in a separate thread (heavy process) and move it back to main thread so the main thread is not blocked?

    When the volume contents is large plotter.add_volume() takes some time to complete which blocks the main thread of my PySide2 application. What I need is to make the application responsive while plotter.add_volume() is running.

    Continue reading...

Compartilhe esta Página