# Web

**URL:** https://discourse.vtk.org/c/web/9.md

[Latest](https://discourse.vtk.org/latest.md) · [Categories](https://discourse.vtk.org/categories.md) · [Tags](https://discourse.vtk.org/tags.md)

---

## [About the Web category](https://discourse.vtk.org/t/about-the-web-category/42)

<div class="topic-metadata">

**Author:** [@cory.quammen](https://discourse.vtk.org/u/cory.quammen)\
**Replies:** 0\
**Last updated:** [December 4, 2018, 9:23pm UTC](https://discourse.vtk.org/t/about-the-web-category/42 "2018-12-04T21:23:03Z")

</div>

A place for questions about VTK.js, VTK.wasm, and related applications.

---

## [VTK.js TypeScript support](https://discourse.vtk.org/t/vtk-js-typescript-support/16534)

<div class="topic-metadata">

**Author:** [@BotellaA](https://discourse.vtk.org/u/BotellaA)\
**Replies:** 3\
**Last updated:** [September 23, 2026, 2:47pm UTC](https://discourse.vtk.org/t/vtk-js-typescript-support/16534 "2026-09-23T14:47:26Z")

</div>

What is your current policy on TypeScript support? I see partial support. What should I do when using an untyped file? Should I report it to you somewhere?

---

## [What's New in VTK-wasm - Free Release Webinar](https://discourse.vtk.org/t/whats-new-in-vtk-wasm-free-release-webinar/16520)

<div class="topic-metadata">

**Author:** [@NickBearup](https://discourse.vtk.org/u/NickBearup)\
**Replies:** 0\
**Last updated:** [August 25, 2026, 2:55pm UTC](https://discourse.vtk.org/t/whats-new-in-vtk-wasm-free-release-webinar/16520 "2026-08-25T14:55:39Z")

</div>

The VTK team at Kitware will be hosting a free webinar on Thursday, September 3 from 12:00pm - 1:00pm ET covering the latest developments in VTK-wasm and how it can be used to bring high-performance VTK rendering directl…

---

## [vtkShaderProperty::AddFragmentShaderReplacement behaves differently in WebAssembly (VTK 9.5.2) compared to native OpenGL](https://discourse.vtk.org/t/vtkshaderproperty-addfragmentshaderreplacement-behaves-differently-in-webassembly-vtk-9-5-2-compared-to-native-opengl/16513)

<div class="topic-metadata">

**Author:** [@HST](https://discourse.vtk.org/u/HST)\
**Replies:** 0\
**Last updated:** [August 17, 2026, 6:28pm UTC](https://discourse.vtk.org/t/vtkshaderproperty-addfragmentshaderreplacement-behaves-differently-in-webassembly-vtk-9-5-2-compared-to-native-opengl/16513 "2026-08-17T18:28:25Z")

</div>

Hi, I use vtkShaderProperty::AddFragmentShaderReplacement() to modify the fragment shader. The following shader replacement works correctly in the native OpenGL build, the actor is red. But it has no visible effect in …

---

## [vtk-wasm webgl crashes with latest vtk-wasm docker images](https://discourse.vtk.org/t/vtk-wasm-webgl-crashes-with-latest-vtk-wasm-docker-images/16492)

<div class="topic-metadata">

**Author:** [@RaMmer](https://discourse.vtk.org/u/RaMmer)\
**Replies:** 10\
**Last updated:** [August 2, 2026, 8:57pm UTC](https://discourse.vtk.org/t/vtk-wasm-webgl-crashes-with-latest-vtk-wasm-docker-images/16492 "2026-08-02T20:57:45Z")

</div>

Hi, I have been observing regular vtk-wasm crashes with webgl losing context because of bad memory allocation as shown in the below picture. This was never occurring with the older docker images with version tag 9.6,…

---

## [How do I use vtkjs to color cells individually](https://discourse.vtk.org/t/how-do-i-use-vtkjs-to-color-cells-individually/9797)

<div class="topic-metadata">

**Author:** [@755\_simulation](https://discourse.vtk.org/u/755_simulation)\
**Replies:** 6\
**Last updated:** [July 20, 2026, 11:55pm UTC](https://discourse.vtk.org/t/how-do-i-use-vtkjs-to-color-cells-individually/9797 "2026-07-20T23:55:54Z")

</div>

---

## [VTK.wasm 'ghost pixel' in browser](https://discourse.vtk.org/t/vtk-wasm-ghost-pixel-in-browser/16479)

<div class="topic-metadata">

**Author:** [@HST](https://discourse.vtk.org/u/HST)\
**Replies:** 6\
**Last updated:** [July 15, 2026, 6:10am UTC](https://discourse.vtk.org/t/vtk-wasm-ghost-pixel-in-browser/16479 "2026-07-15T06:10:08Z")

</div>

Hi, I started with VTK.wasm. My first goal was, display an empty blue screen. But the display contains white pixel from the bottom left to the top right corner. In a second step, I added a cone. The diagonal white pixe…

---

## [Is there a segmentation mapper available in VTK/VTK.js?](https://discourse.vtk.org/t/is-there-a-segmentation-mapper-available-in-vtk-vtk-js/16459)

<div class="topic-metadata">

**Author:** [@Pranathi\_Induri](https://discourse.vtk.org/u/Pranathi_Induri)\
**Replies:** 1\
**Last updated:** [June 18, 2026, 8:54pm UTC](https://discourse.vtk.org/t/is-there-a-segmentation-mapper-available-in-vtk-vtk-js/16459 "2026-06-18T20:54:02Z")

</div>

Hi everyone, I am working on a medical imaging viewer using VTK/VTK.js for DICOM volume rendering. I wanted to understand whether VTK has a built-in segmentation mapper or recommended pipeline for displaying segmentatio…

---

## [prototype pollution issues on dependencies](https://discourse.vtk.org/t/prototype-pollution-issues-on-dependencies/16175)

<div class="topic-metadata">

**Author:** [@blinkkkkkk](https://discourse.vtk.org/u/blinkkkkkk)\
**Replies:** 1\
**Last updated:** [May 29, 2026, 10:33pm UTC](https://discourse.vtk.org/t/prototype-pollution-issues-on-dependencies/16175 "2026-05-29T22:33:35Z")

</div>

@kitware/vtk.js rely on node\_modules/xmlbuilder2 which depend on /node\_modules/js-yaml js-yaml \<3.14.2 which has prototype pollution issues: Severity: moderate js-yaml has prototype pollution in merge (\<\<) - https:/…

---

## [vtk.js WebGPU backend 3D models lights Issue](https://discourse.vtk.org/t/vtk-js-webgpu-backend-3d-models-lights-issue/16431)

<div class="topic-metadata">

**Author:** [@Vanhohinham](https://discourse.vtk.org/u/Vanhohinham)\
**Replies:** 3\
**Last updated:** [May 28, 2026, 2:05pm UTC](https://discourse.vtk.org/t/vtk-js-webgpu-backend-3d-models-lights-issue/16431 "2026-05-28T14:05:47Z")

</div>

I’m using vtk.js version 35.15.2. After switching to the WebGPU backend, I cannot adjust the lighting parameters of 3D models via APIs during rendering. What could be the cause?

---

## [ImageCPRMapper example help with cursor reslice widget and camera](https://discourse.vtk.org/t/imagecprmapper-example-help-with-cursor-reslice-widget-and-camera/16420)

<div class="topic-metadata">

**Author:** [@cyl2506](https://discourse.vtk.org/u/cyl2506)\
**Replies:** 3\
**Last updated:** [May 18, 2026, 5:10pm UTC](https://discourse.vtk.org/t/imagecprmapper-example-help-with-cursor-reslice-widget-and-camera/16420 "2026-05-18T17:10:48Z")

</div>

Hello, I’m trying to reproduce the example shown in ImageCPRMapper. I have provided my own volume and centerline coordinates like the following JSON: { "position": \[ 14.796443176269523, -15.35349…

---

## [Difference between vtk-wasm-sdk Docker image and GitLab tar.gz bundles, and when to use RemoteSession](https://discourse.vtk.org/t/difference-between-vtk-wasm-sdk-docker-image-and-gitlab-tar-gz-bundles-and-when-to-use-remotesession/16365)

<div class="topic-metadata">

**Author:** [@leehyeonseop](https://discourse.vtk.org/u/leehyeonseop)\
**Replies:** 2\
**Last updated:** [April 9, 2026, 12:23am UTC](https://discourse.vtk.org/t/difference-between-vtk-wasm-sdk-docker-image-and-gitlab-tar-gz-bundles-and-when-to-use-remotesession/16365 "2026-04-09T00:23:09Z")

</div>

Hi, I’m building a web-based VTK application using Emscripten. Currently I compile VTK myself with OffscreenCanvas and threading support, write embind wrappers, and do all rendering client-side in the browser. I have a…

---

## [VTK Wasm volume rendering error when using gradient opacity](https://discourse.vtk.org/t/vtk-wasm-volume-rendering-error-when-using-gradient-opacity/16364)

<div class="topic-metadata">

**Author:** [@Linh](https://discourse.vtk.org/u/Linh)\
**Replies:** 0\
**Last updated:** [March 31, 2026, 9:38am UTC](https://discourse.vtk.org/t/vtk-wasm-volume-rendering-error-when-using-gradient-opacity/16364 "2026-03-31T09:38:10Z")

</div>

Hi, I’m using vtk-wasm-sdk docker to compile my own wasm bundle to use in my web app. This is my render volume code: void renderLoadedVolume() { std::cout \<\< "=== renderLoadedVolume called ===" \<\< std::endl; …

---

## [Query with respect to WebGPU Rendering Backend in VTK WASM](https://discourse.vtk.org/t/query-with-respect-to-webgpu-rendering-backend-in-vtk-wasm/16355)

<div class="topic-metadata">

**Author:** [@RaMmer](https://discourse.vtk.org/u/RaMmer)\
**Replies:** 2\
**Last updated:** [March 26, 2026, 10:31am UTC](https://discourse.vtk.org/t/query-with-respect-to-webgpu-rendering-backend-in-vtk-wasm/16355 "2026-03-26T10:31:43Z")

</div>

Hello, I have been working with VTK WASM over the past few weeks and have been experimenting with the webgpu rendering backend. It works great for my use case which basically most of the time is around is just for visu…

---

## [pyvista-js: PyVista-like 3D visualization for jupyterlite / vtk.js](https://discourse.vtk.org/t/pyvista-js-pyvista-like-3d-visualization-for-jupyterlite-vtk-js/16354)

<div class="topic-metadata">

**Author:** [@Tetsuo\_Koyama](https://discourse.vtk.org/u/Tetsuo_Koyama)\
**Replies:** 2\
**Last updated:** [March 25, 2026, 5:57pm UTC](https://discourse.vtk.org/t/pyvista-js-pyvista-like-3d-visualization-for-jupyterlite-vtk-js/16354 "2026-03-25T17:57:33Z")

</div>

Describe something you’ve made Hi everyone! I’m excited to share pyvista-js, a new library that brings the intuitive API of PyVista to the browser via vtk.js. It is specifically designed to work seamlessly in WASM envi…

---

## [Trame + WASM: bind custom widget](https://discourse.vtk.org/t/trame-wasm-bind-custom-widget/16350)

<div class="topic-metadata">

**Author:** [@kerim](https://discourse.vtk.org/u/kerim)\
**Replies:** 3\
**Last updated:** [March 23, 2026, 9:37am UTC](https://discourse.vtk.org/t/trame-wasm-bind-custom-widget/16350 "2026-03-23T09:37:42Z")

</div>

Hi, I wrote custom widget in C++ fork of VTK 9.6 and now I’m trying to port it to Trame local view using WASM approach. My approach is to build VTK WASM, install trame-vtklocal package with VTK\_WASM\_DIR\_OVERRIDE env va…

---

## [How to use GPU to accelerate time-consuming calculations, such as ImageMarchingCubes and WindowedSincPolyDataMilter](https://discourse.vtk.org/t/how-to-use-gpu-to-accelerate-time-consuming-calculations-such-as-imagemarchingcubes-and-windowedsincpolydatamilter/16319)

<div class="topic-metadata">

**Author:** [@MrQ\_92](https://discourse.vtk.org/u/MrQ_92)\
**Replies:** 3\
**Last updated:** [March 23, 2026, 6:32am UTC](https://discourse.vtk.org/t/how-to-use-gpu-to-accelerate-time-consuming-calculations-such-as-imagemarchingcubes-and-windowedsincpolydatamilter/16319 "2026-03-23T06:32:09Z")

</div>

I am learning to use vtk.js. The current issue is that the calculation of large volume data using MarchingCubes and WindowedSincPolyDataMilter is time-consuming. I have read the code and found that their calculations a…

---

## [Fetching DICOM Volume data and load it to vtk wasm to construct volume rendering](https://discourse.vtk.org/t/fetching-dicom-volume-data-and-load-it-to-vtk-wasm-to-construct-volume-rendering/16334)

<div class="topic-metadata">

**Author:** [@Linh\_William\_Nguyen](https://discourse.vtk.org/u/Linh_William_Nguyen)\
**Replies:** 0\
**Last updated:** [March 17, 2026, 7:15am UTC](https://discourse.vtk.org/t/fetching-dicom-volume-data-and-load-it-to-vtk-wasm-to-construct-volume-rendering/16334 "2026-03-17T07:15:36Z")

</div>

Hi, I’m attempting to use cornerstonejs to fetch dicom data. But I’m not sure how I can get the volume data into vtk wasm to construct 3d volume rendering

---

## [vtkChartXY is rendered only in VtkRemoteView](https://discourse.vtk.org/t/vtkchartxy-is-rendered-only-in-vtkremoteview/16317)

<div class="topic-metadata">

**Author:** [@Muhammed\_Ali](https://discourse.vtk.org/u/Muhammed_Ali)\
**Replies:** 2\
**Last updated:** [March 7, 2026, 12:50am UTC](https://discourse.vtk.org/t/vtkchartxy-is-rendered-only-in-vtkremoteview/16317 "2026-03-07T00:50:41Z")

</div>

I’m trying to make a 2d plot to run in the browser, but it gets rendered only in VtkRemoteView mode in VtkLocalView it shows just white blank screen and prints Gtk-Message: 03:45:36.722: Not loading module “atk-bridg…

---

## [Error: WebGPU canvas selector with vtkWebAssemblyHardwareWindow fails for the official Geometry Viewer Emscripten Example](https://discourse.vtk.org/t/error-webgpu-canvas-selector-with-vtkwebassemblyhardwarewindow-fails-for-the-official-geometry-viewer-emscripten-example/16313)

<div class="topic-metadata">

**Author:** [@RaMmer](https://discourse.vtk.org/u/RaMmer)\
**Replies:** 4\
**Last updated:** [March 5, 2026, 4:21am UTC](https://discourse.vtk.org/t/error-webgpu-canvas-selector-with-vtkwebassemblyhardwarewindow-fails-for-the-official-geometry-viewer-emscripten-example/16313 "2026-03-05T04:21:13Z")

</div>

Hi, I have noticed that the WebGPU canvas selector for the official example Geometry Viewer fails as it defaults to the default canvas selection id canvas instead of vtk-3d-canvas. These are the commands I have used to…

---

## [Error:Failed to build the official example WrappedAsyncClipper with VTK 9.6.](https://discourse.vtk.org/t/error-failed-to-build-the-official-example-wrappedasyncclipper-with-vtk-9-6/16308)

<div class="topic-metadata">

**Author:** [@ZLong-Li](https://discourse.vtk.org/u/ZLong-Li)\
**Replies:** 5\
**Last updated:** [March 2, 2026, 5:28pm UTC](https://discourse.vtk.org/t/error-failed-to-build-the-official-example-wrappedasyncclipper-with-vtk-9-6/16308 "2026-03-02T17:28:02Z")

</div>

Hello, recently I tried to build WebAssembly with VTK 9.6, and successfully built VTK after enabling VTK\_WEBASSEMBLY\_THREADS=TRUE. However, when I attempted to build WrappedAsyncClipper without a main function, an error …

---

## [How to programmatically add the vtkSeedWidget or vtkSphereWidget](https://discourse.vtk.org/t/how-to-programmatically-add-the-vtkseedwidget-or-vtkspherewidget/16130)

<div class="topic-metadata">

**Author:** [@fdlyj](https://discourse.vtk.org/u/fdlyj)\
**Replies:** 15\
**Last updated:** [February 25, 2026, 2:12pm UTC](https://discourse.vtk.org/t/how-to-programmatically-add-the-vtkseedwidget-or-vtkspherewidget/16130 "2026-02-25T14:12:43Z")

</div>

How to programmatically add the vtkSeedWidget or vtkSphereWidget,then execute widgetManager.enablePicking(), and you can drag the widget with the mouse Thanks.

---

## [Error: could not instantiate classes like vtkXMLPolyDataReader with the vtk.wasm module](https://discourse.vtk.org/t/error-could-not-instantiate-classes-like-vtkxmlpolydatareader-with-the-vtk-wasm-module/16275)

<div class="topic-metadata">

**Author:** [@RaMmer](https://discourse.vtk.org/u/RaMmer)\
**Replies:** 6\
**Last updated:** [February 17, 2026, 12:50am UTC](https://discourse.vtk.org/t/error-could-not-instantiate-classes-like-vtkxmlpolydatareader-with-the-vtk-wasm-module/16275 "2026-02-17T00:50:06Z")

</div>

Hi, I was working on a development project with react and typescript bundled with vite using vtk js for visualisation. However I had issues with it and since moved to handle the same with vtk-wasm instead. I have set u…

---

## [Label outline rendering in VTK.js's ImageResliceMapper](https://discourse.vtk.org/t/label-outline-rendering-in-vtk-jss-imagereslicemapper/16224)

<div class="topic-metadata">

**Author:** [@PaulHax](https://discourse.vtk.org/u/PaulHax)\
**Replies:** 4\
**Last updated:** [February 10, 2026, 12:53am UTC](https://discourse.vtk.org/t/label-outline-rendering-in-vtk-jss-imagereslicemapper/16224 "2026-02-10T00:53:17Z")

</div>

I’ve added label outline rendering for the oblique slicing ImageResliceMapper. This is based on the label outline rendering work already in ImageSliceMapper. This is not on master - it’s a starting point if anyone is i…

---

## [How to clip a screw mesh to visualize only the part outside the vertebral cortical bone in vtk.js?](https://discourse.vtk.org/t/how-to-clip-a-screw-mesh-to-visualize-only-the-part-outside-the-vertebral-cortical-bone-in-vtk-js/16266)

<div class="topic-metadata">

**Author:** [@gr92](https://discourse.vtk.org/u/gr92)\
**Replies:** 0\
**Last updated:** [February 3, 2026, 11:18am UTC](https://discourse.vtk.org/t/how-to-clip-a-screw-mesh-to-visualize-only-the-part-outside-the-vertebral-cortical-bone-in-vtk-js/16266 "2026-02-03T11:18:47Z")

</div>

Hi everyone, I am developing a new feature using vtk.js and need to implement a technical visualization for ‘cortical breach’ detection. Currently, I can detect the intersection between a screw (represented as a cyl…

---

## [Need help implementing CPR with vtk.js and OHIF](https://discourse.vtk.org/t/need-help-implementing-cpr-with-vtk-js-and-ohif/16265)

<div class="topic-metadata">

**Author:** [@linhgt](https://discourse.vtk.org/u/linhgt)\
**Replies:** 1\
**Last updated:** [February 2, 2026, 1:24pm UTC](https://discourse.vtk.org/t/need-help-implementing-cpr-with-vtk-js-and-ohif/16265 "2026-02-02T13:24:33Z")

</div>

Hello, I’m trying to implement CPR visualization using vtk.js in OHIF. I am following the example here: I have implemented my own viewport in OHIF to display CPR result: import React, { useEffect, useRef } from 'rea…

---

## [how to read STEP file in vtk wasm](https://discourse.vtk.org/t/how-to-read-step-file-in-vtk-wasm/16128)

<div class="topic-metadata">

**Author:** [@blocky](https://discourse.vtk.org/u/blocky)\
**Replies:** 1\
**Last updated:** [January 30, 2026, 3:33pm UTC](https://discourse.vtk.org/t/how-to-read-step-file-in-vtk-wasm/16128 "2026-01-30T15:33:00Z")

</div>

Hi everyone, I’m currently trying to read STEP files in VTK WASM. Based on some previous posts, I recompiled the vtk-master version, set VTK\_MODULE\_ENABLE\_VTK\_IOOCCT to YES, and compiled a 32-bit version of OpenCASCADE …

---

## [Labelmap image to polydata via marching cubes code for VTK.js](https://discourse.vtk.org/t/labelmap-image-to-polydata-via-marching-cubes-code-for-vtk-js/16239)

<div class="topic-metadata">

**Author:** [@PaulHax](https://discourse.vtk.org/u/PaulHax)\
**Replies:** 0\
**Last updated:** [January 16, 2026, 3:39pm UTC](https://discourse.vtk.org/t/labelmap-image-to-polydata-via-marching-cubes-code-for-vtk-js/16239 "2026-01-16T15:39:31Z")

</div>

I made a small library that generates polydata meshes from labelmaps/segmentations for VTK.js Demo: labelmap-polydata Demo Not much to it, but it does have some gotchas worked around for aligning the polydata’s on th…

---

## [Doubt with VTK wasm](https://discourse.vtk.org/t/doubt-with-vtk-wasm/16203)

<div class="topic-metadata">

**Author:** [@sridhar-mani](https://discourse.vtk.org/u/sridhar-mani)\
**Replies:** 8\
**Last updated:** [January 9, 2026, 5:32am UTC](https://discourse.vtk.org/t/doubt-with-vtk-wasm/16203 "2026-01-09T05:32:25Z")

</div>

I have been trying to use the vtk wasm sdk 64 bit with workers for the rendering of openfoam files but am getting issue unable to transfer the canvas to the wasm.

---

## [Python type hints](https://discourse.vtk.org/t/python-type-hints/16213)

<div class="topic-metadata">

**Author:** [@BotellaA](https://discourse.vtk.org/u/BotellaA)\
**Replies:** 1\
**Last updated:** [January 7, 2026, 1:24pm UTC](https://discourse.vtk.org/t/python-type-hints/16213 "2026-01-07T13:24:23Z")

</div>

You provide all the stub files for the VTK C++ objects, but I cannot find the type hints or stub files for the Python files in the web module: https://gitlab.kitware.com/vtk/vtk/-/tree/master/Web/Python/vtkmodules/web I…

[Next page](https://discourse.vtk.org/c/web/9.md?page=1)
