top of page

Scientific Visualization
with
VTK in Python

Scientific visualization is the name given to the field in computer science that encompasses

​

  • User interface,

  • Data representation and processing algorithms,

  • Visual representations

VTK is an open-source, object-oriented software system for

​

  • Computer graphics (process of creating images using a computer)

  • Visualization (process of exploring, transforming, and viewing data as images)

  • Volume rendering

  • Image processing (study of 2D pictures, or images)

Basics of 3D Graphics in VTK

The core packages in vtkmodules contain fundamental classes and functionalities that are essential for data processing, visualization, and interaction in VTK .

vtk modules

Vtk is a object–oriented system where every class is derived from vtkObject.

The visualization pipeline in VTK is used to read or create data, analyze and create derivative version of this data, and pass it to the rendering engine for display.

Hello World Example in python

Managing Graphic Elements in VTK

vtkCamera

​

vtkRenderer class provides several functions related to camera manipulation and control.

vtkInteractorStyle

​

Provides the foundation for defining custom interaction styles for user interactions within a rendered scene.

​

  • Handles user input events such as mouse clicks, key presses, mouse movements, and window resize events.

  • Supports camera manipulation operations such as zooming, panning, rotating, and resetting camera settings.

vtkAxesActor

​

It is a hybrid 2D/3D actor used to represent 3D axes in a scene. The user can define the geometry to use for the shaft or the tip, and the user can set the text for the three axes.

Lights

​

Lighting is an essential aspect of rendering 3D scenes, as it determines how objects in the scene are illuminated and how shadows and highlights are represented.

​

  • Point light

  • Directional light

  • Spot light

Basics of Actors in VTK

It represents an object (geometry & properties) in a rendered scene

vtkPolyData represents a geometric structure consisting of vertices, lines, polygons, and/or triangle strips. Point and cell attribute values (e.g., scalars, vectors, etc.) also are represented.

vtkPolyDataMapper is a class that maps polygonal data (i.e., vtkPolyData) to graphics primitives.

Understanding types of Datasets in VTK

vtkViewer Widget with pyside6 - Part 2

Unstructured Grid DataSet in VTK

Visualize Scalar Data on Unstructured Grid in VTK

vtkViewer Widget with pyside6 - Part 3

bottom of page