# \#vtkjs

**URL:** https://discourse.vtk.org/tag/vtkjs/14.md

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

---

## [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?

---

## [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:/…

---

## [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…

---

## [vtk-easy: a nice js-like veneer over vtkjs syntax](https://discourse.vtk.org/t/vtk-easy-a-nice-js-like-veneer-over-vtkjs-syntax/16326)

<div class="topic-metadata">

**Author:** [@mhalle](https://discourse.vtk.org/u/mhalle)\
**Replies:** 9\
**Last updated:** [March 17, 2026, 3:19am UTC](https://discourse.vtk.org/t/vtk-easy-a-nice-js-like-veneer-over-vtkjs-syntax/16326 "2026-03-17T03:19:35Z")

</div>

Hi there, Ever since the earliest VTK days I’ve had both respect for and aggravation with VTK’s verbose syntax, specifically the getter and setter syntax and the fact that operations aren’t chainable in languages like P…

---

## [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.

---

## [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…

---

## [Doesn't unpkg.com/vtk.js include the vtkSeedWidget?](https://discourse.vtk.org/t/doesnt-unpkg-com-vtk-js-include-the-vtkseedwidget/16205)

<div class="topic-metadata">

**Author:** [@fdlyj](https://discourse.vtk.org/u/fdlyj)\
**Replies:** 0\
**Last updated:** [January 2, 2026, 4:24am UTC](https://discourse.vtk.org/t/doesnt-unpkg-com-vtk-js-include-the-vtkseedwidget/16205 "2026-01-02T04:24:10Z")

</div>

Doesn’t unpkg.com/vtk.js include the vtkSeedWidget?

---

## [Hide cells in vtk.js](https://discourse.vtk.org/t/hide-cells-in-vtk-js/15735)

<div class="topic-metadata">

**Author:** [@davsch](https://discourse.vtk.org/u/davsch)\
**Replies:** 11\
**Last updated:** [December 31, 2025, 6:20am UTC](https://discourse.vtk.org/t/hide-cells-in-vtk-js/15735 "2025-12-31T06:20:20Z")

</div>

Is there a way to hide specific cells in vtk.js? Something like scalar celldata with a specific value don’t get rendered. Already tried assigning alpha value to a LUT or hiding specific points with ThresholdPoints and …

---

## [How to change the position of scalar bar on VTK.js](https://discourse.vtk.org/t/how-to-change-the-position-of-scalar-bar-on-vtk-js/13082)

<div class="topic-metadata">

**Author:** [@Ossama\_Elbelamachi](https://discourse.vtk.org/u/Ossama_Elbelamachi)\
**Replies:** 2\
**Last updated:** [November 5, 2025, 12:41pm UTC](https://discourse.vtk.org/t/how-to-change-the-position-of-scalar-bar-on-vtk-js/13082 "2025-11-05T12:41:52Z")

</div>

Hello Everyone I hope you are doing well How can change the position of the scalar bar to be fixed to the bottom of the canvas I tried to use the vtkScalarBarActor and set the bar position using the setBarPosition meth…

---

## [vtkPiecewiseGaussianWidget for window/level or CTF editing in 2D](https://discourse.vtk.org/t/vtkpiecewisegaussianwidget-for-window-level-or-ctf-editing-in-2d/16116)

<div class="topic-metadata">

**Author:** [@vojtech](https://discourse.vtk.org/u/vojtech)\
**Replies:** 0\
**Last updated:** [October 29, 2025, 8:11pm UTC](https://discourse.vtk.org/t/vtkpiecewisegaussianwidget-for-window-level-or-ctf-editing-in-2d/16116 "2025-10-29T20:11:01Z")

</div>

I’m developing a 2D image viewer in VTK.js (using vtkImageSlice + vtkImageMapper) and I’d like to provide an interactive window/level (intensity range) editor. With given LUT/CTF I’d like to achieve: Let the user adj…

---

## [Color Images Not Rendering After Upgrade to vtk.js 34.0.0](https://discourse.vtk.org/t/color-images-not-rendering-after-upgrade-to-vtk-js-34-0-0/16104)

<div class="topic-metadata">

**Author:** [@Alireza](https://discourse.vtk.org/u/Alireza)\
**Replies:** 4\
**Last updated:** [October 21, 2025, 6:43pm UTC](https://discourse.vtk.org/t/color-images-not-rendering-after-upgrade-to-vtk-js-34-0-0/16104 "2025-10-21T18:43:30Z")

</div>

After upgrading from vtk.js 33.x to 34.0.0, color (RGB) images are no longer rendering in our stack viewport (source code) , while grayscale images continue to work fine. I’ve reviewed the diff between versions 33 and 34…

---

## [vtk.js: Image renders black, but Cube renders fine – vtkImageData + vtkImageSlice issue](https://discourse.vtk.org/t/vtk-js-image-renders-black-but-cube-renders-fine-vtkimagedata-vtkimageslice-issue/16097)

<div class="topic-metadata">

**Author:** [@vojtech](https://discourse.vtk.org/u/vojtech)\
**Replies:** 1\
**Last updated:** [October 20, 2025, 3:19pm UTC](https://discourse.vtk.org/t/vtk-js-image-renders-black-but-cube-renders-fine-vtkimagedata-vtkimageslice-issue/16097 "2025-10-20T15:19:39Z")

</div>

I’m using vtk.js inside a React component to render a 2D image slice using vtkImageData and vtkImageSlice. While 3D geometry primitives like vtkCubeSource render correctly (e.g., a cube appears as expected), my 2D image …

---

## [How to access resliced image data from vtkImageResliceMapper in VTK.js](https://discourse.vtk.org/t/how-to-access-resliced-image-data-from-vtkimagereslicemapper-in-vtk-js/16078)

<div class="topic-metadata">

**Author:** [@shuj](https://discourse.vtk.org/u/shuj)\
**Replies:** 3\
**Last updated:** [October 6, 2025, 7:15pm UTC](https://discourse.vtk.org/t/how-to-access-resliced-image-data-from-vtkimagereslicemapper-in-vtk-js/16078 "2025-10-06T19:15:59Z")

</div>

Hi, I’m trying to retrieve pixel data from a slice rendered using vtkImageResliceMapper in VTK.js. Specifically, I want to access the resliced output as a pixel array to count the occurrence of each pixel colour. Initi…

---

## [How to draw UIs on top of the image](https://discourse.vtk.org/t/how-to-draw-uis-on-top-of-the-image/15133)

<div class="topic-metadata">

**Author:** [@shunia](https://discourse.vtk.org/u/shunia)\
**Replies:** 7\
**Last updated:** [October 2, 2025, 10:43pm UTC](https://discourse.vtk.org/t/how-to-draw-uis-on-top-of-the-image/15133 "2025-10-02T22:43:51Z")

</div>

I want to build flexable UIs just like in webgl games that the UIs looks like they are related to the screen rather than the actual 3D objects in the 3D space, and the UIs looks and feels like 2D, as they are just texts,…

---

## [TransformControlsWidget](https://discourse.vtk.org/t/transformcontrolswidget/16066)

<div class="topic-metadata">

**Author:** [@lmj01](https://discourse.vtk.org/u/lmj01)\
**Replies:** 2\
**Last updated:** [September 29, 2025, 8:06am UTC](https://discourse.vtk.org/t/transformcontrolswidget/16066 "2025-09-29T08:06:16Z")

</div>

Widget TransformControlsWidget how work ? it default is the coordinate origin, how can attach one actor to it ? or its design purpos is what ? I think i dont’s understand it, but on the code repo at github, it would li…

---

## [I need to visualize .vtu file in react using vtk.js,](https://discourse.vtk.org/t/i-need-to-visualize-vtu-file-in-react-using-vtk-js/15002)

<div class="topic-metadata">

**Author:** [@HARIPRASATH\_Y\_S](https://discourse.vtk.org/u/HARIPRASATH_Y_S)\
**Replies:** 1\
**Last updated:** [September 28, 2025, 10:08am UTC](https://discourse.vtk.org/t/i-need-to-visualize-vtu-file-in-react-using-vtk-js/15002 "2025-09-28T10:08:37Z")

</div>

does vtkXmlReader supports that feature, i have tried but it showed error, But for web vtkxmlunstructureGrid is not available, without using vtk-wasm is there any other way to do it… If possible can you please suggest th…

---

## [Using ImageMarchingCubes exceeds the array length limit.](https://discourse.vtk.org/t/using-imagemarchingcubes-exceeds-the-array-length-limit/15808)

<div class="topic-metadata">

**Author:** [@Heisenberg](https://discourse.vtk.org/u/Heisenberg)\
**Replies:** 1\
**Last updated:** [September 28, 2025, 9:49am UTC](https://discourse.vtk.org/t/using-imagemarchingcubes-exceeds-the-array-length-limit/15808 "2025-09-28T09:49:50Z")

</div>

Hello everyone, I have just started learning vtk.js. Due to the large size of my data (210x676x676), when I was using ImageMarchingCubes, I exceeded the array length. Is there any solution to this problem?

---

## [About VTK JS Reslice Cursor Widget](https://discourse.vtk.org/t/about-vtk-js-reslice-cursor-widget/15857)

<div class="topic-metadata">

**Author:** [@selimcanozgur](https://discourse.vtk.org/u/selimcanozgur)\
**Replies:** 1\
**Last updated:** [September 28, 2025, 9:46am UTC](https://discourse.vtk.org/t/about-vtk-js-reslice-cursor-widget/15857 "2025-09-28T09:46:53Z")

</div>

I’m using vtk.js for my project and have integrated the Reslice Cursor Widget feature. We have both NIfTI and Draco data, and all of them are rendered correctly on the screen without any issues. Each NIfTI file has its o…

---

## [using ImageReslice in js can not get the slice data like ImageSlicing.cxx](https://discourse.vtk.org/t/using-imagereslice-in-js-can-not-get-the-slice-data-like-imageslicing-cxx/16053)

<div class="topic-metadata">

**Author:** [@1009058470](https://discourse.vtk.org/u/1009058470)\
**Replies:** 2\
**Last updated:** [September 24, 2025, 10:34pm UTC](https://discourse.vtk.org/t/using-imagereslice-in-js-can-not-get-the-slice-data-like-imageslicing-cxx/16053 "2025-09-24T22:34:54Z")

</div>

\<!DOCTYPE html\> \<html lang="en"\> \<head\> \<meta charset="UTF-8"\> \<meta name="viewport" content="width=device-width, initial-scale=1.0"\> \<title\>VTK.js (使用ImageReslice)\</title\> \<script src="https://unpkg.com…

---

## [Why is BoxWidget not part of the vtk.js Widgets3D library?](https://discourse.vtk.org/t/why-is-boxwidget-not-part-of-the-vtk-js-widgets3d-library/15997)

<div class="topic-metadata">

**Author:** [@Pranathi\_Induri](https://discourse.vtk.org/u/Pranathi_Induri)\
**Replies:** 3\
**Last updated:** [September 2, 2025, 4:17pm UTC](https://discourse.vtk.org/t/why-is-boxwidget-not-part-of-the-vtk-js-widgets3d-library/15997 "2025-09-02T16:17:33Z")

</div>

Hi all, While working on vtk.js, I noticed that there is no BoxWidget available in the @kitware/vtk.js/Widgets/Widgets3D package to import directly. In the official vtk.js examples, the BoxWidget is included as a loca…

---

## [VTK.JS (Painting and erasing tool radius size)](https://discourse.vtk.org/t/vtk-js-painting-and-erasing-tool-radius-size/16007)

<div class="topic-metadata">

**Author:** [@selimcanozgur](https://discourse.vtk.org/u/selimcanozgur)\
**Replies:** 1\
**Last updated:** [September 1, 2025, 10:28am UTC](https://discourse.vtk.org/t/vtk-js-painting-and-erasing-tool-radius-size/16007 "2025-09-01T10:28:00Z")

</div>

I have painting and erasing tools, and their radius sizes appear differently on the coronal screen and on the sagittal screen and on the axial screen. Is there a way to show them at the same size on all screens? And is t…

---

## [\[vtkjs\] Reload scene on lost graphic context, best practices?](https://discourse.vtk.org/t/vtkjs-reload-scene-on-lost-graphic-context-best-practices/15789)

<div class="topic-metadata">

**Author:** [@Alex\_Vergara](https://discourse.vtk.org/u/Alex_Vergara)\
**Replies:** 3\
**Last updated:** [August 19, 2025, 2:05pm UTC](https://discourse.vtk.org/t/vtkjs-reload-scene-on-lost-graphic-context-best-practices/15789 "2025-08-19T14:05:23Z")

</div>

Hello Sometimes my scene gets a lost graphic context. Therefore, I shall add a reload scene button. Is there a best practice way to do this, theoretically automatic?

---

## [Trame + VTK + Plotly Application - vue2 or vue3?](https://discourse.vtk.org/t/trame-vtk-plotly-application-vue2-or-vue3/15954)

<div class="topic-metadata">

**Author:** [@firinini](https://discourse.vtk.org/u/firinini)\
**Replies:** 3\
**Last updated:** [August 15, 2025, 8:42pm UTC](https://discourse.vtk.org/t/trame-vtk-plotly-application-vue2-or-vue3/15954 "2025-08-15T20:42:59Z")

</div>

Hi, I am trying to utilize both the vtk and plotly widgets in my trame application and have issues getting the right dependencies in place. As a layer of abstraction, I tried to install the dependencies for running thi…

---

## [VTK Hovering 3D objects](https://discourse.vtk.org/t/vtk-hovering-3d-objects/15967)

<div class="topic-metadata">

**Author:** [@selimcanozgur](https://discourse.vtk.org/u/selimcanozgur)\
**Replies:** 0\
**Last updated:** [August 15, 2025, 1:44pm UTC](https://discourse.vtk.org/t/vtk-hovering-3d-objects/15967 "2025-08-15T13:44:54Z")

</div>

There are 60 different pieces on my 3D screen. I want each piece to hover when I hover over it. I achieved this, but it freezes a lot. How can I synchronize it?

---

## [VTK Js Plane Problem](https://discourse.vtk.org/t/vtk-js-plane-problem/15943)

<div class="topic-metadata">

**Author:** [@selimcanozgur](https://discourse.vtk.org/u/selimcanozgur)\
**Replies:** 2\
**Last updated:** [August 14, 2025, 7:01am UTC](https://discourse.vtk.org/t/vtk-js-plane-problem/15943 "2025-08-14T07:01:46Z")

</div>

I have a problem like this. Many different dicoms are loaded in my project. In the loaded analysis, each of my 3D images comes at a different angle. I’m not sure why they all come at different angles. But my main proble…

---

## [VTK.js + trame: No textures in local rendering =\> minimal example for python ?](https://discourse.vtk.org/t/vtk-js-trame-no-textures-in-local-rendering-minimal-example-for-python/15104)

<div class="topic-metadata">

**Author:** [@Henryk](https://discourse.vtk.org/u/Henryk)\
**Replies:** 6\
**Last updated:** [July 23, 2025, 1:59pm UTC](https://discourse.vtk.org/t/vtk-js-trame-no-textures-in-local-rendering-minimal-example-for-python/15104 "2025-07-23T13:59:58Z")

</div>

Hey everyone, I’m a new and unexperienced user of VTK + Trame for displaying mechnical parts in a browser and I’m impressed what can be done with just a few lines of code. So far, I got a working python-code to render…

---

## [How to create VTK\_TETRA using vtk.js celltypes](https://discourse.vtk.org/t/how-to-create-vtk-tetra-using-vtk-js-celltypes/15839)

<div class="topic-metadata">

**Author:** [@tengziyang](https://discourse.vtk.org/u/tengziyang)\
**Replies:** 2\
**Last updated:** [July 21, 2025, 1:28am UTC](https://discourse.vtk.org/t/how-to-create-vtk-tetra-using-vtk-js-celltypes/15839 "2025-07-21T01:28:43Z")

</div>

---

## [How can I efficiently render 1 billion cubes in VTK.js?](https://discourse.vtk.org/t/how-can-i-efficiently-render-1-billion-cubes-in-vtk-js/15724)

<div class="topic-metadata">

**Author:** [@Amit\_Bhakar](https://discourse.vtk.org/u/Amit_Bhakar)\
**Replies:** 4\
**Last updated:** [June 24, 2025, 9:11am UTC](https://discourse.vtk.org/t/how-can-i-efficiently-render-1-billion-cubes-in-vtk-js/15724 "2025-06-24T09:11:52Z")

</div>

Hi all, I’m working on a web-based 3D visualization using VTK.js, and I need to render a very large number of cubes — on the order of 1 billion. I’m looking for suggestions or best practices on how to handle this effici…

---

## [Weird camera behavior on setUseOffScreen](https://discourse.vtk.org/t/weird-camera-behavior-on-setuseoffscreen/15666)

<div class="topic-metadata">

**Author:** [@Julien\_Champagnol](https://discourse.vtk.org/u/Julien_Champagnol)\
**Replies:** 3\
**Last updated:** [May 25, 2025, 6:54pm UTC](https://discourse.vtk.org/t/weird-camera-behavior-on-setuseoffscreen/15666 "2025-05-25T18:54:17Z")

</div>

Hi, I get a weird behavior when toggling setUseOffScreen on click, but not programmatically if I use a setTimeOut here is my code : import "@kitware/vtk.js/Rendering/Profiles/Geometry"; import vtkGenericRenderWindow f…

---

## [Actor opacity \< 1 makes my rendering out of the viewport bounds !](https://discourse.vtk.org/t/actor-opacity-1-makes-my-rendering-out-of-the-viewport-bounds/15607)

<div class="topic-metadata">

**Author:** [@MC\_TA](https://discourse.vtk.org/u/MC_TA)\
**Replies:** 2\
**Last updated:** [May 21, 2025, 4:29pm UTC](https://discourse.vtk.org/t/actor-opacity-1-makes-my-rendering-out-of-the-viewport-bounds/15607 "2025-05-21T16:29:04Z")

</div>

i’m creating a quadrant view using vtkjs, 3 planes for AX, Cor, Sag and STL viewer, creating one renderWindowView with 4 viewports, without opacity of my STL actor, everything works as expected, the problem is once i …

[Next page](https://discourse.vtk.org/tag/vtkjs/14.md?match_all_tags=true&page=1&tags%5B%5D=vtkjs)
