Unfortunately, I believe I cannot share the original .vtkjs as it includes the patient geometry. However, I have created an equivalent .vtkjs from synthetic data, I hope it is still useful. I share it as a drive link as I had issues uploading it directly to this discussion.
On the other hand, I don’t know if I fully understand what you mean by cleaning the .vtkjs file.
Thanks for sharing your data and that is indeed what I think. So if you unzip the vtkjs file (rename + unzip) you will find an index.json at the root of the package.
The screenshot below was taken from your dataset and if you go into the animation structure, you can for each timeSteps either remove or empty the camera entry.
Ok, I have slightly modified the vtkjs_helper.py file to erase all camera data before saving the root index.json file. Now it works like a charm. Thanks to everyone involved in this thread! Here’s the updated file in case anyone else is interested.
Finally, I just wanted to ask how I can best contribute to fixing the bug involving the root index.json ordering and closing. I have limited experience contributing to such large projects, so should I report the bug or shall I attempt a merge request with my updated code?
At first, I tried ordering the folders by adding extra digits. But I was not sure in which part of the code the folders were actually named so I realized it was much simpler to just use natural ordering for the folders (the functions I added on the top). It seems that I forgot to delete the previous failed approach.
Sorry to bother you again. I was trying to export some vorticity-related volumetric animations alongside the pathlines and I keep getting this error.
Generic Warning: In C:\glr\builds\paraview\paraview-ci\build\superbuild\paraview\src\Remoting\Animation\vtkSMAnimationSceneWebWriter.cxx, line 216
Failed to bundle vtkjs file
Traceback (most recent call last):
File "C:\Program Files\ParaView 5.10.0-RC2-Windows-Python3.9-msvc2017-AMD64\bin\Lib\site-packages\vtkmodules\web\vtkjs_helper.py", line 197, in zipAllTimeSteps
addDirectoryToZip(
File "C:\Program Files\ParaView 5.10.0-RC2-Windows-Python3.9-msvc2017-AMD64\bin\Lib\site-packages\vtkmodules\web\vtkjs_helper.py", line 118, in addDirectoryToZip
rootTimeStepSection[objName]["actor"] = obj["actor"]
KeyError: 'actor'
debug: In unknown, line 0
debug: Save animated scene failed!
In principle it should be possible to export volumetric renderings, right?
Ok, it seems that vtkjs_helper expects the key "actor" but in the volume rendering index.json it says "volume" instead. Is it as easy as changing the key from "volume" to "actor" in each index.json file?