# Support

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

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

**Page:** 104

---

## [How to obtain faceID of a patch in VTK?](https://discourse.vtk.org/t/how-to-obtain-faceid-of-a-patch-in-vtk/5970)

<div class="topic-metadata">

**Author:** [@rasunag27](https://discourse.vtk.org/u/rasunag27)\
**Replies:** 1\
**Last updated:** [June 10, 2021, 3:54pm UTC](https://discourse.vtk.org/t/how-to-obtain-faceid-of-a-patch-in-vtk/5970 "2021-06-10T15:54:43Z")

</div>

Dear all, Is there a possibility to obtain FaceIDs of a particular patch? I have done a heat transfer simulation using OpenFoam, converted to VTK using vtkToFoam option and visualizing in paraview. When doing so,…

---

## [CylinderExample vtkXOpenGLRenderWindow error in C++](https://discourse.vtk.org/t/cylinderexample-vtkxopenglrenderwindow-error-in-c/5953)

<div class="topic-metadata">

**Author:** [@felmoreno1726](https://discourse.vtk.org/u/felmoreno1726)\
**Replies:** 15\
**Last updated:** [June 9, 2021, 4:03pm UTC](https://discourse.vtk.org/t/cylinderexample-vtkxopenglrenderwindow-error-in-c/5953 "2021-06-09T16:03:10Z")

</div>

I’m running Ubuntu 20.04 on WSL. I succesfully compile the CylinderExample, and get the following errors at runtime. 2021-06-04 19:05:43.417 ( 0.009s) \[ A4169740\]vtkXOpenGLRenderWindow.:251 ERR| vtkXOpenGLR…

---

## [vtkDecimatePro using vtkDataSet](https://discourse.vtk.org/t/vtkdecimatepro-using-vtkdataset/5956)

<div class="topic-metadata">

**Author:** [@Hyunwoo\_Kim](https://discourse.vtk.org/u/Hyunwoo_Kim)\
**Replies:** 7\
**Last updated:** [June 9, 2021, 2:47pm UTC](https://discourse.vtk.org/t/vtkdecimatepro-using-vtkdataset/5956 "2021-06-09T14:47:07Z")

</div>

Hi, I’m trying to use vtkDecimatePro for a surface mesh. An input data I use is a format of the vtkDataSet. However, the vtkDecimatePro seems to need a vtkPolyData format. I’ve already tried to vtkPolyData::safeDownC…

---

## [vtkImageData rendering issue](https://discourse.vtk.org/t/vtkimagedata-rendering-issue/5966)

<div class="topic-metadata">

**Author:** [@Hyunwoo\_Kim](https://discourse.vtk.org/u/Hyunwoo_Kim)\
**Replies:** 1\
**Last updated:** [June 9, 2021, 5:15am UTC](https://discourse.vtk.org/t/vtkimagedata-rendering-issue/5966 "2021-06-09T05:15:40Z")

</div>

Issue Hi, I want to display a 2D image on my 3d view. So, I’m trying to use vtkImageData. However, when I apply scalar data and render the image data, there is no display. How could I fix this? thanks. Source /…

---

## [How can I export vtkImageSlice to .obj file](https://discourse.vtk.org/t/how-can-i-export-vtkimageslice-to-obj-file/5960)

<div class="topic-metadata">

**Author:** [@Uriel\_Dardik](https://discourse.vtk.org/u/Uriel_Dardik)\
**Replies:** 1\
**Last updated:** [June 8, 2021, 1:50pm UTC](https://discourse.vtk.org/t/how-can-i-export-vtkimageslice-to-obj-file/5960 "2021-06-08T13:50:34Z")

</div>

I’ve create a class that import/export .obj files to/from VTK object. import vtk DATA\_DIR = r"C:\\Users\\MyUser" class MyRenderer: def \_\_init\_\_(self): pass def import\_object(self, obj\_name): imp…

---

## [Why does vtkRenderWindowInteractor eat up LeftButtonRelease event?](https://discourse.vtk.org/t/why-does-vtkrenderwindowinteractor-eat-up-leftbuttonrelease-event/5950)

<div class="topic-metadata">

**Author:** [@jaswantp](https://discourse.vtk.org/u/jaswantp)\
**Replies:** 6\
**Last updated:** [June 8, 2021, 1:30pm UTC](https://discourse.vtk.org/t/why-does-vtkrenderwindowinteractor-eat-up-leftbuttonrelease-event/5950 "2021-06-08T13:30:11Z")

</div>

@ken-martin @utkarshayachit There is no way to listen to LeftButtonReleaseEvent on an interactor. A quick google search shows up this, http://vtk.1045678.n5.nabble.com/Mouse-button-release-event-is-still-broken-in-VTK-…

---

## [about RequestData](https://discourse.vtk.org/t/about-requestdata/5925)

<div class="topic-metadata">

**Author:** [@Hyunwoo\_Kim](https://discourse.vtk.org/u/Hyunwoo_Kim)\
**Replies:** 5\
**Last updated:** [June 4, 2021, 7:23pm UTC](https://discourse.vtk.org/t/about-requestdata/5925 "2021-06-04T19:23:53Z")

</div>

I’m trying to convert the VTK version from 5.0.3 to 9.0.1 In this process, the vtkPolydataSource was changed to the vtkPolydataAlgorithm. And I found that the Execute function was migrated to the RequestData, and It wa…

---

## [3D objects are shifted after aligning along the vector](https://discourse.vtk.org/t/3d-objects-are-shifted-after-aligning-along-the-vector/5943)

<div class="topic-metadata">

**Author:** [@csad6517](https://discourse.vtk.org/u/csad6517)\
**Replies:** 0\
**Last updated:** [June 5, 2021, 7:54pm UTC](https://discourse.vtk.org/t/3d-objects-are-shifted-after-aligning-along-the-vector/5943 "2021-06-05T19:54:41Z")

</div>

I have several vtk poly data objects, equal in size that I want to align along a normalized direction vector centrically, shown on figure A. The vector below is calculated based on the three 3D points (red dots on figure…

---

## [get the raw pointer from the vtkPoints](https://discourse.vtk.org/t/get-the-raw-pointer-from-the-vtkpoints/4894)

<div class="topic-metadata">

**Author:** [@1116](https://discourse.vtk.org/u/1116)\
**Replies:** 19\
**Last updated:** [June 4, 2021, 10:01pm UTC](https://discourse.vtk.org/t/get-the-raw-pointer-from-the-vtkpoints/4894 "2021-06-04T22:01:00Z")

</div>

Hello, I tried to get the raw pointer of vtkPoints and send it to other services. But it looks that the return value of GetVoidPointer is incorrect. This is the code I used for testing, although I could go through every…

---

## [SafeDownCast and subclassing vtkPolyData in Python](https://discourse.vtk.org/t/safedowncast-and-subclassing-vtkpolydata-in-python/5912)

<div class="topic-metadata">

**Author:** [@bistek](https://discourse.vtk.org/u/bistek)\
**Replies:** 10\
**Last updated:** [June 4, 2021, 10:48am UTC](https://discourse.vtk.org/t/safedowncast-and-subclassing-vtkpolydata-in-python/5912 "2021-06-04T10:48:52Z")

</div>

Hello, I have defined a subclass of vtkPolyData in my Python project. It works well and I am able to use standard vtkXMLPolyDataWriter to save it to disk. However, when reloading the objects from file, I would like to ca…

---

## [unsuitable gl2ps and libharu version](https://discourse.vtk.org/t/unsuitable-gl2ps-and-libharu-version/2906)

<div class="topic-metadata">

**Author:** [@hubutui](https://discourse.vtk.org/u/hubutui)\
**Replies:** 7\
**Last updated:** [June 4, 2021, 12:50am UTC](https://discourse.vtk.org/t/unsuitable-gl2ps-and-libharu-version/2906 "2021-06-04T00:50:52Z")

</div>

cmake complains unsuitable version of gl2ps and libharu. cmake says vtk needs gl2ps 1.4.1 but found 1.4.0, and vtk needs libhairu 2.4.0 but found 2.3.0 . However, according to http://geuz.org/gl2ps/ and http://libharu.or…

---

## [Align poly data to direction vector](https://discourse.vtk.org/t/align-poly-data-to-direction-vector/5927)

<div class="topic-metadata">

**Author:** [@csad6517](https://discourse.vtk.org/u/csad6517)\
**Replies:** 3\
**Last updated:** [June 3, 2021, 6:52pm UTC](https://discourse.vtk.org/t/align-poly-data-to-direction-vector/5927 "2021-06-03T18:52:11Z")

</div>

I represent a vtk poly data object that I read with vtkPlyReader and want to align it to given normalized direction vector, so that its orientation matches with that vector. directionVector = np.array(\[-0.1134, -0.0695,…

---

## [wglMakeCurrent failed in MakeCurrent after closed a window with two vtk widget.](https://discourse.vtk.org/t/wglmakecurrent-failed-in-makecurrent-after-closed-a-window-with-two-vtk-widget/5899)

<div class="topic-metadata">

**Author:** [@zhang-qiang-github](https://discourse.vtk.org/u/zhang-qiang-github)\
**Replies:** 1\
**Last updated:** [June 3, 2021, 11:58am UTC](https://discourse.vtk.org/t/wglmakecurrent-failed-in-makecurrent-after-closed-a-window-with-two-vtk-widget/5899 "2021-06-03T11:58:58Z")

</div>

I create a window, in which I add two vtk widget. The window is OK. But, if I close the winodw, a bug is reporeted: ... 2021-06-01 20:53:09.231 ( 3.482s) \[ \]vtkWin32OpenGLRenderWin:217 ERR| vtkWin32…

---

## [vtk chart background shifted towards origin](https://discourse.vtk.org/t/vtk-chart-background-shifted-towards-origin/5890)

<div class="topic-metadata">

**Author:** [@dcbr](https://discourse.vtk.org/u/dcbr)\
**Replies:** 4\
**Last updated:** [June 3, 2021, 8:55am UTC](https://discourse.vtk.org/t/vtk-chart-background-shifted-towards-origin/5890 "2021-06-03T08:55:16Z")

</div>

Hi there, I was trying out the vtk Charts API in python, following the examples on the wiki (ChartsOn3DScene and LinePlot). I tried to create two charts in the same context scene and would like to use a different backgr…

---

## [The world coordinate is changed when the shown image is rotated.](https://discourse.vtk.org/t/the-world-coordinate-is-changed-when-the-shown-image-is-rotated/5879)

<div class="topic-metadata">

**Author:** [@zhang-qiang-github](https://discourse.vtk.org/u/zhang-qiang-github)\
**Replies:** 13\
**Last updated:** [June 2, 2021, 4:06pm UTC](https://discourse.vtk.org/t/the-world-coordinate-is-changed-when-the-shown-image-is-rotated/5879 "2021-06-02T16:06:37Z")

</div>

I want to know how to calculate the image pixel coordinate fro world coordinate. The code of my experiment is: import vtk import numpy as np from vtk.util.numpy\_support import numpy\_to\_vtk def numpyToVTK(data, multi\_com…

---

## [Box clip with vtkTableBasedClipDataSet](https://discourse.vtk.org/t/box-clip-with-vtktablebasedclipdataset/5906)

<div class="topic-metadata">

**Author:** [@KeK](https://discourse.vtk.org/u/KeK)\
**Replies:** 0\
**Last updated:** [June 2, 2021, 2:21am UTC](https://discourse.vtk.org/t/box-clip-with-vtktablebasedclipdataset/5906 "2021-06-02T02:21:33Z")

</div>

I’m trying to clip an unstructuredgrid using vtkTableBasedClipDataSet. I use the unstructuredgrid as the input of vtkTableBasedClipDataSet and vtkbox as the clip function. The result doesn’t look like it’s interpo…

---

## [Create an isosurface from parallel contours](https://discourse.vtk.org/t/create-an-isosurface-from-parallel-contours/5909)

<div class="topic-metadata">

**Author:** [@Miguel\_Socorro](https://discourse.vtk.org/u/Miguel_Socorro)\
**Replies:** 1\
**Last updated:** [June 2, 2021, 9:35am UTC](https://discourse.vtk.org/t/create-an-isosurface-from-parallel-contours/5909 "2021-06-02T09:35:22Z")

</div>

I need to create an isosurface from these 4 contours each contour is on a plane and the planes are parallel, therefore the 4 contours are parallel. I tried a solution similar to this Stitches But contour 3 has seve…

---

## [GPU offload](https://discourse.vtk.org/t/gpu-offload/5898)

<div class="topic-metadata">

**Author:** [@pourarab](https://discourse.vtk.org/u/pourarab)\
**Replies:** 2\
**Last updated:** [June 2, 2021, 8:45am UTC](https://discourse.vtk.org/t/gpu-offload/5898 "2021-06-02T08:45:53Z")

</div>

Hello, I’m investigating using OpenMP GPU offload to run vtkCellTreeLocator-\>FindCellsWithinBounds on GPU. Is it possible to map it via OpenMP ? If not, is there any solution to do it as parallel execution on GPUs ? Th…

---

## [vtkImageReslice usage](https://discourse.vtk.org/t/vtkimagereslice-usage/5887)

<div class="topic-metadata">

**Author:** [@dani](https://discourse.vtk.org/u/dani)\
**Replies:** 1\
**Last updated:** [June 1, 2021, 8:50pm UTC](https://discourse.vtk.org/t/vtkimagereslice-usage/5887 "2021-06-01T20:50:24Z")

</div>

Dear all, I am having some doubts on vtkImageReslice. I am working in python. I would like not just to resample the image but also to crop the result to a box of size (10,10,20) centered in the origin (the box is much s…

---

## [Individual label colors with vtkPointSetToLabelHierarchy](https://discourse.vtk.org/t/individual-label-colors-with-vtkpointsettolabelhierarchy/5901)

<div class="topic-metadata">

**Author:** [@Peter](https://discourse.vtk.org/u/Peter)\
**Replies:** 0\
**Last updated:** [June 1, 2021, 1:11pm UTC](https://discourse.vtk.org/t/individual-label-colors-with-vtkpointsettolabelhierarchy/5901 "2021-06-01T13:11:12Z")

</div>

Hi! I am using the following pipeline to show labels at certain 3D positions. No labels are shown for invisible positions (hidden by another object in the scene). vtkUnstructuredGrid | vtkSelectVisiblePoints | vtkPoin…

---

## [Compatibility VTK with python 3.9](https://discourse.vtk.org/t/compatibility-vtk-with-python-3-9/5234)

<div class="topic-metadata">

**Author:** [@annagulcher](https://discourse.vtk.org/u/annagulcher)\
**Replies:** 2\
**Last updated:** [May 31, 2021, 9:58pm UTC](https://discourse.vtk.org/t/compatibility-vtk-with-python-3-9/5234 "2021-05-31T21:58:23Z")

</div>

For a visualisation class I’m taking, I need to use VTK, and as I’m more familiar with Python than C++ I hope to use the python VTK interface. However, I’m unable to install VTK because it is not compatible with Python 3…

---

## [Mapping between coordinate position (x,y,z) and voxel index](https://discourse.vtk.org/t/mapping-between-coordinate-position-x-y-z-and-voxel-index/5357)

<div class="topic-metadata">

**Author:** [@Luis\_Carlos\_Carneiro](https://discourse.vtk.org/u/Luis_Carlos_Carneiro)\
**Replies:** 7\
**Last updated:** [May 31, 2021, 3:37pm UTC](https://discourse.vtk.org/t/mapping-between-coordinate-position-x-y-z-and-voxel-index/5357 "2021-05-31T15:37:15Z")

</div>

Dear All, Having a (x,y,z) got with picking with a displayed mhd file, exists any VTK instruction to convert to the voxel index (other (x,y,z), preferable in float) in the image in memory? Notice that the camera was ch…

---

## [SetLabelFormat](https://discourse.vtk.org/t/setlabelformat/5894)

<div class="topic-metadata">

**Author:** [@devngc](https://discourse.vtk.org/u/devngc)\
**Replies:** 0\
**Last updated:** [May 31, 2021, 1:00pm UTC](https://discourse.vtk.org/t/setlabelformat/5894 "2021-05-31T13:00:20Z")

</div>

Is there a good reference on how to use SetLabelFormat method of the vtkScalarBarActor class? I have looked at this post already which is helpful. I used ‘%-#6.3g’ (default value) to get integer values for labels of a S…

---

## [Getting 3D ImageData from polyData](https://discourse.vtk.org/t/getting-3d-imagedata-from-polydata/5893)

<div class="topic-metadata">

**Author:** [@Tnmw](https://discourse.vtk.org/u/Tnmw)\
**Replies:** 0\
**Last updated:** [May 31, 2021, 11:47am UTC](https://discourse.vtk.org/t/getting-3d-imagedata-from-polydata/5893 "2021-05-31T11:47:16Z")

</div>

Hi all, I am trying to use vtk to load in an object stored in an .stl file, and fill a structured 3D grid with the volume of the object present in each grid cell. (If there is an obvious way to do this which I am missi…

---

## [The range of the SetPosition values.](https://discourse.vtk.org/t/the-range-of-the-setposition-values/5835)

<div class="topic-metadata">

**Author:** [@Kim\_William](https://discourse.vtk.org/u/Kim_William)\
**Replies:** 4\
**Last updated:** [May 31, 2021, 12:43am UTC](https://discourse.vtk.org/t/the-range-of-the-setposition-values/5835 "2021-05-31T00:43:00Z")

</div>

Hi all. I have a question about the SetPosition function of the vtkCamera class. I have found a reference manual for the SetPosition function. But I don’t understand what is the range of the position. (I can pass t…

---

## [Extract cubic volume from transformed imageData](https://discourse.vtk.org/t/extract-cubic-volume-from-transformed-imagedata/5841)

<div class="topic-metadata">

**Author:** [@dani](https://discourse.vtk.org/u/dani)\
**Replies:** 2\
**Last updated:** [May 30, 2021, 2:32am UTC](https://discourse.vtk.org/t/extract-cubic-volume-from-transformed-imagedata/5841 "2021-05-30T02:32:09Z")

</div>

Hi, I am new in VTK. I am using Python 3.7 for VTK 9.0.1 under anaconda in Ubuntu Linux. I do have a 3D numpy array with a 3D scalar volume image and a cube source. I would like to split the image in two parts: the one…

---

## [Combine multiple ExodusII results into single geometry](https://discourse.vtk.org/t/combine-multiple-exodusii-results-into-single-geometry/5878)

<div class="topic-metadata">

**Author:** [@aeslaughter](https://discourse.vtk.org/u/aeslaughter)\
**Replies:** 1\
**Last updated:** [May 28, 2021, 4:42am UTC](https://discourse.vtk.org/t/combine-multiple-exodusii-results-into-single-geometry/5878 "2021-05-28T04:42:03Z")

</div>

I am attempting to load multiple ExodusII results into a single geometry. The results are from a set of simulations that are performed independent, but are all related to the same multi-physics simulation. Attached is m…

---

## [How to implement integration point](https://discourse.vtk.org/t/how-to-implement-integration-point/5838)

<div class="topic-metadata">

**Author:** [@gaetanocmr](https://discourse.vtk.org/u/gaetanocmr)\
**Replies:** 3\
**Last updated:** [May 27, 2021, 11:55am UTC](https://discourse.vtk.org/t/how-to-implement-integration-point/5838 "2021-05-27T11:55:35Z")

</div>

Hello everyone, I would like to implement integration point in my celltype line. I’m doing some analysis on beam element, so I have the node “i” and “j” and the connectivity of the element i - j. StressStrain of this …

---

## [Assigning Multiple Tensors to a Point](https://discourse.vtk.org/t/assigning-multiple-tensors-to-a-point/5867)

<div class="topic-metadata">

**Author:** [@nrsharan](https://discourse.vtk.org/u/nrsharan)\
**Replies:** 2\
**Last updated:** [May 26, 2021, 3:36pm UTC](https://discourse.vtk.org/t/assigning-multiple-tensors-to-a-point/5867 "2021-05-26T15:36:02Z")

</div>

Hi everyone, I am using VTK to generate .vtu files from Java to use them in ParaView. I am trying to use polyData.GetPointData().SetTensors(stress) polyData.GetPointData().SetTensors(strain) where polyData is a varia…

---

## [How to generate clipped plane area?](https://discourse.vtk.org/t/how-to-generate-clipped-plane-area/5823)

<div class="topic-metadata">

**Author:** [@Dgg820502](https://discourse.vtk.org/u/Dgg820502)\
**Replies:** 5\
**Last updated:** [May 26, 2021, 8:59am UTC](https://discourse.vtk.org/t/how-to-generate-clipped-plane-area/5823 "2021-05-26T08:59:14Z")

</div>

Please help, I have generated the clipped plane of ear canal but which VTK function should I use to generate the clipped plane area? Many thanks in advance.

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

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