# Depth Map Calculation from pvbatch

**URL:** https://discourse.paraview.org/t/depth-map-calculation-from-pvbatch/15256
**Category:** ParaView Support
**Created:** [August 19, 2024, 5:06pm UTC](https://discourse.paraview.org/t/depth-map-calculation-from-pvbatch/15256 "2024-08-19T17:06:17Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![bloerp](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/bc79bd/32.png) [@bloerp](https://discourse.paraview.org/u/bloerp)
#### Post date: [August 19, 2024, 5:06pm UTC](https://discourse.paraview.org/t/depth-map-calculation-from-pvbatch/15256/1 "2024-08-19T17:06:17Z")

</div>

I am using the following code to get a depth map of my scene. Which works! But even though i used “OrientationAxesVisibility = 0” there is a big square where the orientation axis used to be, with no depth values. Likely because this is some overlay, which is just invisible, but blocks the depth calculation. What could i use to also get depth values in that region.

```auto
import vtk

view = GetActiveView().GetRenderWindow()
view.OrientationAxesVisibility = 0
w2i = vtk.vtkWindowToImageFilter()
w2i.SetInputBufferTypeToZBuffer ()
w2i.SetInput(view)
w2i.Update()

writer = vtk.vtkXMLImageDataWriter()
writer.SetInputConnection(w2i.GetOutputPort())
writer.SetFileName("./depthmap.vti")

view.Render()
writer.Write()

```
