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 the bindings provided by imgui-bundle
, but the integration of other imgui-bindings is planned for a future release.
This package is considered experimental at this moment, so expect issues.
Installation5
To install this package using pip
use:
pip install pyvista-imgui
Alternatively the installation from source is also possible with:
git clone https://github.com/mortacious/pyvista-imgui
cd pyvista-imgui
pip install [-e] .
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.1.1.tar.gz
.
File metadata
- Download URL: pyvista-imgui-0.1.1.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff84fbb83e9e453ebc42164b0bbaf87ee9c8d31e75b4cd437e8dd112e6c08187 |
|
MD5 | 8f0141f92727733e0ab96f12bb905fe8 |
|
BLAKE2b-256 | ac5c2d9803195077cbf55a37bdc60ac55c837fedb4fa2191c667d0f439e48285 |
File details
Details for the file pyvista_imgui-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: pyvista_imgui-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eef2a813e97ba1d2e6eb93caa7d3c297cba450935e98e989be9da61a65eaa98b |
|
MD5 | 5d4ec5bd17c9425b6f21c47aef350ede |
|
BLAKE2b-256 | 22e8c7c5a2be88053d65984573c67ede8163779dae3df7a61afdf0d106c02641 |