I work with blood flow in the heart and I have been mainly exporting videos to share my results with other colleagues. I wanted to try to export the whole scene instead as a lot of information is lost when visualizing such a complex flow from a fixed point of view. I know there are options such as orbit in animation, but the optimal approach would be to freely rotate in 3D to observe the flow from different points of view.
With this in mind, I have used the Export Animated Scene and a vtkjs.zip file has been created. I understand I need to use vtk.js to visualize my data, and in fact, I managed to visualize the first frame of my data correctly using the SceneExplorer.html example. I assume I need to combine this code with the from TimeSeries.html.
As my experience in this area is rather limited I just wanted to know if I’m heading in the correct direction or if you know of alternatives to generate 3D scenes.
Thank you for the quick response! I tried to upload the .zip file to ParaView Glance before but nothing happened. I have tried again after creating a new animated scene but it starts loading index.json files but no data appears afterward.
I just noticed that the scene saving process is not completed correctly, so maybe that’s something to do with it.
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 "D:\Software\ParaView 5.10.0-Windows-Python3.9-msvc2017-AMD64\bin\Lib\site-packages\vtkmodules\web\vtkjs_helper.py", line 225, in zipAllTimeSteps
os.remove(rootIndexPath)
PermissionError: [WinError 32] El proceso no tiene acceso al archivo porque está siendo utilizado por otro proceso: 'Z:\\compilaao\\LAAO_Flow\\visualization\\scene\\index.json'
debug: In unknown, line 0
debug: Save animated scene failed!
Maybe you could.do that.on slicer…
You may ask in the discourse of Slicer to Lasso Andras because I think he has worked with.applications related tonthe haert
I’m working with blood flow data and my animation includes temporal pathlines. If I am not mistaken, 3D slicer is not suited for this type of data, right?
On Slicer for nodes that change in time you can use the sequemcies module like for your curveNode. You can work in tandemnwith FeBio for the animations I think
Ok, I’ll give it a try then. Nonetheless, I would still prefer to run the whole pipeline in Paraview. Saving each timestep individually I can visualize them perfectly in Glance but I haven’t managed to load them as a single animation through Exported Animated Scene.
I have tried on both ubuntu and windows with versions 5.10 and 5.10.1 and using different visualization types and I keep getting the exact same error. @mwestphal@Adrien_Boucaud should I report it as a bug?
I have tried on both ubuntu 20.04 and windows 10 with Paraview versions 5.10 and 5.10.1 using different visualization types. Should I try the nightly version then?
Ok problem solved. It seems that the index.json file is still open when doing os.remove(rootIndexPath) at line 225 of vtkjs_helper.py. I just commented the line and the vtkjs line bundles without issues and I can visualize it in ParaView Glance.
It doesn’t appear to be specific to any visualization or Paraview filter, it fails even when I try saving a scene with a simple .stl file with the Export Animated Scene option.
On the other hand, I’m beginning to suspect that the code messes up the timestep order when displayed in Glance. Could it be related to using a single digit to number each timestep? That is to say, using 0,1,2,… instead of 000,001,002,…
I have solved the ordering issue by adding a function to natural sort the timestep folders. I have attached the vtkjs_helper.py file if you are interested. Now I can visualize the whole scene in Paraview Glance. It is rather impressive! Thank you very much for the effort to develop such incredible tools.
One last question. Every time I change timestep in Glance the camera resets to the default position. Is there any way to keep the camera in place between time steps?
Glad to hear it works. It would be great if you could create a pull request with your fix.
Regarding the camera reset, it has been implemented on purpose (to enforce Paraview’s camera settings at each time). Though I also think it makes sense to ignore the exported camera like you suggest. If you have funding, we could implement it for you.
So if I understand correctly this is the intended behavior of the camera? I assumed it was possible to watch the animation from different views as within each time step the camera can be placed in any position.
I would love to finance this stuff but I’m just an underpaid overworked PhD student . Thank you very much anyway!