To be frank, the few times I've dived into using Mayavi, I found it cumbersome and not intuitive - perhaps I should create a docs page comparing examples between pyvista and Mayavi to demonstrate the benefit of one library over the other. For example, check out what's possible in the connections section of the docs. so our goal with pyvista is to break down the entrance barrier for new Python users to start creating compelling 3D visualizations.Īlso, since pyvista is pure Python and VTK has wheels on PyPI, using pyvista as a supporting module for 3D visualization is really easy for external projects to harness. ![]() I've dabbled with Mayavi a few times and found the docs incredibly difficult to follow - and I hear from other users its difficult to install. I'll work towards outlining these more clearly! At the moment, my primary goal with pyvista is to make it incredibly intuitive to use - thus making 3D visualization more accessible to a broad audience (particularly geoscientists). I'm particularly curious if there are maintainability/goal/scope/whatever differences between the libraries. This makes rapid prototyping in IPython a breeze with tab-complete. pyvista just makes any filter that a given data type can support directly available on that object as a callable method with keyword arguments. in Mayavi a user has to search around in the mlab.pipeline module for what their looking for and set up a pipeline. # Apply VTK threshold filter result = dataset. I do know that the differences bewteen how pyvista and Mayavi make VTK filters available to the user are stark:įrom pyvista import examples dataset = examples. I think Mayavi has a similar effort in this regard but I don't know enough to comment too much further. It also stays true to VTK's object-oriented approach.įor example, in pyvista we simply wrap common VTK classes with properties and methods to make accessing the underlying data within the VTK data object and using VTK filters more intuitive so that users don't need to know the nuances of creating VTK pipelines and remember all the different VTK classes for filters, etc. This allows pyvista to merge into any existing Python VTK code as pyvista objects are instances of VTK objects. We provide an easy to use interface to VTK's Python bindings making accessing VTK data objects simple and fast. first, pyvista is truly an interface to the Visualization Toolkit. You're definitely right that there is a lot of overlap in features between Mayavi and pyvista! I do however think pyvista is approaching 3D viz in a totally different way the Mayavi. It looks like the overlap between vtki and mayavi+tvtk seems the most substantial Thanks, I wasn't aware that Mayavi could provide subplots as it sounds like we do a similar thing - I've updated the table to reflect this. But if there is another method that VTK supports natively that Mayavi does not, then the X probably makes sense (maybe with an asterisk, or with renaming to "native subplotting" or something). So if you also accomplish subplotting by having multiple VTK scenes, then having an X in the Mayavi column there is probably not correct. FWIW in PySurfer were have "subplotting" grids using Mayavi the way they suggest in the docs, namely by setting up a proper traitsui window with multiple Mayavi scenes in it.This might be out of scope for these docs, but for folks like me who have endured Mayavi for years, you might be able to nudge them into adopting vtki with some arguments beyond the feature list, since it's pretty close to parity. it looks like the overlap between vtki and mayavi+tvtk seems the most substantial (pythonic interface easy NumPy support/integration).Just to add from the perspective from a long-time mayavi+tvtk user (e.g., PySurfer) who is excited about the potential of this project (!): Interactivity/embeddable in Jupyter notebooks While this table outlines the various features available across these tools, it doesn't capture the ease-of-use of those features across the different software packages or other factors such as ease of installation or the Pythonic-ness of the API (how intuitive the API is to a new user) Here's an example of what I'm imaging for this: ![]() Let's use this issue as a place to keep track of all the different tools out there start outlining what sections might be included in the comparison table. I think it might be useful to get a comparison table going in the docs to compare pyvista to other 3D viz tools out there (Python-based or not).
0 Comments
Leave a Reply. |