There are a couple of more, see for example:
- https://lorensen.github.io/VTKExamples/site/Cxx/Points/ExtractSurface/
- https://lorensen.github.io/VTKExamples/site/Cxx/Points/PoissonExtractSurface/
- https://lorensen.github.io/VTKExamples/site/Cxx/Points/PowercrustExtractSurface/
- https://lorensen.github.io/VTKExamples/site/Cxx/Points/ExtractSurfaceDemo/
You may use vtkDepthImageToPointCloud filter to create point cloud from your depth image.
They work as expected. You just have to be careful not to delete or modify memory layout of a buffer that is used in both VTK and numpy (I don’t think they can notify each other about the change). In general, it is not worth spending a lot of time with maintaining a shared buffer and easier to just deep-copy the data instead. However, if performance is critical then using shared buffers may be the better choice, despite the additional complexity.