Paraview Glance - loading multiple files

I don’t know if it still works but downloading an old glance file from v3.0.0, I found

    "sources": [
        {
            "id": "3",
            "props": {
                "name": "f1.obz",
                "dataset": {
                    "name": "f1.obz",
                    "url": "https://kitware.github.io/vtk-js-datasets/data/obj-mtl/Ferrari%20F1.zip"
                }
            }
        }
    ],

state.json (5.3 KB)

This is what I’ve wrote based on combination of COVID example and your code. I am still getting the same error:

Uncaught TypeError: source.getDataset(…).isA is not a function

Verified the remote bug. I’ve pushed a PR to fix it: https://github.com/Kitware/paraview-glance/pull/331

Thanks guys for the great help.

After a lot of different tries, I am still getting the glance file.

Are you still trying the state.json file you’ve attached in your previous post? Or are you re-generating your glance file via the save state button? if you’re using your aforementioned state.json file, you need to modify your sources object like so:

"id": "6",                 
"group": "Sources",        
"name": "TrivialProducer", 
"props": {                 
    "name": "test.nii",    
    "type": "vtkImageData",
    "dataset": {           
        "name": "test.nii",
        "url": "....."
    }                      

Easiest way is to still re-generate the glance file.

No I regenerated from a new installation. Basically I re-built the code on my computer and trying to export, gives me the same file as before. I made sure that I have the latest version as well.

It works for me when I use this URL: https://localhost:9999/?name=head-mr.vti&url=https://kitware.github.io/vtk-js-datasets/data/vti/head-binary-zlib.vti

I load it, save state, then I can load the resulting glance file and the dataset shows up. Can you provide more details as to what is the error you get now, if it’s different from before?

Yes that way it works.
So I’m trying to find a template *.glance file to change the file name in code to pass for visual.

The problem is, the current.glance file still has the whole image as vtk vector in it.

I managed to manually remove the entire vector and put url instead. But it’s a big file to clean up.

Though maybe if the bug gets fixed, then the save state actually gives json file with urls. Then we can easily use that inside our code.

Thanks for the help.

Oh, right now Glance master should have the fix for saving remote data as a URL rather than the entire vtk array. Does it not work for you?

No I updated my version, still saves same as before.

Hm, can you post a glance file generated with the latest version? I can have a clearer means of debugging with it.

Please follow the link, the file is too big for here.

And just as a sanity check for myself: are you loading this data via the name & url parameters, or you are loading via girder?

I take it back. I re-ran and it’s working fine! I dont know what I was doint wrong. Sorry for confusion.

1 Like

Glad things work now!

Yes thank you so much for the quick help.

Hi all,
I am trying to do something similar without going the URL route.

Is there a class in vtk that can help generate the dataset that glance accepts?

Also, what kind of file formats are supported to one is providing the source using the url?

1 Like