Skip to content
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

Pyvista issue with volume data representation #55

Open
xhluca opened this issue Jul 8, 2021 · 10 comments
Open

Pyvista issue with volume data representation #55

xhluca opened this issue Jul 8, 2021 · 10 comments

Comments

@xhluca
Copy link

xhluca commented Jul 8, 2021

See readme https://github.com/lizzjs/dash-vtk

@jourdain this seems out of my domain, do you think this is an easy fix or something that can be added to docs?

@jourdain
Copy link
Collaborator

jourdain commented Jul 9, 2021

I'm wondering if it is related to numpy array. I'm currently off but I would try to add a tolist() or something along that to work around the current issue on that line assuming the issue is related to that part.

@lizzjs
Copy link

lizzjs commented Jul 9, 2021

I'm wondering if it is related to numpy array. I'm currently off but I would try to add a tolist() or something along that to work around the current issue on that line assuming the issue is related to that part.

I tried what you suggested and it still gives the same error.

@jourdain
Copy link
Collaborator

jourdain commented Jul 9, 2021

Maybe I should have asked what is the error?

@jourdain
Copy link
Collaborator

jourdain commented Jul 9, 2021

Sorry, I just looked at the data and your field is a vector (3 components). You will have to convert it to a scalar if you want to render it in volume rendering.

@jourdain
Copy link
Collaborator

jourdain commented Jul 9, 2021

But my guess is that you want geometry rendering with glyphing or something along those lines. But maybe I'm wrong and I have no idea on what you are trying to see.

@jourdain
Copy link
Collaborator

jourdain commented Jul 9, 2021

Maybe some stream tracer like with the bike demo?

test

@lizzjs
Copy link

lizzjs commented Jul 12, 2021

I believe this is exactly what we want, although we would like to focus the streamlines on just the airflow (blue-ish part of the image). To achieve this you used geometry rendering?

@jourdain
Copy link
Collaborator

Yes, geometry rendering with some filtering to generate the stream lines. (sorry for the late reply, just got back from vacation)

@lizzjs
Copy link

lizzjs commented Jul 27, 2021

I think I am a bit confused on how to render it using dash-vtk, are you using PyVista or VTK to load the data points? (Also, it's okay, thank you for your reply)

@jourdain
Copy link
Collaborator

To me VTK or PyVista is the same thing. That only affect the syntax but under the hood it is VTK.
From your grid you need to do a stream tracer or something similar (look at the motorcycle example) and then with dash-vtk you just need to use a geometry representation with a mesh.

HTH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants