-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
exportWindow() with volumetric data doesn't work as expected? #107
Comments
Hi, 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()) |
Thank you @marcomusy -- this really helped me navigate the alternatives. |
Hi, I would like to follow up on this closed issue. I'm looking to export my model to either vtk, x3d, stl, or any other widely used format. Should I try to use the meshio package? or is there a way to do it inside VTKPlotter? Thank you for your assistance! Noe |
Hi Noe, If you need to export a single mesh you can use From inside notebooks you cannot export a window because ...there's a bug! I'll fix it for the next release, thanks for reporting it. |
Hi Marco! Thanks so much. I got the x3d export to work in python. Unfortunately, blender didn't accept this version of x3d format. So I thought to try to export to obj. As follows: exportWindow('this.obj') and then I get this error:
I'm guessing this is not a priority and that's fine. Just thought to write this. |
Hi Noe, yes - exporting the rendering scene to obj is not ready yet (i understand it will in vtk9), |
Hello,
I'm trying to export the
vtkplotter
scene to.x3d
file to inspect in the browser, in the way similar to theexport_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
:Volumetric data is properly visualized in
vtkplotter
window, but it seems like there is only a text inembryo.x3d
file after openingembryo.html
file in the browser. Moreover, while trying to visualize and export volumetric data only (i.e.show(e)
instead ofshow(t, e)
) the following error occurs:Any help is appreciated. Thanks!
The text was updated successfully, but these errors were encountered: