Help with Paraview Glance: Opening file by passing the fileURL as argument

Hello,

I am am running Paraview Glance app based on instruction from github. I am using it as a simple viewer in my project. I want to know if there is any way to pass file as argument to viewer instead of using open dialog.

I was able to do something similar with Geometry Viewer as shown in documentation

https://kitware.github.io/vtk-js/examples/GeometryViewer/GeometryViewer.html?fileURL=https://data.kitware.com/api/v1/item/59de9de58d777f31ac641dc5/download

something like this: endPoint?fileURL=filePath

Is it possible to do with paraview glance?

Hi,

Yes you can load data remotely. Here’s an example: https://kitware.github.io/paraview-glance/app/?name=diskout.vtp&url=https://data.kitware.com/api/v1/item/59de9de58d777f31ac641dc5/download

I’ll update Glance’s documentation to reflect this.

1 Like

Check out the docs on file loading: https://kitware.github.io/paraview-glance/doc/loading_files.html

1 Like

Hi @Forrest the documentation URL is no longer valid. Do you have the updated one ?

Thanks for the ping! Yes, it’s updated to this URL: Loading Files | Glance

1 Like

Hi @Forrest,

I have a related questions

If my *.vtp files are locally generated (on my workstation), does it mean that I have to upload the files to some location before I can use this method ?

I tried the following but it just shows the file selection dialog from the glance server

xdg-open "https://kitware.github.io/glance/app/?name=monkey.vtp&url=file:///tmp/monkey.vtp"

Cheers

You cannot load local files (i.e. file: protocol urls) using this method. The files must be accessible over http(s) in order for remote data loading to work.

To expose your local files on the web, you can search for http server one liners such as in python python -m http.server or in js with npm install -g http-server; http-server;