Pyvista imgui integration
Project description
Pyvista-Imgui
pyvista-imgui
is a small helper module for the pyvista
-package to integrate it with the imgui-library.
It integrates a fully interactive pyvista
-Plotter as an imgui-widget, by utilizing VTK's vtkGenericOpenGLRenderWindow
to first render the output into an OpenGL texture and displaying it as a regular imgui-image widget.
It currently utilizes either the bindings provided by imgui-bundle
, or by pyimgui
.
This package is considered experimental at this moment, so expect issues.
Installation5
To install this package using pip
use:
pip install pyvista-imgui[imgui-bundle]
for the imgui-bundle
bindings or:
pip install pyvista-imgui[imgui]
for the pyimgui
bindings.
Alternatively the installation from source is also possible with:
git clone https://github.com/mortacious/pyvista-imgui
cd pyvista-imgui
pip install [-e] .[imgui-bundle / imgui]
Usage
The package includes the class ImguiPlotter
, which can be used as a drop-in alternative to the regular pyvista
-plotters:
import pyvista as pv
from pyvista_imgui import ImguiPlotter
sphere = pv.Sphere()
plotter = ImguiPlotter()
plotter.add_axes()
plotter.add_mesh(sphere)
plotter.show()
Alternatively, an instance of ImguiPlotter
can be integrated into an existing imgui-UI as a widget:
imgui.begin("Imgui Plotter")
# render the plotter's contents here
plotter.render()
imgui.end()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyvista-imgui-0.3.0.tar.gz
.
File metadata
- Download URL: pyvista-imgui-0.3.0.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9f39d4f9195dc81d4f0d5db41904b2b14ba3126dfa81387b485cff3e55375cb |
|
MD5 | 5f8bbb0feab939a45e71be76e2585352 |
|
BLAKE2b-256 | c1eb438b663efeaadf1b348657a0c9c592142dfbc2ce3368a6c0cf78b485919d |
File details
Details for the file pyvista_imgui-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: pyvista_imgui-0.3.0-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4ba537fcc9a7df037d4e84f799a00941e3a25183b30e504d5a84d63c54e7089 |
|
MD5 | 5a37fcb25b4357c65a4dee87684d76ee |
|
BLAKE2b-256 | 63a4b1d880947e50ee4c4edf477ec579422f2bbbcbabf151f3dffaf732c5d049 |