# Improvement to vtkDepthImageToPointCloud

**URL:** https://discourse.vtk.org/t/improvement-to-vtkdepthimagetopointcloud/11503
**Category:** Development
**Created:** [May 21, 2023, 8:44pm UTC](https://discourse.vtk.org/t/improvement-to-vtkdepthimagetopointcloud/11503 "2023-05-21T20:44:54Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Jens\_Munk\_Hansen](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jens_munk_hansen/32/1215_2.png) [@Jens\_Munk\_Hansen](https://discourse.vtk.org/u/Jens_Munk_Hansen)
#### Post date: [May 21, 2023, 8:44pm UTC](https://discourse.vtk.org/t/improvement-to-vtkdepthimagetopointcloud/11503/1 "2023-05-21T20:44:54Z")

</div>

Hi guys

I have made a new class `vtkRendererToRectilinearGrid`. It can be used for generating a grid output, where the depth coordinate is an attribute ZValues. The output can be passed to a `vtkWarpScalar` to generate a structured grid. It can be used for generating synthetic data for an in-scene camera - very useful for simulating images for 3D reconstruction.

During my investigation, I found that it could be of interest to expose also a property "CenterPointsAtPixels’ for the filter `vtkDepthImageToPointCloud` and also allow to output in either View, Pose or WorldCoordinates (this can be done quite elegantly using different matrices for the mapping). Would it be of interest if I add this to the existing `vtkDepthImageToPointCloud`?

I made my new class since I still cannot make a setup where `vtkDepthImageToPointCloud` correctly updates. I should look into this, since by adding the extra functionality, it will satisfy my needs.

Also, I would really appreciate if someone have an explanation for why hiding cells in structured data is not respected by the rendering anymore. As you can see on the image, I would like to flag cells and points (HIDDEN) when depth is ‘culled’.

![image](https://discourse.vtk.org/uploads/default/original/2X/2/21521c85f94c6a4c2dc04e92a7060daf838b4cc6.png)

I have added a PR for the new features [https://gitlab.kitware.com/vtk/vtk/-/merge\_requests/10220](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/10220)

[https://discourse.vtk.org/t/hidden-structured-data-shown-anyway-bug/11482](https://discourse.vtk.org/t/hidden-structured-data-shown-anyway-bug/11482)
