# Web

**URL:** https://discourse.vtk.org/c/web/9.md?page=2

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

**Page:** 3

---

## [How to use ImageCPRMapper to get CPR on the transverseplane](https://discourse.vtk.org/t/how-to-use-imagecprmapper-to-get-cpr-on-the-transverseplane/13234)

<div class="topic-metadata">

**Author:** [@lanranlaura](https://discourse.vtk.org/u/lanranlaura)\
**Replies:** 7\
**Last updated:** [August 20, 2025, 9:41am UTC](https://discourse.vtk.org/t/how-to-use-imagecprmapper-to-get-cpr-on-the-transverseplane/13234 "2025-08-20T09:41:46Z")

</div>

Hello, I saw the addition of CPR function a while ago. I imitated the example and tried to surface reconstruct the spine on the sagittal plane , and it seems to be successful. But I attempted tooth reconstruction in t…

---

## [Regarding Glyph3DMapper](https://discourse.vtk.org/t/regarding-glyph3dmapper/15892)

<div class="topic-metadata">

**Author:** [@Heisenberg](https://discourse.vtk.org/u/Heisenberg)\
**Replies:** 4\
**Last updated:** [July 31, 2025, 8:42pm UTC](https://discourse.vtk.org/t/regarding-glyph3dmapper/15892 "2025-07-31T20:42:45Z")

</div>

Hello everyone, I attempted to use cubes instead of pixels to render the ply file, but the actual rendering result did not meet my expectations. Could it be that I used a wrong part? Here is my code: \<template\> \<div c…

---

## [ImageSlice and cropping planes widget](https://discourse.vtk.org/t/imageslice-and-cropping-planes-widget/8918)

<div class="topic-metadata">

**Author:** [@PaulHax](https://discourse.vtk.org/u/PaulHax)\
**Replies:** 9\
**Last updated:** [July 29, 2025, 6:46am UTC](https://discourse.vtk.org/t/imageslice-and-cropping-planes-widget/8918 "2025-07-29T06:46:49Z")

</div>

I’ed like to use the ImageCroppingWidget to clip/crop ImageSlices/ImageMappers. I modified the ImageCroppingWidget example to includes ImageSlices: https://codesandbox.io/s/volume-rendering-bounds-forked-e8433n?file=/s…

---

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

---

## [Disable 3D model rotation in new event](https://discourse.vtk.org/t/disable-3d-model-rotation-in-new-event/15800)

<div class="topic-metadata">

**Author:** [@antonskrebkov](https://discourse.vtk.org/u/antonskrebkov)\
**Replies:** 2\
**Last updated:** [July 10, 2025, 12:33pm UTC](https://discourse.vtk.org/t/disable-3d-model-rotation-in-new-event/15800 "2025-07-10T12:33:28Z")

</div>

Hello everyone, In vtk.js I have additional functionality that requires using the left mouse button. By default, the left mouse button is responsible for rotating the 3D model. Can I disable rotation in a new event and …

---

## [How is orientation calculated in the ImageCPRMapper example?](https://discourse.vtk.org/t/how-is-orientation-calculated-in-the-imagecprmapper-example/15782)

<div class="topic-metadata">

**Author:** [@Anultra](https://discourse.vtk.org/u/Anultra)\
**Replies:** 1\
**Last updated:** [July 3, 2025, 1:52pm UTC](https://discourse.vtk.org/t/how-is-orientation-calculated-in-the-imagecprmapper-example/15782 "2025-07-03T13:52:38Z")

</div>

I build the orthogonal matrix according to the conventional calculation method of tangent, bitangent and normal, but the JSON format is different from the example. I also tried frenet-serret-frames, I don’t know if I di…

---

## [Issue with Using pthread in WASM](https://discourse.vtk.org/t/issue-with-using-pthread-in-wasm/15767)

<div class="topic-metadata">

**Author:** [@blocky](https://discourse.vtk.org/u/blocky)\
**Replies:** 9\
**Last updated:** [July 2, 2025, 11:26am UTC](https://discourse.vtk.org/t/issue-with-using-pthread-in-wasm/15767 "2025-07-02T11:26:08Z")

</div>

Hello, I’m trying to compile VTK-9.5.0 and use the resulting build as a library for compiling my own C++ code targeting WebAssembly. During the VTK build process, I followed the instructions from the official guide (Bu…

---

## [How to render measurement results (SVGText) using WebGL to maintain consistency during scene transformations?](https://discourse.vtk.org/t/how-to-render-measurement-results-svgtext-using-webgl-to-maintain-consistency-during-scene-transformations/15741)

<div class="topic-metadata">

**Author:** [@lanranlaura](https://discourse.vtk.org/u/lanranlaura)\
**Replies:** 4\
**Last updated:** [July 2, 2025, 1:05am UTC](https://discourse.vtk.org/t/how-to-render-measurement-results-svgtext-using-webgl-to-maintain-consistency-during-scene-transformations/15741 "2025-07-02T01:05:29Z")

</div>

Hi, When using measurement tools (e.g., vtkLineWidget), the SVG-based text labels don’t rotate/zoom with the 3D scene, causing visual inconsistency. Questions: Is there a recommended approach to render these labels u…

---

## [Text labels in vtk.js?](https://discourse.vtk.org/t/text-labels-in-vtk-js/9896)

<div class="topic-metadata">

**Author:** [@wayne-christopher-an](https://discourse.vtk.org/u/wayne-christopher-an)\
**Replies:** 4\
**Last updated:** [July 1, 2025, 1:17pm UTC](https://discourse.vtk.org/t/text-labels-in-vtk-js/9896 "2025-07-01T13:17:04Z")

</div>

I’m using vtk.js 25 and I’d like to place text at specific 3d positions. Are there examples of this available? From other recent questions it seems like the best way to do this is (1) create a vtkPixelSpaceCallbackMapp…

---

## [Successful rendering of QT & VTK WebAssembly](https://discourse.vtk.org/t/successful-rendering-of-qt-vtk-webassembly/11439)

<div class="topic-metadata">

**Author:** [@Miranda](https://discourse.vtk.org/u/Miranda)\
**Replies:** 19\
**Last updated:** [July 1, 2025, 12:14pm UTC](https://discourse.vtk.org/t/successful-rendering-of-qt-vtk-webassembly/11439 "2025-07-01T12:14:52Z")

</div>

I’ve successfully rendered QT/VTK WebAssembly. Qt version: 6.5 VTK version: 9.2.5 If you are interested, please DM me!!!

---

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

---

## [Question regarding Trame](https://discourse.vtk.org/t/question-regarding-trame/15609)

<div class="topic-metadata">

**Author:** [@sridhar-mani](https://discourse.vtk.org/u/sridhar-mani)\
**Replies:** 7\
**Last updated:** [June 11, 2025, 4:16pm UTC](https://discourse.vtk.org/t/question-regarding-trame/15609 "2025-06-11T16:16:43Z")

</div>

I want to know how to implement multi user , multi session protocol here. is it possible in this repo:GitHub - Kitware/vtk-web-solutions: Sample code showcasing VTK usage with Web

---

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

---

## [Rendering mesh](https://discourse.vtk.org/t/rendering-mesh/15566)

<div class="topic-metadata">

**Author:** [@OlumideSamuel](https://discourse.vtk.org/u/OlumideSamuel)\
**Replies:** 1\
**Last updated:** [May 20, 2025, 9:41am UTC](https://discourse.vtk.org/t/rendering-mesh/15566 "2025-05-20T09:41:24Z")

</div>

After an update of my node env to 22.14.0 and update of vtk.js to 26.8.0, and react-vtk-js to 1.18.0, my mesh crashes with the errors Uncaught TypeError: this.polydata is null, Uncaught TypeError: this.scalarBar is nul…

---

## [How to switch from normal mode to smooth mode?](https://discourse.vtk.org/t/how-to-switch-from-normal-mode-to-smooth-mode/15650)

<div class="topic-metadata">

**Author:** [@Bek1](https://discourse.vtk.org/u/Bek1)\
**Replies:** 9\
**Last updated:** [May 19, 2025, 5:09pm UTC](https://discourse.vtk.org/t/how-to-switch-from-normal-mode-to-smooth-mode/15650 "2025-05-19T17:09:02Z")

</div>

Hi. Here is minimal code: function Modal(props: { stlBuffer: ArrayBuffer }) { const vtkContext = useRef\<any\>({}); const vtkContainerRef = useRef(null); useEffect(() =\> { const fullScreenRenderer = vtkFullScr…

---

## [Unable to display an image slice using VTK.js from a VTI image file in React](https://discourse.vtk.org/t/unable-to-display-an-image-slice-using-vtk-js-from-a-vti-image-file-in-react/15620)

<div class="topic-metadata">

**Author:** [@ctroesch](https://discourse.vtk.org/u/ctroesch)\
**Replies:** 2\
**Last updated:** [May 19, 2025, 7:31am UTC](https://discourse.vtk.org/t/unable-to-display-an-image-slice-using-vtk-js-from-a-vti-image-file-in-react/15620 "2025-05-19T07:31:58Z")

</div>

Hi there, I am trying to load a VTI image file in my React/NextJS/VTK.js app, but I am struggling to display a simple slice of the image. I have added an actor to display the outline of the image that works well. This…

---

## [How to smooth STL blob?](https://discourse.vtk.org/t/how-to-smooth-stl-blob/15634)

<div class="topic-metadata">

**Author:** [@Bek1](https://discourse.vtk.org/u/Bek1)\
**Replies:** 5\
**Last updated:** [May 16, 2025, 11:20am UTC](https://discourse.vtk.org/t/how-to-smooth-stl-blob/15634 "2025-05-16T11:20:23Z")

</div>

Here is my code. It is almost identical to this example function StlModal(props: { ohifDicomSegBlob: any }) { const vtkContainer = useRef(null); async function getStl() { const stlRequest = await fetch('http://…

---

## [Mapping CPR image pixel coordinates back to world coordinates with vtkImageCPRMapper](https://discourse.vtk.org/t/mapping-cpr-image-pixel-coordinates-back-to-world-coordinates-with-vtkimagecprmapper/15627)

<div class="topic-metadata">

**Author:** [@buls\_brown](https://discourse.vtk.org/u/buls_brown)\
**Replies:** 1\
**Last updated:** [May 15, 2025, 2:29pm UTC](https://discourse.vtk.org/t/mapping-cpr-image-pixel-coordinates-back-to-world-coordinates-with-vtkimagecprmapper/15627 "2025-05-15T14:29:23Z")

</div>

Hi, I’m using vtkImageCPRMapper to generate a curved planar reformation (CPR) image from my 3D volume along a centerline polyline. Now I’d like to take a pixel coordinate (u,v) in the resulting CPR image and find the co…

---

## [How is the centerline orientation used by ImageCPRMapper calculated?](https://discourse.vtk.org/t/how-is-the-centerline-orientation-used-by-imagecprmapper-calculated/15628)

<div class="topic-metadata">

**Author:** [@d\_a](https://discourse.vtk.org/u/d_a)\
**Replies:** 0\
**Last updated:** [May 15, 2025, 11:05am UTC](https://discourse.vtk.org/t/how-is-the-centerline-orientation-used-by-imagecprmapper-calculated/15628 "2025-05-15T11:05:01Z")

</div>

How do I calculate the orientation in aorta\_centerline.json used in the ImageCPRMapper example? I saw in another question the matrix obtained by combining Normal, Tangent and Bitangent, but I don’t know how to calculate …

---

## [vtkPlaneSources as faces for vtkCubeSource](https://discourse.vtk.org/t/vtkplanesources-as-faces-for-vtkcubesource/15532)

<div class="topic-metadata">

**Author:** [@Alex\_Vergara](https://discourse.vtk.org/u/Alex_Vergara)\
**Replies:** 2\
**Last updated:** [April 25, 2025, 2:27pm UTC](https://discourse.vtk.org/t/vtkplanesources-as-faces-for-vtkcubesource/15532 "2025-04-25T14:27:11Z")

</div>

Hello I want to streamline a plane source in each of the faces of a cube source. The objective is to have a rectangular grid which I can use to paint some scalars. I need control on the resolution, but in theory each ax…

---

## [How the Orientations of the ImageCPRMapper example are calculated?](https://discourse.vtk.org/t/how-the-orientations-of-the-imagecprmapper-example-are-calculated/15279)

<div class="topic-metadata">

**Author:** [@The-Fool-Coding](https://discourse.vtk.org/u/The-Fool-Coding)\
**Replies:** 5\
**Last updated:** [April 21, 2025, 3:59am UTC](https://discourse.vtk.org/t/how-the-orientations-of-the-imagecprmapper-example-are-calculated/15279 "2025-04-21T03:59:14Z")

</div>

I wish to known how can i insted of using the pre computaded ones from the json , how can i programmatically create them

---

## [Issues with Lighting and Clipping in Multi-Renderer VTK.js Setup](https://discourse.vtk.org/t/issues-with-lighting-and-clipping-in-multi-renderer-vtk-js-setup/15495)

<div class="topic-metadata">

**Author:** [@GMrrc](https://discourse.vtk.org/u/GMrrc)\
**Replies:** 4\
**Last updated:** [April 18, 2025, 12:47pm UTC](https://discourse.vtk.org/t/issues-with-lighting-and-clipping-in-multi-renderer-vtk-js-setup/15495 "2025-04-18T12:47:40Z")

</div>

Hello, Recently I tried using multiple renderers within the same renderWindow: one for displaying a volume in the background and another for displaying polydata elements in the foreground. However, I encountered some is…

---

## [VTK.js ImageData Rendering with react](https://discourse.vtk.org/t/vtk-js-imagedata-rendering-with-react/15463)

<div class="topic-metadata">

**Author:** [@psb01126](https://discourse.vtk.org/u/psb01126)\
**Replies:** 1\
**Last updated:** [April 7, 2025, 7:40pm UTC](https://discourse.vtk.org/t/vtk-js-imagedata-rendering-with-react/15463 "2025-04-07T19:40:13Z")

</div>

Hello, I’m trying to develop a website using Python and react. However, there is a problem that image data is generated normally, but rendering is not possible. When I tested it with the conesource on the vtk homepage,…

---

## [the mapping between the scalar values and the color representation is not occurring.](https://discourse.vtk.org/t/the-mapping-between-the-scalar-values-and-the-color-representation-is-not-occurring/15443)

<div class="topic-metadata">

**Author:** [@Harikrushnadodiya](https://discourse.vtk.org/u/Harikrushnadodiya)\
**Replies:** 1\
**Last updated:** [March 30, 2025, 9:35am UTC](https://discourse.vtk.org/t/the-mapping-between-the-scalar-values-and-the-color-representation-is-not-occurring/15443 "2025-03-30T09:35:23Z")

</div>

I am new to this library. I have .vtp file containing more than one scalar fields. Additionally, the code visualizes a 3D file, and the scalar bar updates based on the .vtp file’s scalar values. It is working fine. Prob…

---

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

---

## [Container dimension/size requirements for RemoteView](https://discourse.vtk.org/t/container-dimension-size-requirements-for-remoteview/15354)

<div class="topic-metadata">

**Author:** [@DevinAPorro](https://discourse.vtk.org/u/DevinAPorro)\
**Replies:** 3\
**Last updated:** [March 13, 2025, 12:00am UTC](https://discourse.vtk.org/t/container-dimension-size-requirements-for-remoteview/15354 "2025-03-13T00:00:00Z")

</div>

I swear I remember reading somewhere that the container element for vtkRemoteView required absolute (px) values for the width and height (e.g. the DOM element passed to the RemoteView.setContainer method)…but now I can’t…

---

## [3D does not match when overlaying with DICOM image](https://discourse.vtk.org/t/3d-does-not-match-when-overlaying-with-dicom-image/15327)

<div class="topic-metadata">

**Author:** [@Javi-r](https://discourse.vtk.org/u/Javi-r)\
**Replies:** 6\
**Last updated:** [March 11, 2025, 10:56am UTC](https://discourse.vtk.org/t/3d-does-not-match-when-overlaying-with-dicom-image/15327 "2025-03-11T10:56:57Z")

</div>

Hello I have this problem with this DICOM, but it doesn’t happen with others. I load the dicom with 3D Slicer and segment a vertebra. In 3d Slicer the overlay is well positioned. I convert dicom to .vtkjs with a m…

---

## [Shell creation for solid using thickness and cell dimension](https://discourse.vtk.org/t/shell-creation-for-solid-using-thickness-and-cell-dimension/15360)

<div class="topic-metadata">

**Author:** [@Adharsh](https://discourse.vtk.org/u/Adharsh)\
**Replies:** 1\
**Last updated:** [March 10, 2025, 12:52pm UTC](https://discourse.vtk.org/t/shell-creation-for-solid-using-thickness-and-cell-dimension/15360 "2025-03-10T12:52:29Z")

</div>

Here, i’m looking for shell creation for solid or geometry by passing thickness and dimension of cell as parameter and i need an hollow shell only. is there any possibilites to acheive this in vtk.js or in some other li…

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

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