# Latest

**URL:** https://discourse.vtk.org/latest.md?page=147

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

**Page:** 148

---

## [How to construct the ".gz" file loaded in the vtk.js example](https://discourse.vtk.org/t/how-to-construct-the-gz-file-loaded-in-the-vtk-js-example/7578)

<div class="topic-metadata">

**Author:** [@qq769747518](https://discourse.vtk.org/u/qq769747518)\
**Replies:** 3\
**Last updated:** [January 11, 2022, 3:55pm UTC](https://discourse.vtk.org/t/how-to-construct-the-gz-file-loaded-in-the-vtk-js-example/7578 "2022-01-11T15:55:24Z")

</div>

const reader = vtkHttpDataSetReader.newInstance({ fetchGzip: true, }); reader.setUrl(${\_\_BASE\_PATH\_\_}/data/volume/headsq.vti, { loadData: true }).then(() =\> {}); In this example，The loaded file headsq.vti consists of…

---

## [How to get the opacity value at a point/cell (in world coordinate) on an object of vtkImageData](https://discourse.vtk.org/t/how-to-get-the-opacity-value-at-a-point-cell-in-world-coordinate-on-an-object-of-vtkimagedata/6691)

<div class="topic-metadata">

**Author:** [@YuezhenQin](https://discourse.vtk.org/u/YuezhenQin)\
**Replies:** 2\
**Last updated:** [January 11, 2022, 2:11pm UTC](https://discourse.vtk.org/t/how-to-get-the-opacity-value-at-a-point-cell-in-world-coordinate-on-an-object-of-vtkimagedata/6691 "2022-01-11T14:11:35Z")

</div>

I made a line intersected with the vtkbox of vtkImageData volume and collected the intersection cell ids. I am wondering if vtk provide class or method to help me get the opacity value at each point/cell. Thanks! It has…

---

## [Extract surface for selected cell ids from vtkUnstructuredGrid.](https://discourse.vtk.org/t/extract-surface-for-selected-cell-ids-from-vtkunstructuredgrid/7613)

<div class="topic-metadata">

**Author:** [@Swarna\_Ravali](https://discourse.vtk.org/u/Swarna_Ravali)\
**Replies:** 0\
**Last updated:** [January 11, 2022, 11:18am UTC](https://discourse.vtk.org/t/extract-surface-for-selected-cell-ids-from-vtkunstructuredgrid/7613 "2022-01-11T11:18:29Z")

</div>

Hi, I understand that vtkGeometryFilter() or vtkDataSetSurfaceFilter() is used to extract surfaces of vtkUnstructuredGrid. But Is there any possible way to extract surface of selected cells (non consecutive).? And SetC…

---

## [Distributed I/O with vtkXMLPUnstructuredGridWriter](https://discourse.vtk.org/t/distributed-i-o-with-vtkxmlpunstructuredgridwriter/7418)

<div class="topic-metadata">

**Author:** [@Luke\_Dalessandro](https://discourse.vtk.org/u/Luke_Dalessandro)\
**Replies:** 4\
**Last updated:** [January 10, 2022, 7:33pm UTC](https://discourse.vtk.org/t/distributed-i-o-with-vtkxmlpunstructuredgridwriter/7418 "2022-01-10T19:33:03Z")

</div>

Hi Everyone, We have our own solver that uses .vtu output via a vtkXMLUnstructuredGridWriter and synthesizes timeseries .pvds so that our domain scientists can use ParaView for post-processing. We’ve recently gone from …

---

## [vr::VRInput() returning nullptr in VTK 9.1](https://discourse.vtk.org/t/vr-vrinput-returning-nullptr-in-vtk-9-1/7566)

<div class="topic-metadata">

**Author:** [@codeling](https://discourse.vtk.org/u/codeling)\
**Replies:** 11\
**Last updated:** [January 10, 2022, 3:59pm UTC](https://discourse.vtk.org/t/vr-vrinput-returning-nullptr-in-vtk-9-1/7566 "2022-01-10T15:59:24Z")

</div>

We use vtk’s OpenVR integration, and recently I noticed that when using VTK 9.1.0, the vr::VRInput() call in vtkOpenVRRenderWindowInteractor::Initialize() in line 784 returns a nullptr leading to a crash. This does not …

---

## [How to scale a rendering scene in vtk.js ?](https://discourse.vtk.org/t/how-to-scale-a-rendering-scene-in-vtk-js/7604)

<div class="topic-metadata">

**Author:** [@j-fu](https://discourse.vtk.org/u/j-fu)\
**Replies:** 2\
**Last updated:** [January 10, 2022, 3:56pm UTC](https://discourse.vtk.org/t/how-to-scale-a-rendering-scene-in-vtk-js/7604 "2022-01-10T15:56:08Z")

</div>

Hi, I would like to achieve something like in Scaling a rendering scene with vtk.js. There seems to be no cam.SetModelTransformMatrix() equivalent in vtk.js at the moment. Are there any recipes/workarounds?

---

## [How to get vtkShaderProgram\* of an actor?](https://discourse.vtk.org/t/how-to-get-vtkshaderprogram-of-an-actor/7602)

<div class="topic-metadata">

**Author:** [@WailmerPail](https://discourse.vtk.org/u/WailmerPail)\
**Replies:** 11\
**Last updated:** [January 10, 2022, 3:21pm UTC](https://discourse.vtk.org/t/how-to-get-vtkshaderprogram-of-an-actor/7602 "2022-01-10T15:21:19Z")

</div>

Hi teams, I have already know void TestShaderCallback::Execute(vtkObject \*, unsigned long, void \*cbo){ auto cellBO = reinterpret\_cast\<vtkShaderProgram\*\>(cbo); float diffuseColor\[3\]{1,0.2,0.6}; cellBO-\>SetUn…

---

## [Is there any simple to compute do product between cell normal and a vector like vtkVectorDot](https://discourse.vtk.org/t/is-there-any-simple-to-compute-do-product-between-cell-normal-and-a-vector-like-vtkvectordot/7608)

<div class="topic-metadata">

**Author:** [@AlexLuya](https://discourse.vtk.org/u/AlexLuya)\
**Replies:** 2\
**Last updated:** [January 10, 2022, 1:26pm UTC](https://discourse.vtk.org/t/is-there-any-simple-to-compute-do-product-between-cell-normal-and-a-vector-like-vtkvectordot/7608 "2022-01-10T13:26:01Z")

</div>

Hello,vtkVectorDot can be used to compute the dot product between POINT normal and vectors,any similar way for CELL normals?

---

## [Help: Intrinsic Rotation on Object not working...](https://discourse.vtk.org/t/help-intrinsic-rotation-on-object-not-working/7500)

<div class="topic-metadata">

**Author:** [@Charles\_Shin](https://discourse.vtk.org/u/Charles_Shin)\
**Replies:** 7\
**Last updated:** [January 10, 2022, 8:13am UTC](https://discourse.vtk.org/t/help-intrinsic-rotation-on-object-not-working/7500 "2022-01-10T08:13:44Z")

</div>

I’m trying to do intrinsic rotation (not rotating camera!!) on a NIFTI image, but it is not working…I’ve been working on this for hours, and it is quite sad that it is still not working. I saw the documentation regardin…

---

## [How to get voxel coordinates(as in ITK snap ) from vtkimage viewer from mouse click](https://discourse.vtk.org/t/how-to-get-voxel-coordinates-as-in-itk-snap-from-vtkimage-viewer-from-mouse-click/7607)

<div class="topic-metadata">

**Author:** [@Sreerag](https://discourse.vtk.org/u/Sreerag)\
**Replies:** 0\
**Last updated:** [January 10, 2022, 6:01am UTC](https://discourse.vtk.org/t/how-to-get-voxel-coordinates-as-in-itk-snap-from-vtkimage-viewer-from-mouse-click/7607 "2022-01-10T06:01:05Z")

</div>

Hello, I am trying to use ITK’s region growing algorithm for medical image segmentation. So to put the seedpoint i need exact voxel coordinates of the mouseclick position in my vtkimageviewer. So how can I get those vo…

---

## [vtkTextActor3D looks weird](https://discourse.vtk.org/t/vtktextactor3d-looks-weird/7591)

<div class="topic-metadata">

**Author:** [@zhang-qiang-github](https://discourse.vtk.org/u/zhang-qiang-github)\
**Replies:** 7\
**Last updated:** [January 9, 2022, 10:15pm UTC](https://discourse.vtk.org/t/vtktextactor3d-looks-weird/7591 "2022-01-09T22:15:58Z")

</div>

I am using vtkTextActor3D to display 3D text, but it look weird.The code to reproduce my question is: import vtkmodules.all as vtk if \_\_name\_\_ == '\_\_main\_\_': line = vtk.vtkLineSource() line.SetPoint1(0, 0, 0) …

---

## [Running tests with xvfb-run](https://discourse.vtk.org/t/running-tests-with-xvfb-run/7597)

<div class="topic-metadata">

**Author:** [@RafaelPalomar](https://discourse.vtk.org/u/RafaelPalomar)\
**Replies:** 2\
**Last updated:** [January 8, 2022, 12:05pm UTC](https://discourse.vtk.org/t/running-tests-with-xvfb-run/7597 "2022-01-08T12:05:59Z")

</div>

Hello, PROBLEM: I’m trying to run VTK testing through xvfb-run ctest and many of the tests (complete list of failed tests) end up failing with \*\*\*Exception: Numerical errors. I’ve been digging into the problem and fou…

---

## [Compile vtk-9.1 with mingw-Error, "file too big"](https://discourse.vtk.org/t/compile-vtk-9-1-with-mingw-error-file-too-big/7590)

<div class="topic-metadata">

**Author:** [@rockydut](https://discourse.vtk.org/u/rockydut)\
**Replies:** 3\
**Last updated:** [January 8, 2022, 1:19am UTC](https://discourse.vtk.org/t/compile-vtk-9-1-with-mingw-error-file-too-big/7590 "2022-01-08T01:19:31Z")

</div>

When I compile VTK-9.1 by mingw. I selected the vtkm. The compiler said: UnknownArrayHandle.cxx.obj: too many sections (79466) UnknownArrayHandle.cxx.obj: ‘file too big’. So, how to compile it correctly?

---

## [Programmatic Volume File Zooming](https://discourse.vtk.org/t/programmatic-volume-file-zooming/7389)

<div class="topic-metadata">

**Author:** [@simplyvish](https://discourse.vtk.org/u/simplyvish)\
**Replies:** 3\
**Last updated:** [January 7, 2022, 11:49am UTC](https://discourse.vtk.org/t/programmatic-volume-file-zooming/7389 "2022-01-07T11:49:38Z")

</div>

I’m rendering a VTI file on browser. I can zoom-in/zoom-out using my mouse scroll wheel. I want to apply zooming from the code itself similar to the one that applies with scroll wheel. But couldn’t find the required api/…

---

## [Display based on vtk cannot be displayed normally on vmware virtual machine](https://discourse.vtk.org/t/display-based-on-vtk-cannot-be-displayed-normally-on-vmware-virtual-machine/7586)

<div class="topic-metadata">

**Author:** [@WangZP10969](https://discourse.vtk.org/u/WangZP10969)\
**Replies:** 3\
**Last updated:** [January 7, 2022, 10:10am UTC](https://discourse.vtk.org/t/display-based-on-vtk-cannot-be-displayed-normally-on-vmware-virtual-machine/7586 "2022-01-07T10:10:01Z")

</div>

VMWare: 16 Windows10x64 VTK9 (compiled via vcpkg) Operation: open the vtk window Result: VMWare rendering error PC rendering normally VTK did not prompt any warnings. What could cause this situation?

---

## [renderer.resetCamera() makes objects appear far when scene contains a line widget](https://discourse.vtk.org/t/renderer-resetcamera-makes-objects-appear-far-when-scene-contains-a-line-widget/7579)

<div class="topic-metadata">

**Author:** [@toro](https://discourse.vtk.org/u/toro)\
**Replies:** 2\
**Last updated:** [January 7, 2022, 9:59am UTC](https://discourse.vtk.org/t/renderer-resetcamera-makes-objects-appear-far-when-scene-contains-a-line-widget/7579 "2022-01-07T09:59:01Z")

</div>

All, I’m using vtk.js to display cube and labels. For labels, I’m using LineWidgets without handlers. Sometimes the user wants to refit the scene, ie. renderer.resetCamera is called. When the scene contains cubes only,…

---

## [OpenVR GetFocalPoint show big data](https://discourse.vtk.org/t/openvr-getfocalpoint-show-big-data/7593)

<div class="topic-metadata">

**Author:** [@zist8888](https://discourse.vtk.org/u/zist8888)\
**Replies:** 1\
**Last updated:** [January 7, 2022, 9:48am UTC](https://discourse.vtk.org/t/openvr-getfocalpoint-show-big-data/7593 "2022-01-07T09:48:49Z")

</div>

I have some problem,log as this. function ResetCamera() ResetCameraClippingRange() before vtkOpenVRRenderer GetActiveCamera()-\>GetFocalPoint() have value: 0.708148 , -0.260015 , -0.989036 function ResetCamera() ResetC…

---

## [cannot create object of unknown type "vtkColor3d"](https://discourse.vtk.org/t/cannot-create-object-of-unknown-type-vtkcolor3d/7595)

<div class="topic-metadata">

**Author:** [@perphy](https://discourse.vtk.org/u/perphy)\
**Replies:** 0\
**Last updated:** [January 7, 2022, 9:30am UTC](https://discourse.vtk.org/t/cannot-create-object-of-unknown-type-vtkcolor3d/7595 "2022-01-07T09:30:16Z")

</div>

I am trying the helloworld example in python in vtk9.1. I get an error when calling colors.GetColor3d(“Tomato”) which comes from the tutorial code. I tried “blue”, and same problem. Thanks #!/usr/bin/env python # …

---

## [Ask for help, I use the mouse to delimit 3 d line, at the beginning is right, but as long as the mouse rotated the camera to delimit again error,line posion is error, do not know what reason is](https://discourse.vtk.org/t/ask-for-help-i-use-the-mouse-to-delimit-3-d-line-at-the-beginning-is-right-but-as-long-as-the-mouse-rotated-the-camera-to-delimit-again-error-line-posion-is-error-do-not-know-what-reason-is/7588)

<div class="topic-metadata">

**Author:** [@Liudeke](https://discourse.vtk.org/u/Liudeke)\
**Replies:** 0\
**Last updated:** [January 7, 2022, 6:56am UTC](https://discourse.vtk.org/t/ask-for-help-i-use-the-mouse-to-delimit-3-d-line-at-the-beginning-is-right-but-as-long-as-the-mouse-rotated-the-camera-to-delimit-again-error-line-posion-is-error-do-not-know-what-reason-is/7588 "2022-01-07T06:56:16Z")

</div>

---

## [vtkProbeFilter fails in 2D](https://discourse.vtk.org/t/vtkprobefilter-fails-in-2d/7525)

<div class="topic-metadata">

**Author:** [@Danial\_Mohajery](https://discourse.vtk.org/u/Danial_Mohajery)\
**Replies:** 1\
**Last updated:** [January 7, 2022, 5:42am UTC](https://discourse.vtk.org/t/vtkprobefilter-fails-in-2d/7525 "2022-01-07T05:42:07Z")

</div>

Hi all, I am trying to probe a planar source (fig1) with a sector-like input (fig2), which is also planar. However, I get this weird output (fig 3). Here is my code: sector\_avg = True filler = vtk.vtkContourTriangulato…

---

## [Why there is a visual dislocation when I show two volume models in a window.](https://discourse.vtk.org/t/why-there-is-a-visual-dislocation-when-i-show-two-volume-models-in-a-window/7489)

<div class="topic-metadata">

**Author:** [@DDS](https://discourse.vtk.org/u/DDS)\
**Replies:** 1\
**Last updated:** [January 7, 2022, 1:06am UTC](https://discourse.vtk.org/t/why-there-is-a-visual-dislocation-when-i-show-two-volume-models-in-a-window/7489 "2022-01-07T01:06:57Z")

</div>

These two models have only displacement in the XY direction. But after rotating the view angle, it looks overlapping. How to make it right ? What below is the codes. I’m a beginner. Thanks for help. // Create a vt…

---

## [Filters with non-optional ports ?](https://discourse.vtk.org/t/filters-with-non-optional-ports/7583)

<div class="topic-metadata">

**Author:** [@Nicholas\_Yue](https://discourse.vtk.org/u/Nicholas_Yue)\
**Replies:** 2\
**Last updated:** [January 7, 2022, 12:48am UTC](https://discourse.vtk.org/t/filters-with-non-optional-ports/7583 "2022-01-07T00:48:30Z")

</div>

Hi, I am looking for vtkAlgorithm derived classes in VTK that requires two or more non-optional inputs ? Any recommendations ? At this stage of my VTK study, I am not after repeatable inputs yet. Cheers

---

## [vtkWindowedSincPolyDataFilter does NOT translate and scale the position coordinates back to the original coordinate frame](https://discourse.vtk.org/t/vtkwindowedsincpolydatafilter-does-not-translate-and-scale-the-position-coordinates-back-to-the-original-coordinate-frame/7561)

<div class="topic-metadata">

**Author:** [@Markus\_Heller](https://discourse.vtk.org/u/Markus_Heller)\
**Replies:** 7\
**Last updated:** [January 6, 2022, 6:34pm UTC](https://discourse.vtk.org/t/vtkwindowedsincpolydatafilter-does-not-translate-and-scale-the-position-coordinates-back-to-the-original-coordinate-frame/7561 "2022-01-06T18:34:21Z")

</div>

Hi, I noted a somewhat unexpected behavior when using the vtkWindowedSincPolyDataFilter. From the description of the filter, I expected that activation of the “NormalizeCoordinatesOn()” option should not affect the coor…

---

## [A potential bug for vtkPolyData](https://discourse.vtk.org/t/a-potential-bug-for-vtkpolydata/7562)

<div class="topic-metadata">

**Author:** [@zhang-qiang-github](https://discourse.vtk.org/u/zhang-qiang-github)\
**Replies:** 7\
**Last updated:** [January 6, 2022, 3:48pm UTC](https://discourse.vtk.org/t/a-potential-bug-for-vtkpolydata/7562 "2022-01-06T15:48:39Z")

</div>

I create a vtkPolyData, and I can display it. The code is: import vtkmodules.all as vtk import time def point(x, y, z): polyData = vtk.vtkPolyData() polyData.SetPoints(vtk.vtkPoints()) polyData.SetVerts(vtk…

---

## [How to accelerate render?](https://discourse.vtk.org/t/how-to-accelerate-render/7553)

<div class="topic-metadata">

**Author:** [@zhang-qiang-github](https://discourse.vtk.org/u/zhang-qiang-github)\
**Replies:** 3\
**Last updated:** [January 6, 2022, 1:22pm UTC](https://discourse.vtk.org/t/how-to-accelerate-render/7553 "2022-01-06T13:22:54Z")

</div>

If there are several actors in the vtk, is it possible to accelerate render by only render one actor? For example: // dong something to change actor1 renderWindow-\>Render(actor1); // or a similar method?

---

## [How can I convert Vtk STL polydata into opencascade poly\_triangulation and vise versa ?](https://discourse.vtk.org/t/how-can-i-convert-vtk-stl-polydata-into-opencascade-poly-triangulation-and-vise-versa/7568)

<div class="topic-metadata">

**Author:** [@osezer](https://discourse.vtk.org/u/osezer)\
**Replies:** 3\
**Last updated:** [January 6, 2022, 11:12am UTC](https://discourse.vtk.org/t/how-can-i-convert-vtk-stl-polydata-into-opencascade-poly-triangulation-and-vise-versa/7568 "2022-01-06T11:12:57Z")

</div>

Hello, I would like to convert opencascade’s poly\_triangulation(occt) into VTK polydata and visualize it, or otherway around as well. vtk polydata to poly\_triangulation (occt). I didn’t find any proper document or exam…

---

## [Add custom dataset associated to points d'un pointcloud](https://discourse.vtk.org/t/add-custom-dataset-associated-to-points-dun-pointcloud/7565)

<div class="topic-metadata">

**Author:** [@Julienchz](https://discourse.vtk.org/u/Julienchz)\
**Replies:** 0\
**Last updated:** [January 5, 2022, 8:55am UTC](https://discourse.vtk.org/t/add-custom-dataset-associated-to-points-dun-pointcloud/7565 "2022-01-05T08:55:51Z")

</div>

Hello, I want to associate data with each point of my pointcloud. To do that I know I could use a GetPointData()-\>SetScalars(…) from vtkPolyData but the active scalar of a vtkPointData corresponds to the color of the p…

---

## [Extent attributes in StructuredGrid](https://discourse.vtk.org/t/extent-attributes-in-structuredgrid/7472)

<div class="topic-metadata">

**Author:** [@Toha](https://discourse.vtk.org/u/Toha)\
**Replies:** 4\
**Last updated:** [January 5, 2022, 8:00am UTC](https://discourse.vtk.org/t/extent-attributes-in-structuredgrid/7472 "2022-01-05T08:00:35Z")

</div>

Dear users, I am trying to output my numerical simulation data in vtk format. My grid is structured and I need to use the VTK’s XML format. My greatest confusion is about the WholeExtent and the Piece Extent attribute…

---

## [model data structure in vtk.js, please explain please help](https://discourse.vtk.org/t/model-data-structure-in-vtk-js-please-explain-please-help/6377)

<div class="topic-metadata">

**Author:** [@gzt036](https://discourse.vtk.org/u/gzt036)\
**Replies:** 10\
**Last updated:** [January 4, 2022, 5:05pm UTC](https://discourse.vtk.org/t/model-data-structure-in-vtk-js-please-explain-please-help/6377 "2022-01-04T17:05:05Z")

</div>

Please explain the vtk.js data structure, expecially how ‘model’ is used. For example, const range = imageData.getPointData().getScalars().getRange(); if you go through debugger, you can see imageData is a bunch of usel…

---

## [Interacting with slices in layered Renderers](https://discourse.vtk.org/t/interacting-with-slices-in-layered-renderers/7557)

<div class="topic-metadata">

**Author:** [@Valentin\_Regueiro](https://discourse.vtk.org/u/Valentin_Regueiro)\
**Replies:** 0\
**Last updated:** [January 4, 2022, 12:10pm UTC](https://discourse.vtk.org/t/interacting-with-slices-in-layered-renderers/7557 "2022-01-04T12:10:21Z")

</div>

Hi everyone, my project is using a vtkImageViewer2 with two renderers used to display volume slices. One renderer has a blend of ImageData (PET scans), the other one is used to superimpose segmentated parts (vtkActors)…

[Previous page](https://discourse.vtk.org/latest.md?page=146)

[Next page](https://discourse.vtk.org/latest.md?page=148)
