Do I need to install the full Paraview just for ParaViewWeb?

My machine is running low on disk space so I am wondering if I have to install the full paraview (2-3GB) just to use ParaViewWeb? I am only planning to use ParaViewWeb to serve vtk files in a web browser for multiple users.

Are you looking for serving the geometry or also doing remote rendering?

Also, depending on the types of files you have, vtk.js might be able to read and render them directly. If that is the case, you will just need to build a client and your server can simply be an nginx/apache.

Otherwise, you can also use VTK to do the same thing (VTK Web). We have some examples on how to use Trame here with VTK. With Trame, you will have to do the same setup as ParaViewWeb for serving multiple users by configuring a launcher and an apache on the front for the routing. But it should be easier and faster to develop the web app that you are looking for.

1 Like

Thanks for the tips! I was not aware of vtk.js nor Trame. Basically I want users on the internet to visualize small vtk files like these:

https://calculix.feacluster.com/one_element.vtk
https://calculix.feacluster.com/beam.vtk

They will rarely be more than 100 kb. And I don’t expect more than a few visitors a day to be viewing them.

Then I will go with a plain vtk.js app while having a basic web server providing access to your file via http.
You might even use our self hosted ParaView Glance to read and show your files. You can even look at this guide to see how you can use the url to make the app load your data directly.

I just tried loading your file and it worked but not from the url as the reader factory might be missing a *.vtk which might be supported by itk.js.

FYI @Forrest_Li

If you want it in plain JS (rather than wasm with itk.js), you may have to fix/improve the existing legacy reader inside vtk.js to properly read your vtk files.

1 Like

ParaView Glance seems perfect! I was able to manually upload my files and visualize them!! However, I could not get it to load my data directly. I tried just using the diskout.vtp file in the guide, but that did not work. Here is the URL I tried:

https://kitware.github.io/paraview-glance/app/?name=diskout.vtp&url=https://calculix.feacluster.com/diskout.vtp

You have a CORS issue

Access to XMLHttpRequest at 'https://calculix.feacluster.com/diskout.vtp' from origin 'https://kitware.github.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

If need be you can host Glance on your server since it is just static html/css/js files.

1 Like

Thanks. I think for now I will ask users to manually download then upload the file to the public ParaView Glance page. A little extra mouse clicks, but ok for now as there is not much usage of it.

Later I can look into installing my own Glance if need be…

The two solutions are:

  • Update the CORS policy on your Web server to allow the files to be loaded by Glance from github.io.
  • Clone gh-pages branch from git repo and copy the /app or /latest directory on your server. Nothing to build.

Awesome, I got it working by updating the CORS policy on my web server per these instructions here:

When I first read your message I just assumed CORS policy was something on kitware’s server.

Do you recommend zipping the VTU files first? For now I expect them to be less than a 100kB. But they could be as large as 100+MB upto 1 GB…

You can see an example of what I am doing here:

https://www.feacluster.com/web_calculix.php

After clicking the solve button, wait 5 seconds then click the button in the top right to view model in 3D.

The vtu format itself support compression and you should use that instead of “zipping” the file.

Also, you should use https://kitware.github.io/paraview-glance/nightly rather than the default that seems to have an issue with the itk.js part (wasm reader).

Otherwise that is pretty cool!