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

Use extract geometry filter to enforce PolyData #349

Merged
merged 1 commit into from
Apr 1, 2019
Merged

Use extract geometry filter to enforce PolyData #349

merged 1 commit into from
Apr 1, 2019

Conversation

banesullivan
Copy link
Contributor

@banesullivan banesullivan commented Apr 1, 2019

VTKjs currently only supports vtkPolyData. These changes use an extract geometry filter to get a useable representation of any VTK data object.

Note that these changes make creating compelling scenes with vtki a breeze!!

Examples

import vtki
vtki.set_plot_theme('document')
from vtki import examples
import panel
panel.extension('vtk')
from panel.pane import VTK as panel_display

def display(p):
    return panel_display(p.ren_win)
data = examples.load_uniform()

p = vtki.Plotter(notebook=False, off_screen=True)

p.add_mesh(data.threshold_percent([0.25, 0.75]))
p.add_mesh(data.wireframe())
p.add_mesh(data.slice_orthogonal())

p.show(auto_close=False)
display(p)

Screen Shot 2019-03-31 at 7 23 57 PM

data = examples.download_st_helens().warp_by_scalar()

p = vtki.Plotter(notebook=False, off_screen=True)
p.add_mesh(data, opacity='linear')
p.show(auto_close=False)
display(p)

Screen Shot 2019-03-31 at 7 23 48 PM

data = examples.download_lidar()

p = vtki.Plotter(notebook=False, off_screen=True)
p.add_mesh(data)
p.show(auto_close=False)
display(p)

Screen Shot 2019-03-31 at 7 24 03 PM

VTKjs currently only supports `vtkPolyData`. These changes use an extract geometry filter to get a useable representation of any VTK data object.
@banesullivan
Copy link
Contributor Author

Note these changes will make pyvista/pyvista#144 possible:

ezgif com-video-to-gif

@philippjfr
Copy link
Member

Looks good to me, I've restarted the Windows build which timed out the first time. Will merge shortly.

@philippjfr philippjfr merged commit 963f4ce into holoviz:master Apr 1, 2019
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

Successfully merging this pull request may close these issues.

None yet

2 participants