VTK.js v38 Expands WebGPU Imaging and Mesh Processing

Since v35, VTK.js has expanded WebGPU imaging workflows, added shared-canvas integrations, and introduced support for animated glTF models and GPU mesh slicing. Updates also improve TypeScript declarations and resource cleanup.

These changes support workflows ranging from image reslicing and volume rendering to mesh processing. The sections below describe the capabilities, examples, and implementation considerations.

Expanded WebGPU Imaging Workflows

The WebGPU backend now supports oblique reslicing and curved planar reformation. The curved planar reformation example straightens the aorta for inspection.

A vtk.js WebGPU medical imaging interface displaying a straightened curved planar reformation (CPR) view of an aorta CT scan in the center with a horizontal blue reference line, paired with an axial cross-section inset in the bottom right marked by a green line and control points, and a top-right Controls panel set to WebGPU renderer, Aorta centerline, 180-degree angle, Straightened mode, and MAX projection.

Curved planar reformation straightens the aorta for inspection. Rendered with the WebGPU backend.

WebGPU volume rendering also adds shading, scattering, shadows, segmentation outlines, and component-mixing presets. Explore the WebGPU volume rendering demo.

A vtk.js WebGPU 3D volumetric rendering of a human head and skull CT scan on a black background, colored in translucent green, blue, and yellow via the "erdc_rainbow_bright" transfer function. Surrounding UI overlays include a transfer function editor with "Use Shadow" enabled in the top left, a Controls panel in the top right showing a "Switch to WebGL" button and sliders for Surface to Volume Blending (0.7), G Illumination Reach (0.5), VS Sample Dist (3), and Anisotropy (0.4), and a performance overlay in the bottom left reporting Mean: 32 - Current: 30 FPS at

WebGPU volume rendering demo

Partial image uploads improve performance by avoiding a complete GPU texture upload when only a local region changes. Segmentation tools and applications that receive image data in blocks can use this approach to update slices, curved planar reformats, reslices, and volumes. See the implementation details.

Shared Canvases and Animated glTF Models

VTK.js can share a WebGL context with other renderers, including MapLibre. Setting manageCanvas to false leaves canvas sizing and styling to the host application.

The MapLibre example shows archived NOAA/NWS KTLX radar reflectivity from May 20, 2013, rendered as a VTK.js volume with a linked cross-section.

A vtk.js and MapLibre geospatial visualization displaying a 3D volumetric weather radar storm plume over central Oklahoma (Oklahoma City, Moore, Norman, and Guthrie), color-mapped from green to red by radar reflectivity (20 to 70 dBZ)[cite: 21]. An overlaid "Storm cross-section" control panel on the left shows metadata for the May 20, 2013 KTLX radar scan, a cut position slider set to 8 km N, a vertical west-east cross-section profile, and a reflectivity color legend.

Archived NOAA/NWS KTLX radar reflectivity from May 20, 2013, rendered as a VTK.js volume with a linked cross-section.

For imported models, GLTFImporter now supports animations and skinning. Expanded material support adds effects such as clearcoat, transmission, and iridescence through WebGPU.

Load a model and select an animation in the glTF example. Additional implementation details describe the changes.

A vtk.js WebGPU 3D rendering of a low-poly faceted orange, white, and brown fox model in a mid-stride running pose against a solid slate-gray background, accompanied by a top-right Controls panel configured for the WebGPU renderer, glTF format, Fox model, and Run animation.

The Fox model’s Run animation, rendered with WebGPU. Model: PixelMannen (CC0); rigging and animation: tomkranis; glTF conversion: AsoboStudio and scurest (CC BY 4.0).

GPU Cross-Sections and Mesh Processing

vtkCutterMapper renders cuts defined by planes, spheres, boxes, cylinders, and cones. It supports interactive cross-section displays, while workflows that need output geometry still require a filter. Explore the cutter example and API documentation.

A vtk.js 3D point cloud visualization of the Stanford Dragon rendered in semi-transparent white against a slate-gray background, intersected vertically by a translucent blue cutting plane that highlights the cross-sectional slice contour in bright green[cite: 21]. A top-right Controls panel displays settings for Cut type (

A GPU-rendered cut reveals a cross-section of the mesh.

When clipped geometry is needed for further processing, vtkClipPolyData produces that output. For surfaces containing disconnected pieces, vtkBFSConnectivityFilter extracts the largest, smallest, or a selected connected region.

The mesh clipping and connected-region extraction examples demonstrate these operations.

A vtk.js 3D mesh clipping visualization of a cow model in side profile against a slate-gray background, bisected vertically into a translucent red anterior half and a translucent blue posterior half[cite: 21]. A top-right Controls panel displays a Clip slider set to 0.776128 alongside a color legend identifying the red "Kept side" and blue "Clipped side".

Mesh clipping produces geometry that can feed subsequent processing steps.

A vtk.js 3D isosurface extraction visualization rendering three stepped, voxelized gray spheres of varying sizes against a slate-gray background, accompanied by a top-right Controls panel with the Iso value slider set to 100 and Mode set to ExtractionMode_ALL

Connected-region extraction separates disconnected parts of a surface.

Segmentation Outlines Across Thick Image Slabs

ImageResliceMapper can project labels through a slab and outline their projected boundaries over a maximum-intensity projection. This keeps projected segmentation outlines visible across a thick image slab.

A vtk.js medical imaging visualization displaying an axial thick-slab projection of a thoracic CT scan on a black background, overlaid with a red circular outline over the anterior cardiac region and a blue circular outline over the descending aorta, accompanied by a top-right Controls panel with sliders for Segment 1 Thickness (3), Segment 2 Thickness (3), Outline Opacity (1), and Slab Thickness (333).

To use the OpenGL implementation, enable label outlines and set the slab thickness. See the example and the behavior and settings.

TypeScript Declarations and Resource Cleanup

VTK.js v38 expands TypeScript declaration coverage and corrects return types, nullability, exports, and constants. These corrections may expose compilation errors in existing applications that inaccurate declarations previously hid. The TypeScript definition syncing pull request provides details.

Resource cleanup fixes release GPU resources owned by render passes, volume mappers, and textures when those objects are deleted. These changes are relevant to applications that repeatedly create and remove visualization views. See the render-window cleanup and texture cleanup release notes.

Upgrading From v35

For context on the earlier release, read the VTK.js v35 announcement. Review the migration guide when updating an existing application.

Learn More and Connect

VTK.js is an JavaScript implementation of the Visualization Toolkit (VTK). It provides interactive browser-based visualizations for medical and scientific data. Examples include: 

  • LiDAR point clouds
  • Surface models representing molecular structures
  • Volume renderings of medical images

Visit the VTK.js website for general information, browse the source code, or explore the examples.

Got a project you are thinking about, drop us a line at VTK Discourse web section. 

Kitware also offers day-long onsite or remote training, available regularly or on demand.

Contact Kitware

Leave a comment