# \#code

**URL:** https://discourse.vtk.org/tag/code/7.md

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

---

## [vtkXOpenGLRenderWindow::DestroyWindow() can deadlock when Finalize() runs from QVTKRenderWindowInteractor.closeEvent()](https://discourse.vtk.org/t/vtkxopenglrenderwindow-destroywindow-can-deadlock-when-finalize-runs-from-qvtkrenderwindowinteractor-closeevent/16515)

<div class="topic-metadata">

**Author:** [@DungTruog](https://discourse.vtk.org/u/DungTruog)\
**Replies:** 1\
**Last updated:** [September 17, 2026, 6:52pm UTC](https://discourse.vtk.org/t/vtkxopenglrenderwindow-destroywindow-can-deadlock-when-finalize-runs-from-qvtkrenderwindowinteractor-closeevent/16515 "2026-09-17T18:52:37Z")

</div>

We meet an intermittent SIGSEGV on closing a Qt window that embeds \`QVTKRenderWindowInteractor\`. Confirmed via a core-dump backtrace and by reading \`vtkXOpenGLRenderWindow\`: the vendored interactor only finalizes its ren…

---

## [Line elements cause missing edges in triangle cells](https://discourse.vtk.org/t/line-elements-cause-missing-edges-in-triangle-cells/16521)

<div class="topic-metadata">

**Author:** [@raungst](https://discourse.vtk.org/u/raungst)\
**Replies:** 5\
**Last updated:** [September 4, 2026, 7:54pm UTC](https://discourse.vtk.org/t/line-elements-cause-missing-edges-in-triangle-cells/16521 "2026-09-04T19:54:53Z")

</div>

This started in VTK 9.6, but is present in 9.7 as well. I’m not sure how pervasive it is, but if I have an unstructured grid with only triangles and lines, the triangles don’t have edges shown. If I don’t have the lines,…

---

## [Build error C4996 in vtkUnstructuredGrid.h after Visual Studio update (VTK 9.6)](https://discourse.vtk.org/t/build-error-c4996-in-vtkunstructuredgrid-h-after-visual-studio-update-vtk-9-6/16470)

<div class="topic-metadata">

**Author:** [@CharInt0](https://discourse.vtk.org/u/CharInt0)\
**Replies:** 13\
**Last updated:** [June 24, 2026, 5:34pm UTC](https://discourse.vtk.org/t/build-error-c4996-in-vtkunstructuredgrid-h-after-visual-studio-update-vtk-9-6/16470 "2026-06-24T17:34:43Z")

</div>

OS: Windows 11 VTK Version: 9.6 Compiler: Visual Studio Professional 2026 (v18.7.1) Hi everyone, Since updating Visual Studio to the latest version, my C++ project using VTK 9.6 has stopped compiling. I am encounteri…

---

## [vtkPointGaussianMapper with Shader replacement](https://discourse.vtk.org/t/vtkpointgaussianmapper-with-shader-replacement/16438)

<div class="topic-metadata">

**Author:** [@Sandipan](https://discourse.vtk.org/u/Sandipan)\
**Replies:** 1\
**Last updated:** [May 28, 2026, 8:31am UTC](https://discourse.vtk.org/t/vtkpointgaussianmapper-with-shader-replacement/16438 "2026-05-28T08:31:39Z")

</div>

am using ActiViz / VTK 9.5 in a .NET desktop application for large point-cloud visualization. I am trying to implement fast class visibility toggling for LAS-style classification data. Current data model: vtkPolyData …

---

## [UnstructuredGrid Filter extracts too many cells](https://discourse.vtk.org/t/unstructuredgrid-filter-extracts-too-many-cells/16433)

<div class="topic-metadata">

**Author:** [@magicmangoman](https://discourse.vtk.org/u/magicmangoman)\
**Replies:** 2\
**Last updated:** [May 27, 2026, 6:28am UTC](https://discourse.vtk.org/t/unstructuredgrid-filter-extracts-too-many-cells/16433 "2026-05-27T06:28:12Z")

</div>

Extracted surface of Bipyramid has too many cells In the documentation of vtkUnstructuredGridGeometryFilter it is stated that this filter provides the following functionality: Geometry is obtained as follows: all 0D, 1…

---

## [Differentiable rendering module with PyTorch integration for VTK](https://discourse.vtk.org/t/differentiable-rendering-module-with-pytorch-integration-for-vtk/16401)

<div class="topic-metadata">

**Author:** [@Juan\_C\_Prieto](https://discourse.vtk.org/u/Juan_C_Prieto)\
**Replies:** 3\
**Last updated:** [May 26, 2026, 3:31pm UTC](https://discourse.vtk.org/t/differentiable-rendering-module-with-pytorch-integration-for-vtk/16401 "2026-05-26T15:31:26Z")

</div>

Summary I would like to propose the addition of a differentiable rendering module to VTK — tentatively VTK::RenderingDifferentiable — that exposes gradients through VTK’s rendering pipeline and bridges them to PyTorch’s …

---

## [VTK hackathon on May 13, 2026](https://discourse.vtk.org/t/vtk-hackathon-on-may-13-2026/16407)

<div class="topic-metadata">

**Author:** [@sankhesh](https://discourse.vtk.org/u/sankhesh)\
**Replies:** 4\
**Last updated:** [May 14, 2026, 4:01pm UTC](https://discourse.vtk.org/t/vtk-hackathon-on-may-13-2026/16407 "2026-05-14T16:01:49Z")

</div>

Hello VTK devs, You’re invited to a VTK Hackathon on May 13, 2026, from 9:00 am to 4:00 pm EDT! We’ll be getting together to tackle some long‑standing items, share ideas, and have some fun while improving VTK. Our main…

---

## [How to display labels on multiple line cells](https://discourse.vtk.org/t/how-to-display-labels-on-multiple-line-cells/16397)

<div class="topic-metadata">

**Author:** [@Rudyanto\_Herlambang](https://discourse.vtk.org/u/Rudyanto_Herlambang)\
**Replies:** 1\
**Last updated:** [May 2, 2026, 10:23pm UTC](https://discourse.vtk.org/t/how-to-display-labels-on-multiple-line-cells/16397 "2026-05-02T22:23:48Z")

</div>

I’m currently switching from GDI/GDI+ to VTK but a lot of things still confuse me. I am trying hard to display labels on multiple line cells according to their orientation, as shown in the image below. Since the line di…

---

## [QVTKNativeWidget: Jagged edges on 2D images](https://discourse.vtk.org/t/qvtknativewidget-jagged-edges-on-2d-images/16188)

<div class="topic-metadata">

**Author:** [@Manjunath\_AV](https://discourse.vtk.org/u/Manjunath_AV)\
**Replies:** 15\
**Last updated:** [April 11, 2026, 4:42pm UTC](https://discourse.vtk.org/t/qvtknativewidget-jagged-edges-on-2d-images/16188 "2026-04-11T16:42:00Z")

</div>

Hi all, I’m displaying 2D images using QVTKNativeWidget and I’m seeing zigzag/jagged edges along high-contrast boundaries. I’ve attached two screenshots: Current issue: edges look stair-stepped/pixelated Desi…

---

## [How to measure 3D rotation smoothness / speed of a vtk 9.3.0 image embedded in a qt 6 application](https://discourse.vtk.org/t/how-to-measure-3d-rotation-smoothness-speed-of-a-vtk-9-3-0-image-embedded-in-a-qt-6-application/16372)

<div class="topic-metadata">

**Author:** [@ataban](https://discourse.vtk.org/u/ataban)\
**Replies:** 1\
**Last updated:** [April 10, 2026, 1:55pm UTC](https://discourse.vtk.org/t/how-to-measure-3d-rotation-smoothness-speed-of-a-vtk-9-3-0-image-embedded-in-a-qt-6-application/16372 "2026-04-10T13:55:15Z")

</div>

How to measure 3D rotation smoothness / speed of a vtk 9.3.0 image embedded in a qt 6 application with tools like FRAPS. Currently tools like FRAPS and nvidea control panel are working only on laptops for fps display b…

---

## [Apply scalar in vtkDijkstraGraphGeodesicPath function](https://discourse.vtk.org/t/apply-scalar-in-vtkdijkstragraphgeodesicpath-function/16374)

<div class="topic-metadata">

**Author:** [@joo94372](https://discourse.vtk.org/u/joo94372)\
**Replies:** 0\
**Last updated:** [April 7, 2026, 10:38am UTC](https://discourse.vtk.org/t/apply-scalar-in-vtkdijkstragraphgeodesicpath-function/16374 "2026-04-07T10:38:00Z")

</div>

Hello. I’m using it well to find a distance-based path for the vtkDijkstraGraphGeodesicPath function. But I want to find a path that moves close based on the desired curvature value. The VTK: vtkDijkstraGraphGeodesicPa…

---

## [How to enable USD IO module build?](https://discourse.vtk.org/t/how-to-enable-usd-io-module-build/16368)

<div class="topic-metadata">

**Author:** [@Nicholas\_Yue](https://discourse.vtk.org/u/Nicholas_Yue)\
**Replies:** 3\
**Last updated:** [April 2, 2026, 10:01pm UTC](https://discourse.vtk.org/t/how-to-enable-usd-io-module-build/16368 "2026-04-02T22:01:23Z")

</div>

I saw a message regarding USD and thought I’d give it a go. I downloaded 9.6.1, run the cmake config (no special flags) I noticed that in the build directory, USD is not configured for building. I tried grep’ping USD …

---

## [Moving data from VTK to ITK: issue in memory management](https://discourse.vtk.org/t/moving-data-from-vtk-to-itk-issue-in-memory-management/16363)

<div class="topic-metadata">

**Author:** [@Boris38](https://discourse.vtk.org/u/Boris38)\
**Replies:** 2\
**Last updated:** [March 30, 2026, 1:56pm UTC](https://discourse.vtk.org/t/moving-data-from-vtk-to-itk-issue-in-memory-management/16363 "2026-03-30T13:56:31Z")

</div>

Hello everyone. I use ITK (5.4.4) and VTK (9.5.2) in my code. I use some VTK classes (like vtkImageStencil) which use some mesh (vtkPolyData) and i want the result in an ITK image. To convert result of the vtkImageSte…

---

## [Volume for QuadHexahedrons incorrect](https://discourse.vtk.org/t/volume-for-quadhexahedrons-incorrect/16358)

<div class="topic-metadata">

**Author:** [@magicmangoman](https://discourse.vtk.org/u/magicmangoman)\
**Replies:** 0\
**Last updated:** [March 25, 2026, 2:42pm UTC](https://discourse.vtk.org/t/volume-for-quadhexahedrons-incorrect/16358 "2026-03-25T14:42:12Z")

</div>

Incorrect Volume for QuadraticHexahedron ?! Hi, it appears that vtk gives out an incorrect volume for QuadraticHexahedrons, i.e. for the Cell defined in vtkQuadraticHexahedron.h. This is verified by the failure of the f…

---

## [Improving Interaction and LOD Performance in vtkSmartVolumeMapper for Large Datasets](https://discourse.vtk.org/t/improving-interaction-and-lod-performance-in-vtksmartvolumemapper-for-large-datasets/16348)

<div class="topic-metadata">

**Author:** [@Manjunath\_AV](https://discourse.vtk.org/u/Manjunath_AV)\
**Replies:** 5\
**Last updated:** [March 25, 2026, 1:14pm UTC](https://discourse.vtk.org/t/improving-interaction-and-lod-performance-in-vtksmartvolumemapper-for-large-datasets/16348 "2026-03-25T13:14:46Z")

</div>

I’m experiencing performance issues with vtkSmartVolumeMapper when loading around 2000 slices, even on a high‑end GPU like the NVIDIA RTX 4000 Ada. During interaction, the mapper takes noticeable time to reduce the LOD (…

---

## [Potential bug in vtkInformationVector::Remove()](https://discourse.vtk.org/t/potential-bug-in-vtkinformationvector-remove/16353)

<div class="topic-metadata">

**Author:** [@sunjnn](https://discourse.vtk.org/u/sunjnn)\
**Replies:** 1\
**Last updated:** [March 24, 2026, 10:56am UTC](https://discourse.vtk.org/t/potential-bug-in-vtkinformationvector-remove/16353 "2026-03-24T10:56:09Z")

</div>

There appears to be a logic issue in vtkInformationVector::Remove() that causes incorrect behavior when removing information objects from the vector, particularly when the same object appears multiple times. The current…

---

## [vtkSmartVolumeMapper GPU path → OpenGL error 1280 (Invalid enum) in vtkOpenGLProperty after first Render](https://discourse.vtk.org/t/vtksmartvolumemapper-gpu-path-opengl-error-1280-invalid-enum-in-vtkopenglproperty-after-first-render/16349)

<div class="topic-metadata">

**Author:** [@Manjunath\_AV](https://discourse.vtk.org/u/Manjunath_AV)\
**Replies:** 0\
**Last updated:** [March 21, 2026, 5:45pm UTC](https://discourse.vtk.org/t/vtksmartvolumemapper-gpu-path-opengl-error-1280-invalid-enum-in-vtkopenglproperty-after-first-render/16349 "2026-03-21T17:45:51Z")

</div>

I’m seeing an OpenGL error when trying to render a volume with vtkSmartVolumeMapper (GPU mapper). The first render triggers: ERR: vtkLogForwarder.cpp(13): ERROR: In vtkOpenGLProperty.cxx, line 59 vtkOpenGLProperty (0x00…

---

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

---

## [Java Wrapper memory management](https://discourse.vtk.org/t/java-wrapper-memory-management/16312)

<div class="topic-metadata">

**Author:** [@Haddy](https://discourse.vtk.org/u/Haddy)\
**Replies:** 2\
**Last updated:** [March 5, 2026, 3:06am UTC](https://discourse.vtk.org/t/java-wrapper-memory-management/16312 "2026-03-05T03:06:11Z")

</div>

I have a question about using vtk inside Java. Is it neccessary to call Delete() on something like a vtkImageData object, or is the memory safely released when it falls out of Scope or is set to null?

---

## [Dental models orientation](https://discourse.vtk.org/t/dental-models-orientation/16311)

<div class="topic-metadata">

**Author:** [@bassfaye](https://discourse.vtk.org/u/bassfaye)\
**Replies:** 4\
**Last updated:** [March 4, 2026, 4:18pm UTC](https://discourse.vtk.org/t/dental-models-orientation/16311 "2026-03-04T16:18:05Z")

</div>

I have two dental models (upper and lower model). They are randomly oriented (see image 1). I want to orient dental models like image 2 (Y axis to anterior teeth face a consistent direction, Z axis to occlusal). How can …

---

## [How to properly override GetFiniteValue in our vtkGenericDataArray\<Derived, T\> class](https://discourse.vtk.org/t/how-to-properly-override-getfinitevalue-in-our-vtkgenericdataarray-derived-t-class/16283)

<div class="topic-metadata">

**Author:** [@Michael\_Jackson](https://discourse.vtk.org/u/Michael_Jackson)\
**Replies:** 9\
**Last updated:** [February 25, 2026, 7:48pm UTC](https://discourse.vtk.org/t/how-to-properly-override-getfinitevalue-in-our-vtkgenericdataarray-derived-t-class/16283 "2026-02-25T19:48:32Z")

</div>

In our application we have implemented a wrapper class using the vtkGenericDataArray\<DerivedType, T\> class. Our class is called CV::Array. Generally things are working fine but as I start to profile our code to see what …

---

## [Vtk 9.6 and qtquick support](https://discourse.vtk.org/t/vtk-9-6-and-qtquick-support/16302)

<div class="topic-metadata">

**Author:** [@cadons](https://discourse.vtk.org/u/cadons)\
**Replies:** 1\
**Last updated:** [February 24, 2026, 8:50am UTC](https://discourse.vtk.org/t/vtk-9-6-and-qtquick-support/16302 "2026-02-24T08:50:01Z")

</div>

Hi everyone, I’m working on the vcpkg port for VTK 9.6. I have built the library successfully, but I noticed that this new version no longer generates the qml folder. After checking the source code, I found that it was…

---

## [Slow Oblique Slicing and Scrolling with \>2k Slices Using vtkOpenGLImageSliceMapper](https://discourse.vtk.org/t/slow-oblique-slicing-and-scrolling-with-2k-slices-using-vtkopenglimageslicemapper/16288)

<div class="topic-metadata">

**Author:** [@Manjunath\_AV](https://discourse.vtk.org/u/Manjunath_AV)\
**Replies:** 10\
**Last updated:** [February 21, 2026, 6:01pm UTC](https://discourse.vtk.org/t/slow-oblique-slicing-and-scrolling-with-2k-slices-using-vtkopenglimageslicemapper/16288 "2026-02-21T18:01:39Z")

</div>

I’m using vtkOpenGLImageSliceMapper to render more than 2000 image slices. When performing oblique slice operations in 2D or scrolling through slices, the interaction becomes noticeably slow. Are there recommended ways t…

---

## [QVTK widget is showing slowness in performance when built with vtk 9.3.0 and interacted through mouse/touch/gesture](https://discourse.vtk.org/t/qvtk-widget-is-showing-slowness-in-performance-when-built-with-vtk-9-3-0-and-interacted-through-mouse-touch-gesture/16228)

<div class="topic-metadata">

**Author:** [@ataban](https://discourse.vtk.org/u/ataban)\
**Replies:** 3\
**Last updated:** [February 16, 2026, 2:24pm UTC](https://discourse.vtk.org/t/qvtk-widget-is-showing-slowness-in-performance-when-built-with-vtk-9-3-0-and-interacted-through-mouse-touch-gesture/16228 "2026-02-16T14:24:01Z")

</div>

VTK 5 version shows a very smooth version of mouse move operations of qvtk widgets containing vtk images including large image slices including in 3D mode. In comparison vtk 9.3 shows comparatively slow performance of t…

---

## [vtk python doesn't support get key PgUp/PgDn](https://discourse.vtk.org/t/vtk-python-doesnt-support-get-key-pgup-pgdn/16284)

<div class="topic-metadata">

**Author:** [@Nam\_Le\_Hoang](https://discourse.vtk.org/u/Nam_Le_Hoang)\
**Replies:** 2\
**Last updated:** [February 12, 2026, 6:38am UTC](https://discourse.vtk.org/t/vtk-python-doesnt-support-get-key-pgup-pgdn/16284 "2026-02-12T06:38:05Z")

</div>

Hi, I’m using \`vtk==9.5.0\` with python in PySide2. Below is my simple script that I try to catch user key press and do works. But when I type PgUp PgDn the GetKeySym return None . Just wanna know if vtk doesn’t support i…

---

## [VTK Multi Touch Support](https://discourse.vtk.org/t/vtk-multi-touch-support/16285)

<div class="topic-metadata">

**Author:** [@Arya](https://discourse.vtk.org/u/Arya)\
**Replies:** 0\
**Last updated:** [February 11, 2026, 5:11pm UTC](https://discourse.vtk.org/t/vtk-multi-touch-support/16285 "2026-02-11T17:11:39Z")

</div>

Hi fellow devs, I am trying to implement touch support for my existing vtk environment with the help of VTK: vtkInteractorStyleMultiTouchCamera Class Reference. I am on version 9.3 of VTK. So far all it does is rotate t…

---

## [VTK json](https://discourse.vtk.org/t/vtk-json/16282)

<div class="topic-metadata">

**Author:** [@Francois\_Merle](https://discourse.vtk.org/u/Francois_Merle)\
**Replies:** 2\
**Last updated:** [February 11, 2026, 10:37am UTC](https://discourse.vtk.org/t/vtk-json/16282 "2026-02-11T10:37:00Z")

</div>

Hello, I am using VTK together with the Drogon C++ web framework. Drogon depends on the system jsoncpp library, while VTK ships its own vendored copy of jsoncpp under vtkjsoncpp (namespace vtkJson). When both librari…

---

## [Slow Rendering of large 2D Image on MacOS, but not Linux or Windows](https://discourse.vtk.org/t/slow-rendering-of-large-2d-image-on-macos-but-not-linux-or-windows/16277)

<div class="topic-metadata">

**Author:** [@Michael\_Jackson](https://discourse.vtk.org/u/Michael_Jackson)\
**Replies:** 6\
**Last updated:** [February 9, 2026, 10:00pm UTC](https://discourse.vtk.org/t/slow-rendering-of-large-2d-image-on-macos-but-not-linux-or-windows/16277 "2026-02-09T22:00:08Z")

</div>

Hello, We have an existing application that uses VTK 9.5.2 for our 3D visualization. We have noticed that when we load large 2D images (23,500 x 23,500 pixels) that the interaction rendering speed on MacOS is about 3~4 …

---

## [only depending on vtk, use vtkmfcwindow，and setparent(HWND hwnd),crash when close](https://discourse.vtk.org/t/only-depending-on-vtk-use-vtkmfcwindow-and-setparent-hwnd-hwnd-crash-when-close/16261)

<div class="topic-metadata">

**Author:** [@sophia](https://discourse.vtk.org/u/sophia)\
**Replies:** 0\
**Last updated:** [January 30, 2026, 12:22pm UTC](https://discourse.vtk.org/t/only-depending-on-vtk-use-vtkmfcwindow-and-setparent-hwnd-hwnd-crash-when-close/16261 "2026-01-30T12:22:19Z")

</div>

the stack is below: image1040×819 63.3 KB

---

## [only depending on vtk, no code to call vtk，crash when close](https://discourse.vtk.org/t/only-depending-on-vtk-no-code-to-call-vtk-crash-when-close/16064)

<div class="topic-metadata">

**Author:** [@sophia](https://discourse.vtk.org/u/sophia)\
**Replies:** 5\
**Last updated:** [January 29, 2026, 7:02am UTC](https://discourse.vtk.org/t/only-depending-on-vtk-no-code-to-call-vtk-crash-when-close/16064 "2026-01-29T07:02:49Z")

</div>

A mfc application use one dll, the dll depend vtk。Free library when close the app, crash in the vtk code “ delete key;“ void vtkCommonInformationKeyManager::ClassFinalize() { … delete key; … } how to reslove the…

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