# Support

**URL:** https://discourse.vtk.org/c/support/6.md?page=57

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

**Page:** 58

---

## [VTK module import error](https://discourse.vtk.org/t/vtk-module-import-error/10274)

<div class="topic-metadata">

**Author:** [@Deepa](https://discourse.vtk.org/u/Deepa)\
**Replies:** 9\
**Last updated:** [January 21, 2023, 2:52am UTC](https://discourse.vtk.org/t/vtk-module-import-error/10274 "2023-01-21T02:52:20Z")

</div>

Hi All, I am trying to run the following example (K3D-jupyter/volume\_renderer.ipynb at 3fef1ea419a84a51c8aed56cb285b9fcf0a18c9a · K3D-tools/K3D-jupyter · GitHub) in jupyter notebook. import k3d import math import numpy…

---

## [how to use vtkGradientFilter to get the gradient of each point in an unstructured grid in codes](https://discourse.vtk.org/t/how-to-use-vtkgradientfilter-to-get-the-gradient-of-each-point-in-an-unstructured-grid-in-codes/10514)

<div class="topic-metadata">

**Author:** [@FanWang10](https://discourse.vtk.org/u/FanWang10)\
**Replies:** 0\
**Last updated:** [January 20, 2023, 9:40pm UTC](https://discourse.vtk.org/t/how-to-use-vtkgradientfilter-to-get-the-gradient-of-each-point-in-an-unstructured-grid-in-codes/10514 "2023-01-20T21:40:22Z")

</div>

Hello, I am trying to use vtkGradientFilter to calculate the gradient at each point. However I didn’t find an example that fits my need. What I have is a .vtu file. It is an unstructured grid with 5 triangle cells. Wha…

---

## [Recolour outerline/border](https://discourse.vtk.org/t/recolour-outerline-border/10479)

<div class="topic-metadata">

**Author:** [@isuruwi](https://discourse.vtk.org/u/isuruwi)\
**Replies:** 2\
**Last updated:** [January 20, 2023, 8:30pm UTC](https://discourse.vtk.org/t/recolour-outerline-border/10479 "2023-01-20T20:30:10Z")

</div>

Using vtk, I overlaid a mesh on a CT slice, as shown in the image below. However, I noticed a red edge appear in the vtkImagePlaneWidget’s outer line. I tried to fix it by changing the colour to white, but it didn’t work…

---

## [From vtkRenderWindow to OpenCV Mat using python](https://discourse.vtk.org/t/from-vtkrenderwindow-to-opencv-mat-using-python/10508)

<div class="topic-metadata">

**Author:** [@TartaPise](https://discourse.vtk.org/u/TartaPise)\
**Replies:** 1\
**Last updated:** [January 20, 2023, 2:37pm UTC](https://discourse.vtk.org/t/from-vtkrenderwindow-to-opencv-mat-using-python/10508 "2023-01-20T14:37:12Z")

</div>

Hi guys, I’ve tried many different ways to transform a vtkRenderWindow into an OpenCV Mat but I could get it and the python wrap documentation is not very solid (or am I missing some websites?). Do you know how could I …

---

## [Checking for contours of zero size](https://discourse.vtk.org/t/checking-for-contours-of-zero-size/10491)

<div class="topic-metadata">

**Author:** [@BlueKnight7](https://discourse.vtk.org/u/BlueKnight7)\
**Replies:** 2\
**Last updated:** [January 19, 2023, 9:41pm UTC](https://discourse.vtk.org/t/checking-for-contours-of-zero-size/10491 "2023-01-19T21:41:47Z")

</div>

This is a follow on off vtkContourGrid example - #7 by BlueKnight7 and requires a little background detail first. I’ve setup my code to have multiple mesh objects using vtkUnstructuredGrid’s. I want to be able to crea…

---

## [Minimal VTK build with new module system](https://discourse.vtk.org/t/minimal-vtk-build-with-new-module-system/2813)

<div class="topic-metadata">

**Author:** [@biagas](https://discourse.vtk.org/u/biagas)\
**Replies:** 29\
**Last updated:** [January 19, 2023, 8:45pm UTC](https://discourse.vtk.org/t/minimal-vtk-build-with-new-module-system/2813 "2023-01-19T20:45:02Z")

</div>

With vtk-8.1, Disabling groups and enabling only those modules needed was pretty straightforward to get only the desired pieces of vtk. Dependent modules of those requested were automagically also enabled. I downloaded …

---

## [vtk-9.2.5 python wrapper vtkProp3DCollection.GetNextProp3D() return null](https://discourse.vtk.org/t/vtk-9-2-5-python-wrapper-vtkprop3dcollection-getnextprop3d-return-null/10504)

<div class="topic-metadata">

**Author:** [@TartaPise](https://discourse.vtk.org/u/TartaPise)\
**Replies:** 5\
**Last updated:** [January 19, 2023, 4:52pm UTC](https://discourse.vtk.org/t/vtk-9-2-5-python-wrapper-vtkprop3dcollection-getnextprop3d-return-null/10504 "2023-01-19T16:52:57Z")

</div>

Hello everyone, I’m new to the Forum, please treat me well and let me know if I do something wrong. I’m having issues writing a simple python function to save the centers of the actors in a vtkassembly. Here is the fun…

---

## [vtkTextActor (0x26049358): Failed getting the TextRenderer instance!](https://discourse.vtk.org/t/vtktextactor-0x26049358-failed-getting-the-textrenderer-instance/1931)

<div class="topic-metadata">

**Author:** [@KeyboardMan](https://discourse.vtk.org/u/KeyboardMan)\
**Replies:** 6\
**Last updated:** [January 19, 2023, 6:47am UTC](https://discourse.vtk.org/t/vtktextactor-0x26049358-failed-getting-the-textrenderer-instance/1931 "2023-01-19T06:47:30Z")

</div>

---

## [vtkvoroni2d doesn't work probably](https://discourse.vtk.org/t/vtkvoroni2d-doesnt-work-probably/10478)

<div class="topic-metadata">

**Author:** [@AndreAhmed](https://discourse.vtk.org/u/AndreAhmed)\
**Replies:** 8\
**Last updated:** [January 18, 2023, 11:42am UTC](https://discourse.vtk.org/t/vtkvoroni2d-doesnt-work-probably/10478 "2023-01-18T11:42:33Z")

</div>

I’m trying to generate a grid of voroni2D, here is the code, and the output, is really weird int i = 0; while (i \< 1000) { float pt\_x = rand\_FloatRange(0, 1); float pt\_y = rand\_FloatRange(0, 1); points\_voron…

---

## [how to create a 3d surface and display it in vtk](https://discourse.vtk.org/t/how-to-create-a-3d-surface-and-display-it-in-vtk/10461)

<div class="topic-metadata">

**Author:** [@we\_create](https://discourse.vtk.org/u/we_create)\
**Replies:** 1\
**Last updated:** [January 17, 2023, 5:24pm UTC](https://discourse.vtk.org/t/how-to-create-a-3d-surface-and-display-it-in-vtk/10461 "2023-01-17T17:24:40Z")

</div>

Right now I have 3 curves and what I what is to make a surface from this curves.Is there any way to do this (any predifined class or filter).If so can anybody plz guide me.

---

## [vtkRenderWindow Render method on server](https://discourse.vtk.org/t/vtkrenderwindow-render-method-on-server/10440)

<div class="topic-metadata">

**Author:** [@RAUMIK\_RANA](https://discourse.vtk.org/u/RAUMIK_RANA)\
**Replies:** 4\
**Last updated:** [January 17, 2023, 4:22am UTC](https://discourse.vtk.org/t/vtkrenderwindow-render-method-on-server/10440 "2023-01-17T04:22:44Z")

</div>

vtkRenderWindow Render method on Linux server not working getting below error vtkXOpenGLRenderWindow.:464 ERR| vtkXOpenGLRenderWindow (0x55edd2d73ce0): bad X server connection. DISPLAY=

---

## [How to add Dates to X-Axis of Line Plot](https://discourse.vtk.org/t/how-to-add-dates-to-x-axis-of-line-plot/10466)

<div class="topic-metadata">

**Author:** [@DavidA](https://discourse.vtk.org/u/DavidA)\
**Replies:** 0\
**Last updated:** [January 16, 2023, 10:51am UTC](https://discourse.vtk.org/t/how-to-add-dates-to-x-axis-of-line-plot/10466 "2023-01-16T10:51:53Z")

</div>

I followed the examples provided on the vtk.org website and am able to create line plots, scatter plots, etc. but so far I have only been able to have a running number along the X-Axis. I would like to change the running…

---

## [how to create a polydata when points(x,y,z) are given.](https://discourse.vtk.org/t/how-to-create-a-polydata-when-points-x-y-z-are-given/10387)

<div class="topic-metadata">

**Author:** [@we\_create](https://discourse.vtk.org/u/we_create)\
**Replies:** 5\
**Last updated:** [January 16, 2023, 8:31am UTC](https://discourse.vtk.org/t/how-to-create-a-polydata-when-points-x-y-z-are-given/10387 "2023-01-16T08:31:59Z")

</div>

Hi all, can anybody guide me with creating a poly data when x,y,z. I have the points in a text format.Do we have predifined class and if there is any can anybody guide me with creating the polydata(a 3d view) with poin…

---

## [using CellPicker with Trame "Surface Picking" example](https://discourse.vtk.org/t/using-cellpicker-with-trame-surface-picking-example/10404)

<div class="topic-metadata">

**Author:** [@Robert\_Collar](https://discourse.vtk.org/u/Robert_Collar)\
**Replies:** 4\
**Last updated:** [January 16, 2023, 1:29am UTC](https://discourse.vtk.org/t/using-cellpicker-with-trame-surface-picking-example/10404 "2023-01-16T01:29:04Z")

</div>

Hi VTK Community! In the “Surface Picking” Trame example, found here, a user can “pick” locations on the screen and the closest point in the racecar mesh is selected and indicated with a cone pointer + tooltip. As far a…

---

## [How to highlight a smooth region on a polygonal mesh](https://discourse.vtk.org/t/how-to-highlight-a-smooth-region-on-a-polygonal-mesh/1813)

<div class="topic-metadata">

**Author:** [@eustache](https://discourse.vtk.org/u/eustache)\
**Replies:** 9\
**Last updated:** [January 15, 2023, 8:47pm UTC](https://discourse.vtk.org/t/how-to-highlight-a-smooth-region-on-a-polygonal-mesh/1813 "2023-01-15T20:47:25Z")

</div>

The goal is to highlight a smooth region on a polygonal mesh. I am investigating two different techniques: select cells on the surface of the mesh itself and apply some texture on them, but then I can’t have smooth bor…

---

## [How to make a poly data more dense?](https://discourse.vtk.org/t/how-to-make-a-poly-data-more-dense/10459)

<div class="topic-metadata">

**Author:** [@zhang-qiang-github](https://discourse.vtk.org/u/zhang-qiang-github)\
**Replies:** 3\
**Last updated:** [January 15, 2023, 4:31pm UTC](https://discourse.vtk.org/t/how-to-make-a-poly-data-more-dense/10459 "2023-01-15T16:31:55Z")

</div>

For example, I have a poly data: How can I make it more dense? The dense means more point in the circle. I expect the following poly data: Is there any filter to make poly data more dense? Any suggestion is apprec…

---

## [Visualise the errors as relative to the magnitude of the deformation](https://discourse.vtk.org/t/visualise-the-errors-as-relative-to-the-magnitude-of-the-deformation/10418)

<div class="topic-metadata">

**Author:** [@isuruwi](https://discourse.vtk.org/u/isuruwi)\
**Replies:** 7\
**Last updated:** [January 15, 2023, 12:49pm UTC](https://discourse.vtk.org/t/visualise-the-errors-as-relative-to-the-magnitude-of-the-deformation/10418 "2023-01-15T12:49:31Z")

</div>

I have two volumetric liver meshes (groundturht and predicted versions) in .vtk format (i.e. ground-truth and predicted versions) and I want to visualise the errors as relative to the magnitude of the deformation on the …

---

## [Resampling and ploting multiple slices from a vtkPolydata](https://discourse.vtk.org/t/resampling-and-ploting-multiple-slices-from-a-vtkpolydata/10443)

<div class="topic-metadata">

**Author:** [@Jishnu](https://discourse.vtk.org/u/Jishnu)\
**Replies:** 5\
**Last updated:** [January 15, 2023, 7:05am UTC](https://discourse.vtk.org/t/resampling-and-ploting-multiple-slices-from-a-vtkpolydata/10443 "2023-01-15T07:05:29Z")

</div>

I have a vtkPolydata with 3D coordinates of the vertex of the grid as points and Temperature at each point stored as point field data. I want to plot the Temperature distribution at different elevations. I am using Pytho…

---

## [vtkWin32OpenGLRenderWindow: GLEW could not be initialized: Missing GL version](https://discourse.vtk.org/t/vtkwin32openglrenderwindow-glew-could-not-be-initialized-missing-gl-version/7517)

<div class="topic-metadata">

**Author:** [@zhang-qiang-github](https://discourse.vtk.org/u/zhang-qiang-github)\
**Replies:** 5\
**Last updated:** [January 14, 2023, 1:31pm UTC](https://discourse.vtk.org/t/vtkwin32openglrenderwindow-glew-could-not-be-initialized-missing-gl-version/7517 "2023-01-14T13:31:13Z")

</div>

I meet a bug: The code to reproduce this bug is: vtkSmartPointer\<vtkSphereSource\> source = vtkSmartPointer\<vtkSphereSource\>::New(); source-\>Update(); vtkSmartPointer\<vtkPolyDataMapper\> mapper = vtkSmartPointer\<vtkPo…

---

## [How to save the 3D medical image reconstructed by the volume drawing algorithm as a PLY file to the local computer](https://discourse.vtk.org/t/how-to-save-the-3d-medical-image-reconstructed-by-the-volume-drawing-algorithm-as-a-ply-file-to-the-local-computer/9982)

<div class="topic-metadata">

**Author:** [@mmXIO](https://discourse.vtk.org/u/mmXIO)\
**Replies:** 12\
**Last updated:** [January 14, 2023, 5:00am UTC](https://discourse.vtk.org/t/how-to-save-the-3d-medical-image-reconstructed-by-the-volume-drawing-algorithm-as-a-ply-file-to-the-local-computer/9982 "2023-01-14T05:00:58Z")

</div>

How to save the 3D medical image reconstructed by the volume drawing algorithm as a PLY file to the local computer

---

## [Is it possible to achieve bloom/glow effect in VTK?](https://discourse.vtk.org/t/is-it-possible-to-achieve-bloom-glow-effect-in-vtk/10438)

<div class="topic-metadata">

**Author:** [@sherinnovation](https://discourse.vtk.org/u/sherinnovation)\
**Replies:** 1\
**Last updated:** [January 13, 2023, 9:07pm UTC](https://discourse.vtk.org/t/is-it-possible-to-achieve-bloom-glow-effect-in-vtk/10438 "2023-01-13T21:07:56Z")

</div>

I have some points and lines in my scene, and I want to get a glow effect displayed for those lines and points. If there are no builtin classes in VTK to achieve this, what are the alternate options to achieve this? Any …

---

## [How to improve noises of displaying 2D DICOM slices with rendering vtk and make it more clear ?](https://discourse.vtk.org/t/how-to-improve-noises-of-displaying-2d-dicom-slices-with-rendering-vtk-and-make-it-more-clear/1843)

<div class="topic-metadata">

**Author:** [@kimia.af1998](https://discourse.vtk.org/u/kimia.af1998)\
**Replies:** 16\
**Last updated:** [January 13, 2023, 1:18pm UTC](https://discourse.vtk.org/t/how-to-improve-noises-of-displaying-2d-dicom-slices-with-rendering-vtk-and-make-it-more-clear/1843 "2023-01-13T13:18:37Z")

</div>

Here is my code to display 2d slices of DICOM volume using vtk renderer with python : # Read DICOM images self.reader = vtk.vtkDICOMImageReader() self.reader.SetDirectoryName(folder) self.reader.Update()…

---

## [vtkClipPolyData leaving some edges](https://discourse.vtk.org/t/vtkclippolydata-leaving-some-edges/10442)

<div class="topic-metadata">

**Author:** [@nico-arnold](https://discourse.vtk.org/u/nico-arnold)\
**Replies:** 0\
**Last updated:** [January 13, 2023, 12:09pm UTC](https://discourse.vtk.org/t/vtkclippolydata-leaving-some-edges/10442 "2023-01-13T12:09:38Z")

</div>

Hello everybody, I am using Vedo and VTK to cut up a flat 3D model into different regions to do some selective mesh refinement and transformations later. For that, I need to extract regions that are going to be transfor…

---

## [vtkRenderLargeImage restarting celery on server](https://discourse.vtk.org/t/vtkrenderlargeimage-restarting-celery-on-server/10437)

<div class="topic-metadata">

**Author:** [@RAUMIK\_RANA](https://discourse.vtk.org/u/RAUMIK_RANA)\
**Replies:** 0\
**Last updated:** [January 13, 2023, 6:31am UTC](https://discourse.vtk.org/t/vtkrenderlargeimage-restarting-celery-on-server/10437 "2023-01-13T06:31:21Z")

</div>

I want to take screentshot of renderWindow. So I am using “vtkRenderLargeImage” for that I have used offScringRenderig. renderWindow.SetOffScreenRendering(1) w2Image = vtk.vtkRenderLargeImage() w2Image.SetInput(inRen…

---

## [Visualization failed when display two polygon in the same time](https://discourse.vtk.org/t/visualization-failed-when-display-two-polygon-in-the-same-time/10397)

<div class="topic-metadata">

**Author:** [@zhang-qiang-github](https://discourse.vtk.org/u/zhang-qiang-github)\
**Replies:** 9\
**Last updated:** [January 12, 2023, 1:55pm UTC](https://discourse.vtk.org/t/visualization-failed-when-display-two-polygon-in-the-same-time/10397 "2023-01-12T13:55:42Z")

</div>

I want to display two polygon in one renderer. And the result is: The green and red color indicates two polygons. However, when I rotate it, some part of green color disappear: My environment is: win 10 pytho…

---

## [How to directly export an OBJ model from world coordinates](https://discourse.vtk.org/t/how-to-directly-export-an-obj-model-from-world-coordinates/10428)

<div class="topic-metadata">

**Author:** [@Dwight98](https://discourse.vtk.org/u/Dwight98)\
**Replies:** 0\
**Last updated:** [January 12, 2023, 8:50am UTC](https://discourse.vtk.org/t/how-to-directly-export-an-obj-model-from-world-coordinates/10428 "2023-01-12T08:50:56Z")

</div>

I want to insert points one by one in vtk by longitude and latitude coordinates of WGS84 and generate polygons, and then stretch this polygon into a three-dimensional model，and finally export to obj format for easy use.H…

---

## [How to generate a cylinder from an irregular polygon](https://discourse.vtk.org/t/how-to-generate-a-cylinder-from-an-irregular-polygon/10362)

<div class="topic-metadata">

**Author:** [@Dwight98](https://discourse.vtk.org/u/Dwight98)\
**Replies:** 4\
**Last updated:** [January 12, 2023, 8:33am UTC](https://discourse.vtk.org/t/how-to-generate-a-cylinder-from-an-irregular-polygon/10362 "2023-01-12T08:33:48Z")

</div>

I want to turn an irregular polygon into a plane through VTK, and then stretch this plane vertically into an irregular cylinder，there are any good ways？I hope that the seniors will give good advice，Sincere thanks！

---

## [where do I find a detailed description of all the XML element attributes in a VTU file?](https://discourse.vtk.org/t/where-do-i-find-a-detailed-description-of-all-the-xml-element-attributes-in-a-vtu-file/10419)

<div class="topic-metadata">

**Author:** [@bkwilliams](https://discourse.vtk.org/u/bkwilliams)\
**Replies:** 1\
**Last updated:** [January 11, 2023, 6:51pm UTC](https://discourse.vtk.org/t/where-do-i-find-a-detailed-description-of-all-the-xml-element-attributes-in-a-vtu-file/10419 "2023-01-11T18:51:58Z")

</div>

I’m trying to find where I can get all the available attributes for the various elements in a VTK XML file, for example the element in a VTU unstructured grid file. I have some examples but I’m pretty sure they don’t co…

---

## [vtkNIFTIImageReader cannot read the origin of NIFTI Image](https://discourse.vtk.org/t/vtkniftiimagereader-cannot-read-the-origin-of-nifti-image/10420)

<div class="topic-metadata">

**Author:** [@nnzzll](https://discourse.vtk.org/u/nnzzll)\
**Replies:** 1\
**Last updated:** [January 11, 2023, 5:34pm UTC](https://discourse.vtk.org/t/vtkniftiimagereader-cannot-read-the-origin-of-nifti-image/10420 "2023-01-11T17:34:19Z")

</div>

I create a NIFTI image file by using SimpleITK and saved as .nii.gz file. However, when I load it by vtkNIFTIImageReader, the origin of the output vtkImageData turns out to be (0, 0, 0), which is not what I had set in S…

---

## [failed to convert polydata to volume](https://discourse.vtk.org/t/failed-to-convert-polydata-to-volume/10408)

<div class="topic-metadata">

**Author:** [@zhang-qiang-github](https://discourse.vtk.org/u/zhang-qiang-github)\
**Replies:** 0\
**Last updated:** [January 9, 2023, 1:55pm UTC](https://discourse.vtk.org/t/failed-to-convert-polydata-to-volume/10408 "2023-01-09T13:55:08Z")

</div>

I want to convert a polydata to volume, and my reference code is: https://kitware.github.io/vtk-examples/site/Cxx/PolyData/PolyDataToImageData/. My polydata is: But the converted imagedata is: There is some unex…

[Previous page](https://discourse.vtk.org/c/support/6.md?page=56)

[Next page](https://discourse.vtk.org/c/support/6.md?page=58)
