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 hashes)

Uploaded source

Built Distribution

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

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page