question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

exportWindow() with volumetric data doesn't work as expected?

See original GitHub issue

Hello,

I’m trying to export the vtkplotter scene to .x3d file to inspect in the browser, in the way similar to the export_x3d.py example: https://github.com/marcomusy/vtkplotter-examples/blob/master/vtkplotter_examples/other/export_x3d.py

However, seems like it is not working as expected while trying to export the scene with volumetric data (e.g. MIP rendering style). Here is the code snippet inspired by export_x3d.py:

from vtkplotter import *

e = load(datadir+'embryo.tif')
e.mode(1)
e.color("gray")

t = Text(__doc__, pos=[3000., 2000., 4723], s=150, c='w', depth=0.1)
show(t, e)

exportWindow('embryo.x3d')

Volumetric data is properly visualized in vtkplotter window, but it seems like there is only a text in embryo.x3d file after opening embryo.html file in the browser. Moreover, while trying to visualize and export volumetric data only (i.e. show(e) instead of show(t, e)) the following error occurs:

ERROR: In /work/standalone-x64-build/VTK-source/IO/Export/vtkX3DExporter.cxx, line 138
vtkX3DExporter (0x33fb5d0): no actors found for writing X3D file.

Any help is appreciated. Thanks!

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kemo993commented, Mar 3, 2020

Thank you @marcomusy – this really helped me navigate the alternatives.

1reaction
marcomusycommented, Mar 3, 2020

Hi, I strongly suspect that the underlying vtkX3DExporter class is not able to export volumes. One possibility is to exploit k3d interoperability and do something like this, which generates a html document:

import k3d
import numpy as np
from vtkplotter import load, datadir

vol = load(datadir+'embryo.tif')

kx, ky, kz = vol.dimensions()
arr = vol.getPointArray()
kimage = arr.reshape(-1, ky, kx).astype(np.float32)

plot = k3d.plot()
kvol = k3d.volume(kimage, alpha_coef=20, bounds=vol.bounds())
plot += kvol
with open('page.html','w') as fp:
    fp.write(plot.get_snapshot())
Read more comments on GitHub >

github_iconTop Results From Across the Web

Mount volume doesn't work on Windows 10 using git-bash #673
It seems to be doing something weird with the path. On git-bash: $ docker run --rm -v c:/Users:/data alpine ls /data ls: C:/Program...
Read more >
Incorrect Export of Track Window Volume (CC7) - Community
I never use export, and wouldn't expect it to work 100% in any event, ... It looks like Ov4 doesn't export pan and...
Read more >
Storage Migration Service known issues - Microsoft Learn
In this article. How to collect log files when working with Microsoft Support; Storage Migration Service doesn't show up in Windows Admin Center ......
Read more >
Fix export issues in Premiere Pro - Adobe Support
Fix common export issues in 7 simple steps · Choose File > Project Settings > General. The Project Settings window opens. · In...
Read more >
7. Troubleshooting - Linux NFS faq
If this doesn't work (for example if you don't have the /proc filesystem ... Check the file /proc/fs/nfs/exports and make sure the volume...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found