Python Scripting Paraview parameters on paraview web

Hello,

I am trying to figure out how to best use ParaView on a Linux guest running on a VirtualBox VM to render some MR Angio flow paths.

Background: On a Linux system running directly on the metal, a Python script uses the paraview.simple module to load a set of structured grid data (in the form of vts files) arranged over a timeline in a vtp file. It then sets the visual properties of the display and ultimately creates an animation. However, upon installing ParaView on the VM, it does not work, printing an error saying that it is unable to find a valid OpenGL implementation. I tried using the pvw-visualizer to run the web version and loaded the data manually, which seems to work and renders the data on a web browser (in the guest OS).

I wonder if it is possible to use the paraview.simple python module to render this data and create an animation using the web interface instead (of invoking the native client). Is there a better approach to do this?

Paraview Version: 5.8.1 with Python 2.7 support
OS: Mint Linux 20 running within VirtualBox 6.1

Thanks,
Indrajit

Using mesa would be a better approach.

I’m not sure to follow the relationship between the VM and ParaViewWeb.
PVW, will have similar issue in the VM.

Also in Visualizer, I’m not sure that you can export an animation right now. The UI controls are fairly limited in that regard for dealing with animations.

Using mesa would be a better approach.

Thanks Mathieu, using paraview-mesa helped. I could get pvpython to set the custom properties and create the animation.

1 Like

@jourdain, I would ultimately like to process the VTP data in a container similar to the paraview-visualizer: https://github.com/singularityhub/paraview-visualizer upon request from a browser by setting custom properties from a python script to render it in a certain way (based on the part of anatomy) and then display the resulting flow animation on the browser as well as save it.

Would it be possible to start off by looking at the pvw-visualizer.py and create a script that loads the structured data from a location upon request, set the display properties and render it offline and then push it to the requesting http client?

I apologize if I am asking something obvious since do not have much experience with ParaView.

This could indeed be possible. But since you want to save the animation on the client side, you will have to create some custom code (both on server and client) to achieve that.
Visualizer could be a place to start but I’m worried that there will be too much knowledge to grasp before going anywhere.

In some way, it sounds like you are looking for a custom application that would satisfy your user workflow with a fairly limited set of required features. Maybe that workflow could even be achieved purely on the client side with vtk.js and a basic web server.

It could be worth checking with Kitware for a support contract to get you started on your project.

HTH,

Seb

Thanks Sebastien, I will check the vtk.js and also the existing server. Also, thanks for the support link, that sounds like a good option.