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

Applying a texture to a pyvista polydata (tube) #413

Open
shakasaki opened this issue Apr 20, 2021 · 0 comments
Open

Applying a texture to a pyvista polydata (tube) #413

shakasaki opened this issue Apr 20, 2021 · 0 comments

Comments

@shakasaki
Copy link

I'm trying to apply a texture to a pyvista tube object. I have the texture data as a numpy RGB array and the tube saved as a vtk file. This post is motivated from a suggestion by @banesullivan in this issue.

I found something that could be helpful here for a sphere and something on the website for a plane, but could not apply this to a tube.

The example data is the following:

-A pyvista polydata object that contains the borehole trajectory

PolyData (0x7f1ee29f3a60)
N Cells: 159316
N Points: 79700
X Bounds: -2.148e+02, -2.144e+01
Y Bounds: -1.590e+02, 2.125e+01
Z Bounds: 1.177e+03, 1.487e+03
N Arrays: 4

Two numpy arrays, one with the RGB values of the image log (shape (52871, 180, 3)) and one with the depth values that correspond to each row of the RGB image (shape (52871,)).

I appreciate the help!

note that the image data is scaled down ~500 times, but if the approach works I can try it with an upscaled version (which is too large to upload here)

example_data.zip

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

1 participant