Automatically load data into ParaView Glance?

Hi Sharon,

ParaViewWeb can indeed load files at startup. For that you need to add the extra argument --load-file can.ex2. You can even automate that process with the launcher so the client can provide which file should be loaded on the server side.

Thank you Seb for your reply!

Best Regards,
Sharon

I have automatically setup Glance to load a vtp (ascii) file on startup. Is it possible to select/show the first (or any) of the defined data fields on open (as per default the “Color By” field is set to white solid color and not the first available data field)?

A *.glance file can help you define any UI settings and point to external file such as vtp dataset…

Hello Sebastien,

I have a question of whether it is possible after the server is already launched to somehow using the command prompt or something else to command the visualizer to load another file without shutting down the server and adding that extra argument --load-file can.ex2

Thank you in advance.
Sincerely,
Dragi

You could add more arguments and process them yourself to load more files. But otherwise, you could let the client tell the server to load more files…

In both case, you will need to edit some code.

I am trying to locally host ParaView Glance and automatically load a local file. My web server root contains:

  • ParaViewGlance.html
  • scene.vtkjs

When I load this via

http://localhost:8000/ParaViewGlance.html?name=foo&url=/scene.vtkjs

It does not load my local data but shows the browse (data) dialog and I get the following errors:

ParaViewGlance.html?name=foo&url=/scene.vtkjs:22680 GET http://localhost:8000/glance-external-ITKReader.bddfe222bdf344dd54cd.js net::ERR_ABORTED 404 (File not found)
ParaViewGlance.html?name=foo&url=/scene.vtkjs:22682 GET http://localhost:8000/glance-external-Workbox.9633edaa519493db2499.js net::ERR_ABORTED 404 (File not found)

When I open this file via the browse-dialog it works just fine. What is glance-external-ITKReader and glance-external-Workbox?

Any help is highly appreciated!
Thanks,
Lars

Try http://localhost:8000/ParaViewGlance.html?name=foo.vtkjs&url=/scene.vtkjs.

The standalone HTML does not bundle the ITK which is fine for your case, but the name needs to have the extension so the mapping to the proper reader can happen. Because the assumption is that the url could be just /data/sfgi76swdiufyo7wd with not a proper name for that file.

Thanks a lot Sebastien, adding the file extension to the name did the trick!

1 Like

Hi there,

Is there a way to load files using ajax calls? like if first url was something like:

http:localhost:9999/?name=Indian_Hill.stl&url=http://localhost:9999/cfm_data/Indian_Hill.stl

Then it updates to this

http:localhost:9999/?name=[Indian_Hill.stl,Indian_Hill.stl]&url=[http://localhost:9999/cfm_data/Indian_Hill.stl,http://localhost:9999/cfm_data/Indian_Hill.stl]

And so on and this url changes after regular time intervals.

Kindly guide me!

Thanks!

You can load your own script (edit the index.html) that will use the global API to load/read data that you fetch at a given interval. Assuming I understood your question.

1 Like

I did exactly the same to fetch a list of .vtp files placed at a remote server.

Actually I want to do a little different.

Suppose a basic url is there with one name and one url and then after 5 or 10 seconds new .vtp files is loaded with old file still there and it continues to do this until the last file.

Hope I explained it clearly .

Thanks

Ok, then what I said match exactly what you need.

1 Like

To some extent yes! in fact 50% of it. Second part is to figure out how to put those list of files in the form of a proper url with few seconds of delays.

I’m not talking about URL. If you use the URL, you won’t be able to properly incrementally load dataset.

Thank you for your help! I think I have got it!

Many thanks!

Hi there,

I have another questions please. How can I used how to use node fs module in paraview glance to read and write json files?

Please guide me .

Thanks!

I don’t understand the question as Glance does not work with node but in your browser. Also what JSON are you talking about?

1 Like

Hi there,

I have done that thanks for your help.

Now I have another riddle to solve, how can I add a login authentication before someone opens up that landing page of preview glance?

You help is much appreciated as always!

Best Regards

You have several way of doing so, but one is to enable it via your web server (i.e. Apache).