Volumetric Dataset Rendering in Python

Deborah Schmidt
Helmholtz Imaging | MDC Berlin
Sep 25, 2024
Slides available at https://ida-mdc.github.io/workshop-visualization/tutorial-volume-rendering-python/

Volume Rendering in napari

  • Interactive visualization and annotation: Offers tools for exploring data and annotating images in real-time.
  • Layer-based rendering: Supports multiple layers like images, labels, points, and shapes for versatile data representation.
  • Plugin extensibility: Easily extendable through plugins to add custom functionality.
  • Integration with Python ecosystem: Seamlessly works with NumPy, Dask, and other scientific Python libraries.

Volume Rendering in napari

Solution to run napari code through Album

Volume Rendering in napari

Dependencies

Volume Rendering in napari

Running napari programmatically

Volume Rendering with Pygfx

Key Features:

  • Real-time GPU Rendering: Leverages modern GPU acceleration for high-performance 2D and 3D graphics.
  • Diverse application support: from scientific visualization to video game rendering.
  • Flexible Scene Graph: Employs a scene graph architecture to efficiently manage complex scenes.
  • Custom Shader Support: Allows for custom shaders to create advanced visual effects.

Volume Rendering with Pygfx

Solution to run pygfx code through Album

Volume Rendering with Pygfx

Dependencies

Volume Rendering with Pygfx

Setting the scene

Volume Rendering with Pygfx

Adding the volume to the scene

Volume Rendering with Pygfx

Setting up the camera and running the application

Volume Rendering in VTK

  • Transfer Functions: Map voxel intensities to color and opacity for flexible and accurate rendering.
  • Advanced customization: Full control over lighting, shading, and rendering parameters.
  • ParaView & 3D Slicer: GUI-based tools built on VTK for easier interaction with volumetric data.