<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Dear all <br><br>I'm extracting the depth map and the png image from paraview and I want both of them to be the same size which is 1600*1600<br><br>any way I did something like this<br><br>file_load = XDMFReader( FileName= ...... )<br><br>Applied some filters then <br><br>RenderView = GetRenderView()<br><br><br><br># to get the dpeth map I did the following <br><br>view = GetActiveView().GetRenderWindow()<br>view.SetSize(1600,1600)<br>w2i = vtkWindowToImageFilter()<br>w2i.SetInputBufferTypeToZBuffer ()<br>w2i.SetInput(view)<br>w2i.Update()<br>out = w2i.GetOutput()<br>p =out.GetPointData()<br>a = p.GetArray(0)<br>final_a = vtk_to_numpy(a) <br><br>so final_a is my depth map and it is 1600*1600 but when I try to save the image using this command <br><br>RenderView.WriteImage("data.png","vtkPNGWriter",1)<br><br><br>it gives me an image with the size of 1600*1359<br><br>the command was woking fine until I used view.SetSize(1600,1600)<br><br>so is there a way to fix that ?<br>                                            </div></body>
</html>