Skip to main content

Pyvista imgui integration

Project description

Pyvista-Imgui

PyPi license PyPi version

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

pyvista-imgui-0.2.0.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

pyvista_imgui-0.2.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file pyvista-imgui-0.2.0.tar.gz.

File metadata

  • Download URL: pyvista-imgui-0.2.0.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.16

File hashes

Hashes for pyvista-imgui-0.2.0.tar.gz
Algorithm Hash digest
SHA256 cf886daca5150f722719e558243af66a111c228b0685fdd714f50032bb90d171
MD5 00005079a7125681aa734093a0502e97
BLAKE2b-256 812faec06009df77701b80afd25b1e9253208be58c05b42358f6e9efac9725ab

See more details on using hashes here.

File details

Details for the file pyvista_imgui-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pyvista_imgui-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 203bdd81e023490a5453b07cb86ae35992034bfc07d0eff8cc088ee0b1ceb193
MD5 b0f3b67bacafff6e96488356c0e57e08
BLAKE2b-256 bf94272e3c6ae4821208436c5f11c6092c6665c5eea2d7888b28b4109e2149d4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page