jourdain
(Sebastien Jourdain)
May 4, 2020, 5:43pm
14
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"
}
}
}
],
alib022
(Ali B)
May 4, 2020, 6:10pm
15
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
alib022
(Ali B)
May 4, 2020, 6:17pm
17
Thanks guys for the great help.
alib022
(Ali B)
May 4, 2020, 8:20pm
18
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.
alib022
(Ali B)
May 4, 2020, 8:40pm
20
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?
alib022
(Ali B)
May 4, 2020, 9:08pm
22
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?
alib022
(Ali B)
May 4, 2020, 9:13pm
24
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.
alib022
(Ali B)
May 4, 2020, 10:01pm
26
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?
alib022
(Ali B)
May 4, 2020, 10:18pm
28
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
alib022
(Ali B)
May 5, 2020, 2:01pm
30
Yes thank you so much for the quick help.
devngc
(Devang)
January 17, 2021, 1:18am
31
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?
devngc
(Devang)
January 17, 2021, 4:05am
32
Also, what kind of file formats are supported to one is providing the source using the url?