<div dir="ltr"><div>Hi Mathieu,</div><div>Thank you for the response, I am already calling renderWindow->Render(). I tried reading the front, back, left and right buffers but am still unable to get any data from the call. If it helps, I am not using shaders, color points, or opacity the blending mode is composite, it is rendered by the gpu.</div><div><br></div><div>Linghai <br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 25, 2018 at 3:52 AM, Mathieu Westphal <span dir="ltr"><<a href="mailto:mathieu.westphal@kitware.com" target="_blank">mathieu.westphal@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi LingHai<div><br></div><div>Make sure you have rendered into the renderWindow first. (renderWindow->Render())</div><div>And try to read from the front and the back buffer.</div><div><br></div><div>Best regards,</div></div><div class="gmail_extra"><br clear="all"><div><div class="m_-6689973853491295523gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Mathieu Westphal<br></div></div></div>
<br><div class="gmail_quote"><div><div class="h5">On Tue, Jul 24, 2018 at 7:57 PM, ling Hai <span dir="ltr"><<a href="mailto:qyaoza@gmail.com" target="_blank">qyaoza@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div>Hi,</div><div>I am new to vtk and I am trying to get the front framebuffer from the renderwindow like this:</div><div>int * dim = renderWindow->GetSize();<br>unsigned char* pixels = renderWindow->GetPixelData(0,0<wbr>,dim[0]-1,dim[1]-1,true);</div><div><br></div><div>but in pixels there is only a null value. I am using this on a 3d render if that makes a difference the above segment of code called after rendering the volume. What am I missing? Any help is appreciated thanks.</div><div>Linghai<br></div></div>
<br></div></div>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FA<wbr>Q</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">https://public.kitware.com/mai<wbr>lman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>