# vtk.js

**URL:** https://discourse.vtk.org/c/web/vtk-js/11.md?page=1

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

**Page:** 2

---

## [Vtk.js with vtk.wasm usage](https://discourse.vtk.org/t/vtk-js-with-vtk-wasm-usage/15427)

<div class="topic-metadata">

**Author:** [@antonskrebkov](https://discourse.vtk.org/u/antonskrebkov)\
**Replies:** 0\
**Last updated:** [March 25, 2025, 2:53pm UTC](https://discourse.vtk.org/t/vtk-js-with-vtk-wasm-usage/15427 "2025-03-25T14:53:30Z")

</div>

Hi! I faced a lot of vtk.js restrictions (mostly lack of necessary methods, filters etc) and decided to expand application with vtk wasm but only as computation power without any rendering. Before that the flask backend…

---

## [Question about RelativeCoincidentTopology\*OffsetParameters](https://discourse.vtk.org/t/question-about-relativecoincidenttopology-offsetparameters/15192)

<div class="topic-metadata">

**Author:** [@Xoz](https://discourse.vtk.org/u/Xoz)\
**Replies:** 5\
**Last updated:** [January 27, 2025, 7:56am UTC](https://discourse.vtk.org/t/question-about-relativecoincidenttopology-offsetparameters/15192 "2025-01-27T07:56:56Z")

</div>

Hi everyone, I’ve met a problem when trying to adjust two mesh display order. In the past I just use setRelativeCoincidentTopologyPolygonOffsetParameters and setRelativeCoincidentTopologyLineOffsetParameters to set the …

---

## [Error in vtkGenericRenderWindow for vtk.js](https://discourse.vtk.org/t/error-in-vtkgenericrenderwindow-for-vtk-js/15154)

<div class="topic-metadata">

**Author:** [@h4rry](https://discourse.vtk.org/u/h4rry)\
**Replies:** 2\
**Last updated:** [January 15, 2025, 11:56pm UTC](https://discourse.vtk.org/t/error-in-vtkgenericrenderwindow-for-vtk-js/15154 "2025-01-15T23:56:14Z")

</div>

Hi, i’m trying to use vtk.js with vue.js for 2D visualisation of 3D volumes. I tried calling vtkGenericRenderWindow.newInstance() in the onMounted hook of my component, but it would throw this error from inside the vtk.j…

---

## [Based on the ImageCPRMapper example, get a screenshot of the cross section of the blood vessel at a central point](https://discourse.vtk.org/t/based-on-the-imagecprmapper-example-get-a-screenshot-of-the-cross-section-of-the-blood-vessel-at-a-central-point/14390)

<div class="topic-metadata">

**Author:** [@flourishing](https://discourse.vtk.org/u/flourishing)\
**Replies:** 14\
**Last updated:** [January 2, 2025, 9:48am UTC](https://discourse.vtk.org/t/based-on-the-imagecprmapper-example-get-a-screenshot-of-the-cross-section-of-the-blood-vessel-at-a-central-point/14390 "2025-01-02T09:48:51Z")

</div>

Hey vtk community, according to the ImageCPRMapper example, how do I get a screenshot of the cross section of the blood vessel at this center point based on the point of the center line of the blood vessel, and a cross …

---

## [How to modify the line color of LineWidget？](https://discourse.vtk.org/t/how-to-modify-the-line-color-of-linewidget/15042)

<div class="topic-metadata">

**Author:** [@Anultra](https://discourse.vtk.org/u/Anultra)\
**Replies:** 1\
**Last updated:** [December 18, 2024, 2:36pm UTC](https://discourse.vtk.org/t/how-to-modify-the-line-color-of-linewidget/15042 "2024-12-18T14:36:26Z")

</div>

When using LineWidget for line measurement, there is no way to modify the color of the lines, and the colors of rectangles and circles are different from it. How should I handle this issue?

---

## [about LineWidget？](https://discourse.vtk.org/t/about-linewidget/14919)

<div class="topic-metadata">

**Author:** [@Anultra](https://discourse.vtk.org/u/Anultra)\
**Replies:** 23\
**Last updated:** [December 5, 2024, 6:43am UTC](https://discourse.vtk.org/t/about-linewidget/14919 "2024-12-05T06:43:10Z")

</div>

How to handle the situation where the mouse and handle positions do not coincide when using LineWidget for distance measurement on MPR images? the code scene.widgetRender = vtkRenderer.newInstance(); scene.widgetR…

---

## [getCellType error](https://discourse.vtk.org/t/getcelltype-error/14797)

<div class="topic-metadata">

**Author:** [@antonskrebkov](https://discourse.vtk.org/u/antonskrebkov)\
**Replies:** 1\
**Last updated:** [November 22, 2024, 4:29pm UTC](https://discourse.vtk.org/t/getcelltype-error/14797 "2024-11-22T16:29:39Z")

</div>

Hello! Why I always get the Cannot read properties of undefined (reading ‘getCellType’) error while trying to get cell, cellType or getCellPoints from source object? It would seem that I am doing a very simple thing, j…

---

## [About ImageCPRMapper](https://discourse.vtk.org/t/about-imagecprmapper/14888)

<div class="topic-metadata">

**Author:** [@d\_a](https://discourse.vtk.org/u/d_a)\
**Replies:** 4\
**Last updated:** [November 20, 2024, 10:50am UTC](https://discourse.vtk.org/t/about-imagecprmapper/14888 "2024-11-20T10:50:47Z")

</div>

I have obtained the coordinates of the mouse by drawing a line on the MPR. How can I calculate the direction or obtain the direction data? I am confused now. I can only draw a line on the sagittal plane and render the co…

---

## [about using LineWidget?](https://discourse.vtk.org/t/about-using-linewidget/14895)

<div class="topic-metadata">

**Author:** [@Anultra](https://discourse.vtk.org/u/Anultra)\
**Replies:** 0\
**Last updated:** [November 20, 2024, 2:01am UTC](https://discourse.vtk.org/t/about-using-linewidget/14895 "2024-11-20T02:01:34Z")

</div>

After rendering MPR using ImageData, Volume, and VolumeMapper, I want to use lineWidget to measure distance but not display lines. As shown in the figure, the blue markings indicate the starting and ending coordinate…

---

## [I need to visualize the contact areas between multiple .stl files](https://discourse.vtk.org/t/i-need-to-visualize-the-contact-areas-between-multiple-stl-files/14883)

<div class="topic-metadata">

**Author:** [@HARIPRASATH\_Y\_S](https://discourse.vtk.org/u/HARIPRASATH_Y_S)\
**Replies:** 2\
**Last updated:** [November 16, 2024, 4:52am UTC](https://discourse.vtk.org/t/i-need-to-visualize-the-contact-areas-between-multiple-stl-files/14883 "2024-11-16T04:52:42Z")

</div>

i need to see the intersecting area in different colour, i dont know how to do it, is there any way in vtk.js to do that functionality. To view the contact area between the .stl files, if possible can you suggest with an…

---

## [Dear masters,How is the data in aorta\_centerline and spline\_centerline calculated in the ImageCPRMpper example?](https://discourse.vtk.org/t/dear-masters-how-is-the-data-in-aorta-centerline-and-spline-centerline-calculated-in-the-imagecprmpper-example/14793)

<div class="topic-metadata">

**Author:** [@Anultra](https://discourse.vtk.org/u/Anultra)\
**Replies:** 1\
**Last updated:** [November 11, 2024, 8:18am UTC](https://discourse.vtk.org/t/dear-masters-how-is-the-data-in-aorta-centerline-and-spline-centerline-calculated-in-the-imagecprmpper-example/14793 "2024-11-11T08:18:41Z")

</div>

Dear masters, in the ImageCPRMpper example, there are two JSON files, aorta and split, with two arrays, position and orientation, inside. What is the relationship between the two and how is it calculated? This is an exa…

---

## [How to obtain point and orientation through vtkPaintWidget?](https://discourse.vtk.org/t/how-to-obtain-point-and-orientation-through-vtkpaintwidget/14801)

<div class="topic-metadata">

**Author:** [@Anultra](https://discourse.vtk.org/u/Anultra)\
**Replies:** 0\
**Last updated:** [November 1, 2024, 7:51am UTC](https://discourse.vtk.org/t/how-to-obtain-point-and-orientation-through-vtkpaintwidget/14801 "2024-11-01T07:51:30Z")

</div>

How to obtain point and orientation through vtkPaintWidget?

---

## [\`vtkImageCPRMapper\` questions](https://discourse.vtk.org/t/vtkimagecprmapper-questions/13792)

<div class="topic-metadata">

**Author:** [@amin-kchaou](https://discourse.vtk.org/u/amin-kchaou)\
**Replies:** 2\
**Last updated:** [November 1, 2024, 6:15am UTC](https://discourse.vtk.org/t/vtkimagecprmapper-questions/13792 "2024-11-01T06:15:11Z")

</div>

Hi all, I’m trying to use vtkImageCPRMapper to construct a panoramic projection for teeth, but I can’t get it to work. I have a spline running through the volume. I’m visualizing it on the axial (transversal) plane: …

---

## [States added to widgets via addField function can be seen by representations even though documentation says it will not](https://discourse.vtk.org/t/states-added-to-widgets-via-addfield-function-can-be-seen-by-representations-even-though-documentation-says-it-will-not/14637)

<div class="topic-metadata">

**Author:** [@yippiez](https://discourse.vtk.org/u/yippiez)\
**Replies:** 0\
**Last updated:** [September 30, 2024, 7:14pm UTC](https://discourse.vtk.org/t/states-added-to-widgets-via-addfield-function-can-be-seen-by-representations-even-though-documentation-says-it-will-not/14637 "2024-09-30T19:14:45Z")

</div>

In the developing widgets documentation under the widget states section it is stated that: Finally, other sub-states can be created via state.addField({ name, initialValue }). This allows to store data not restricted t…

---

## [Feature request: Mesh smoothing filter in vtkjs](https://discourse.vtk.org/t/feature-request-mesh-smoothing-filter-in-vtkjs/14714)

<div class="topic-metadata">

**Author:** [@Alex\_Vergara](https://discourse.vtk.org/u/Alex_Vergara)\
**Replies:** 2\
**Last updated:** [October 15, 2024, 2:28pm UTC](https://discourse.vtk.org/t/feature-request-mesh-smoothing-filter-in-vtkjs/14714 "2024-10-15T14:28:51Z")

</div>

In normal vtk we have the Laplace filter and many other mesh smoothing filters. However none of these are available for vtkjs. It would be good to have at least one simple filter for this. My current project generates a…

---

## [Callback for Texture Upload Completion in vtk.js](https://discourse.vtk.org/t/callback-for-texture-upload-completion-in-vtk-js/14319)

<div class="topic-metadata">

**Author:** [@Alireza](https://discourse.vtk.org/u/Alireza)\
**Replies:** 1\
**Last updated:** [October 15, 2024, 9:59am UTC](https://discourse.vtk.org/t/callback-for-texture-upload-completion-in-vtk-js/14319 "2024-10-15T09:59:55Z")

</div>

I need a way to know when the texture has been completely uploaded to the GPU so that I can run a callback function. My question is essentially: How do I know when the create3DFromRaw function has finished transferring …

---

## [Problem encountered when using ply+png for texture mapping](https://discourse.vtk.org/t/problem-encountered-when-using-ply-png-for-texture-mapping/13201)

<div class="topic-metadata">

**Author:** [@liangyong](https://discourse.vtk.org/u/liangyong)\
**Replies:** 1\
**Last updated:** [October 14, 2024, 3:13pm UTC](https://discourse.vtk.org/t/problem-encountered-when-using-ply-png-for-texture-mapping/13201 "2024-10-14T15:13:18Z")

</div>

Using the same PLY and PNG for texture mapping in C++is normal, but it is not normal when using vtk.js. How should I solve this problem。 It looks like this: The texture appears to be split

---

## [Can VTK.js edit 3D files? The operations are: dragging to adjust the position of bones, and setting the position or angle of a certain bone separately.](https://discourse.vtk.org/t/can-vtk-js-edit-3d-files-the-operations-are-dragging-to-adjust-the-position-of-bones-and-setting-the-position-or-angle-of-a-certain-bone-separately/14707)

<div class="topic-metadata">

**Author:** [@JerichoDing](https://discourse.vtk.org/u/JerichoDing)\
**Replies:** 7\
**Last updated:** [October 14, 2024, 2:25pm UTC](https://discourse.vtk.org/t/can-vtk-js-edit-3d-files-the-operations-are-dragging-to-adjust-the-position-of-bones-and-setting-the-position-or-angle-of-a-certain-bone-separately/14707 "2024-10-14T14:25:08Z")

</div>

Like: https://youtu.be/lRBhs\_JgE5M Position is 1’30"

---

## [vtp file rendering with preset](https://discourse.vtk.org/t/vtp-file-rendering-with-preset/14643)

<div class="topic-metadata">

**Author:** [@antonskrebkov](https://discourse.vtk.org/u/antonskrebkov)\
**Replies:** 0\
**Last updated:** [October 1, 2024, 5:22pm UTC](https://discourse.vtk.org/t/vtp-file-rendering-with-preset/14643 "2024-10-01T17:22:53Z")

</div>

Hello everyone, I tried to load a vtp file in paraview and it looks like this: The same I would like to get in vtk.js. My code looks like this: const actor = vtkActor.newInstance() const mapper = vtkMapper.newInsta…

---

## [How to fix this problem?](https://discourse.vtk.org/t/how-to-fix-this-problem/14621)

<div class="topic-metadata">

**Author:** [@gdjy098](https://discourse.vtk.org/u/gdjy098)\
**Replies:** 1\
**Last updated:** [September 27, 2024, 9:36am UTC](https://discourse.vtk.org/t/how-to-fix-this-problem/14621 "2024-09-27T09:36:13Z")

</div>

On Web, I’m using vtk.js to render my dicom data to 3d volume. I’m using vtkVolumeMapper and vtkVolume to render volume. I’m using vtkKeyboardCameraManipulator and vtkMouseCameraTrackballFirstPersonManipulator to contr…

---

## [How to Add Axis Labels (X, Y, Z) to vtkAxesActor in JavaScript?](https://discourse.vtk.org/t/how-to-add-axis-labels-x-y-z-to-vtkaxesactor-in-javascript/14600)

<div class="topic-metadata">

**Author:** [@SOHAM\_BHOGALE](https://discourse.vtk.org/u/SOHAM_BHOGALE)\
**Replies:** 3\
**Last updated:** [September 26, 2024, 11:27am UTC](https://discourse.vtk.org/t/how-to-add-axis-labels-x-y-z-to-vtkaxesactor-in-javascript/14600 "2024-09-26T11:27:21Z")

</div>

Hi everyone, I am new to VTK and currently working on a 3D visualization project using vtk.js. I am using vtkAxesActor to display a set of axes on my 3D scene, but I noticed that the axes don’t show the labels for X, Y,…

---

## [Edit ply files](https://discourse.vtk.org/t/edit-ply-files/13832)

<div class="topic-metadata">

**Author:** [@Arcadii\_Bajburtskii](https://discourse.vtk.org/u/Arcadii_Bajburtskii)\
**Replies:** 1\
**Last updated:** [September 21, 2024, 10:12pm UTC](https://discourse.vtk.org/t/edit-ply-files/13832 "2024-09-21T22:12:10Z")

</div>

I have a PLY file that looks like this I need to be able to edit the file. Basically, I need to pick any of the points and drag it Is it possible to do this with the vtk.js library?

---

## [How to do Point Interpolation in Vtk.js?](https://discourse.vtk.org/t/how-to-do-point-interpolation-in-vtk-js/14595)

<div class="topic-metadata">

**Author:** [@hacker\_G7](https://discourse.vtk.org/u/hacker_G7)\
**Replies:** 0\
**Last updated:** [September 19, 2024, 2:30am UTC](https://discourse.vtk.org/t/how-to-do-point-interpolation-in-vtk-js/14595 "2024-09-19T02:30:28Z")

</div>

Is it possible to do that in vtk.js? Or its not possible, if not possible, any other solutions that can do the similar outcome?

---

## [Is there any way to get the silhouette of polydata?](https://discourse.vtk.org/t/is-there-any-way-to-get-the-silhouette-of-polydata/14489)

<div class="topic-metadata">

**Author:** [@Qwd2017](https://discourse.vtk.org/u/Qwd2017)\
**Replies:** 0\
**Last updated:** [August 27, 2024, 2:16am UTC](https://discourse.vtk.org/t/is-there-any-way-to-get-the-silhouette-of-polydata/14489 "2024-08-27T02:16:31Z")

</div>

I want to get the silhouette of polydata. There is an example in c++ https://examples.vtk.org/site/Cxx/PolyData/Silhouette. Is there any way to get the silhouette of polydata with vtk.js?

---

## [ResliceCursorWidget with ManyRenderWindows](https://discourse.vtk.org/t/reslicecursorwidget-with-manyrenderwindows/14198)

<div class="topic-metadata">

**Author:** [@Martin\_Erler](https://discourse.vtk.org/u/Martin_Erler)\
**Replies:** 3\
**Last updated:** [August 13, 2024, 12:25pm UTC](https://discourse.vtk.org/t/reslicecursorwidget-with-manyrenderwindows/14198 "2024-08-13T12:25:22Z")

</div>

Hi, I’m trying to use many render windows in one gl context for my reslice cursor widget implementation. Therefor I create one main render window and add the three child views like in the example of ManyRenderWindows. …

---

## [Some questions about Cinematic Rendering](https://discourse.vtk.org/t/some-questions-about-cinematic-rendering/14356)

<div class="topic-metadata">

**Author:** [@865979216](https://discourse.vtk.org/u/865979216)\
**Replies:** 4\
**Last updated:** [August 7, 2024, 2:23am UTC](https://discourse.vtk.org/t/some-questions-about-cinematic-rendering/14356 "2024-08-07T02:23:21Z")

</div>

Why are all the Cinematic rendering examples on vtk.js based on webXR? Volview( https://volview.kitware.app/ ）Cinematic rendering don’t be based on webXR, right? Based on webXR（ vtk.js ）The three examples use Volumetr…

---

## [How to programmatically add the EllipseWidget?](https://discourse.vtk.org/t/how-to-programmatically-add-the-ellipsewidget/14199)

<div class="topic-metadata">

**Author:** [@antonskrebkov](https://discourse.vtk.org/u/antonskrebkov)\
**Replies:** 6\
**Last updated:** [August 2, 2024, 4:30pm UTC](https://discourse.vtk.org/t/how-to-programmatically-add-the-ellipsewidget/14199 "2024-08-02T16:30:26Z")

</div>

Hello! I have a well-configured functionality for adding a LineWidget by hand and thanks to vtk support I also can add this widgets programmatically by simply calling the lineWidget.updateHandleVisibility(0) and lineWid…

---

## [Missing input events when render takes long time (InteractiveOrientationWidget)](https://discourse.vtk.org/t/missing-input-events-when-render-takes-long-time-interactiveorientationwidget/14313)

<div class="topic-metadata">

**Author:** [@valrom](https://discourse.vtk.org/u/valrom)\
**Replies:** 0\
**Last updated:** [July 29, 2024, 11:31am UTC](https://discourse.vtk.org/t/missing-input-events-when-render-takes-long-time-interactiveorientationwidget/14313 "2024-07-29T11:31:53Z")

</div>

Based on vtk.js I create GitHub - valrom/vtk-js-view-cube-test: Missing events when click on OrientWidget when render takes long time where we have 2 widget managers. One InteractiveOrientationWidget and another for any …

---

## [How can I render some points with RGBA in HTML use vtk.js?](https://discourse.vtk.org/t/how-can-i-render-some-points-with-rgba-in-html-use-vtk-js/14300)

<div class="topic-metadata">

**Author:** [@674438511](https://discourse.vtk.org/u/674438511)\
**Replies:** 1\
**Last updated:** [July 26, 2024, 7:38am UTC](https://discourse.vtk.org/t/how-can-i-render-some-points-with-rgba-in-html-use-vtk-js/14300 "2024-07-26T07:38:44Z")

</div>

Hello Hello Hello I just want to render some points with RGBA in HTML use vtk.js. But nothing to show. I don’t know where is wrong. I’m a newer for vtk.js. Can anyone show me? Thanks~~~~~~~~~ Here is the HTML code: …

---

## [How to remove labels from a renderer](https://discourse.vtk.org/t/how-to-remove-labels-from-a-renderer/14251)

<div class="topic-metadata">

**Author:** [@agustindasilvaR](https://discourse.vtk.org/u/agustindasilvaR)\
**Replies:** 5\
**Last updated:** [July 23, 2024, 8:31am UTC](https://discourse.vtk.org/t/how-to-remove-labels-from-a-renderer/14251 "2024-07-23T08:31:57Z")

</div>

So, I have been generating multiple labels by using vtkLabelWidget in my vtk js project after a button is clicked. Now, I want to remove those labels from the view, so far I have tried creating the following events: Cl…

[Previous page](https://discourse.vtk.org/c/web/vtk-js/11.md)

[Next page](https://discourse.vtk.org/c/web/vtk-js/11.md?page=2)
