I try to get the zBuffer Values from my vtkRenderWindow with renWin->GetZbufferData(x1,y1,x2,y2) and it works fine, if I print the Image to file I get this :
But as soon as I add a Camera to my renderer it doesnt work anymore and I get this as result:
Can someone help me?
I used this example https://vtk.org/Wiki/VTK/Examples/Cxx/Utilities/ZBuffer
This is an issue with the near/far plane of your camera.
Try to call
still the same Problem even if I use
I have the following Setup:
camera->SetPosition(x, y, z);
I found a solution:
The camera position must be after renderWindow-> Render (); has been called.