Lincac
(Lincac)
1
What I obtained using the following method is clearly incorrect
auto windowToImageFilter = vtkSmartPointer<vtkWindowToImageFilter>::New();
windowToImageFilter->SetInputBufferTypeToZBuffer();
windowToImageFilter->SetInput(window);
windowToImageFilter->Update();
jaswantp
(Jaswant Panchumarti (Kitware))
2
Hello @Lincac
You can easily get the Z buffer data like this:
vtkNew<vtkFloatArray> depthValues;
int* size = window->GetSize();
window->GetZBufferData(0, size[0] - 1, 0, size[1] - 1, depthValues);