Skip to main content

Jupyter Dash Viewer for VTK

Project description

Jupyter-Dash-VTK-Viewer (jdvv)

image

Intro and Motivation

There are an ever growing number of 3d visualization tools in python and for jupyter. In my opinion VTK by Kitware provides the most complete set of tools for this purpose. The learning curve is a bit steep and the syntax isn't always particularly pythonic (often the underlying C++ bleeds through) but it is top notch. For those wanting a bit more user friendly and pythonic "batteries included" approach, have a look at PyVista.

The motivation for this small vtk-viewer is to make viewing vtk objects easier from within jupyter lab. PyVista and VTK both offer a great viewer that can be launched external to jupyter lab in a QT window and this works great. The purpose of this package is to provide a similar experience within jupyter lab by taking advantage of the dash-vtk suite of components.

TL;DR

View VTK (or PyVista) objects either inline or in a separate tab within Jupyter Lab. A handful of controls are provided.

Quickstart

pip install jdvv

A Basic example

from jdvv import viewer
import pyvista as pv

# make a simple vtk object
cyl = pv.Cylinder()

# give it a name to be used in the viewer controls
cyl.name = "my cylinder"

# view inline
viewer.inline(cyl)

# view in a new tab within juptyer lab
viewer.tab(cyl)

# view externally in a separate browser tab
viewer.external(cyl)

image

Features

  • view inline, tab without needing to leave Jupyter Lab or view as an external browswer tab
  • view multiple objects, separate controls for each
  • Controls
    • visibility on/off
    • color & oppacity for objects with no associated data
    • Select color map, set min/max and opacity for object with attached arrays
    • change point size
    • select surface representation (wireframe, surface, volume)
    • Change background colors

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

jdvv-0.0.2.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jdvv-0.0.2-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file jdvv-0.0.2.tar.gz.

File metadata

  • Download URL: jdvv-0.0.2.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.8

File hashes

Hashes for jdvv-0.0.2.tar.gz
Algorithm Hash digest
SHA256 5689655b4e5ffe257d3a3d1bd30f5bcbed6acdfdfecf186a14e7faa76602d919
MD5 7e2ff32109b9c1a929ac39d2f1245b02
BLAKE2b-256 303b65f9d63c8c517d3279b62030b40be3261e039f9065a075a011c78f5cc676

See more details on using hashes here.

File details

Details for the file jdvv-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: jdvv-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.8

File hashes

Hashes for jdvv-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3ec884482bd00dd5e4080ef474f685c0ceb83f9771aa27c6461e178c9184c00a
MD5 a0806f2a4935a1f33079f5f953e1db30
BLAKE2b-256 c11e9081f5e4256165fb023425d1c9a4ecae3a4200725f77a966686c28fa5b55

See more details on using hashes here.

Supported by

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