pyvista-imgui


Namepyvista-imgui JSON
Version 0.3.0 PyPI version JSON
download
home_page
SummaryPyvista imgui integration
upload_time2023-06-29 11:52:32
maintainer
docs_urlNone
author
requires_python>=3.8
licenseMIT
keywords vtk imgui plotting
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Pyvista-Imgui

[![PyPi license](https://badgen.net/pypi/license/pyvista-imgui/)](https://pypi.org/project/pyvista-imgui/) [![PyPi version](https://badgen.net/pypi/v/pyvista-imgui/)](https://pypi.org/project/pyvista-imgui/)

`pyvista-imgui` is a small helper module for the [`pyvista`](https://github.com/pyvista/pyvista)-package to integrate it with the [imgui](https://github.com/ocornut/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`](https://github.com/ocornut/imgui), or by [`pyimgui`](https://github.com/pyimgui/pyimgui/tree/master).

This package is considered experimental at this moment, so expect issues.

## Installation5

To install this package using `pip` use:

```bash
pip install pyvista-imgui[imgui-bundle]
```

for the `imgui-bundle` bindings or:

```bash
pip install pyvista-imgui[imgui]
```

for the `pyimgui` bindings.

Alternatively the installation from source is also possible with:

```bash
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:

```py
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:

```py
imgui.begin("Imgui Plotter")
# render the plotter's contents here
plotter.render()
imgui.end()
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pyvista-imgui",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "vtk,imgui,plotting",
    "author": "",
    "author_email": "Felix Igelbrink <felix.igelbrink@dfki.de>",
    "download_url": "https://files.pythonhosted.org/packages/c1/eb/438b663efeaadf1b348657a0c9c592142dfbc2ce3368a6c0cf78b485919d/pyvista-imgui-0.3.0.tar.gz",
    "platform": null,
    "description": "# Pyvista-Imgui\n\n[![PyPi license](https://badgen.net/pypi/license/pyvista-imgui/)](https://pypi.org/project/pyvista-imgui/) [![PyPi version](https://badgen.net/pypi/v/pyvista-imgui/)](https://pypi.org/project/pyvista-imgui/)\n\n`pyvista-imgui` is a small helper module for the [`pyvista`](https://github.com/pyvista/pyvista)-package to integrate it with the [imgui](https://github.com/ocornut/imgui)-library. \n\nIt 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.\n\nIt currently utilizes either the bindings provided by [`imgui-bundle`](https://github.com/ocornut/imgui), or by [`pyimgui`](https://github.com/pyimgui/pyimgui/tree/master).\n\nThis package is considered experimental at this moment, so expect issues.\n\n## Installation5\n\nTo install this package using `pip` use:\n\n```bash\npip install pyvista-imgui[imgui-bundle]\n```\n\nfor the `imgui-bundle` bindings or:\n\n```bash\npip install pyvista-imgui[imgui]\n```\n\nfor the `pyimgui` bindings.\n\nAlternatively the installation from source is also possible with:\n\n```bash\ngit clone https://github.com/mortacious/pyvista-imgui\ncd pyvista-imgui\npip install [-e] .[imgui-bundle / imgui] \n```\n\n## Usage\n\nThe package includes the class `ImguiPlotter`, which can be used as a drop-in alternative to the regular `pyvista`-plotters:\n\n```py\nimport pyvista as pv\nfrom pyvista_imgui import ImguiPlotter\n\nsphere = pv.Sphere()\n\nplotter = ImguiPlotter()\nplotter.add_axes()\nplotter.add_mesh(sphere)\nplotter.show()\n```\n\nAlternatively, an instance of `ImguiPlotter` can be integrated into an existing imgui-UI as a widget:\n\n```py\nimgui.begin(\"Imgui Plotter\")\n# render the plotter's contents here\nplotter.render()\nimgui.end()\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Pyvista imgui integration",
    "version": "0.3.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/mortacious/pyvista-imgui/issues",
        "Source Code": "https://github.com/mortacious/pyvista-imgui"
    },
    "split_keywords": [
        "vtk",
        "imgui",
        "plotting"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "63a4b1d880947e50ee4c4edf477ec579422f2bbbcbabf151f3dffaf732c5d049",
                "md5": "5a37fcb25b4357c65a4dee87684d76ee",
                "sha256": "c4ba537fcc9a7df037d4e84f799a00941e3a25183b30e504d5a84d63c54e7089"
            },
            "downloads": -1,
            "filename": "pyvista_imgui-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5a37fcb25b4357c65a4dee87684d76ee",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 15281,
            "upload_time": "2023-06-29T11:52:34",
            "upload_time_iso_8601": "2023-06-29T11:52:34.216818Z",
            "url": "https://files.pythonhosted.org/packages/63/a4/b1d880947e50ee4c4edf477ec579422f2bbbcbabf151f3dffaf732c5d049/pyvista_imgui-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c1eb438b663efeaadf1b348657a0c9c592142dfbc2ce3368a6c0cf78b485919d",
                "md5": "5f8bbb0feab939a45e71be76e2585352",
                "sha256": "c9f39d4f9195dc81d4f0d5db41904b2b14ba3126dfa81387b485cff3e55375cb"
            },
            "downloads": -1,
            "filename": "pyvista-imgui-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "5f8bbb0feab939a45e71be76e2585352",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 14629,
            "upload_time": "2023-06-29T11:52:32",
            "upload_time_iso_8601": "2023-06-29T11:52:32.310648Z",
            "url": "https://files.pythonhosted.org/packages/c1/eb/438b663efeaadf1b348657a0c9c592142dfbc2ce3368a6c0cf78b485919d/pyvista-imgui-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-29 11:52:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mortacious",
    "github_project": "pyvista-imgui",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pyvista-imgui"
}
        
Elapsed time: 0.08805s