to get the screen image, you can use vtkWindowToImageFilter.. that'll
turn the screen display into a 2d vtkImageData object that you can pass
to other VTK filters (or in my case, vtkPNGWriter).<br>
<br>
<a href="http://www.vtk.org/doc/nightly/html/classvtkWindowToImageFilter.html">http://www.vtk.org/doc/nightly/html/classvtkWindowToImageFilter.html</a><br>
<br>
<br><br><div><span class="gmail_quote">On 6/8/05, <b class="gmail_sendername">Renaud Isabelle</b> &lt;<a href="mailto:renauisa@yahoo.fr">renauisa@yahoo.fr</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>I'm got really <strong>crazy</strong>. I don't manage to use <strong>double buffering</strong> in order to <strong>avoid flickering</strong> on screen.</div>
<div>&nbsp;</div>
<div>I'm using <strong>ImageSliceViewer</strong> <strong>to render a 2D slice of my 3D image on screen</strong>. It works well without double buffering except for flickering on screen.</div>
<div>&nbsp;</div>
<div>I have already use double buffering in MFC and I have a class CMemDC that works fine to use memory buffering. </div>
<div>&nbsp;</div>
<div><strong>-&gt; All I need is a method to get the pixel data of my 2D slice displayed on screen</strong>.Then I can use it to create a DIB Bitmap from what is rendered off screen. &nbsp;</div>
<div>&nbsp;</div>
<div>I found the example of rendering in MFC and I tried the series of instructions:</div>
<div>&nbsp;</div>
<div><strong>this-&gt;window-&gt;SetupMemoryRendering(x,y,hdc);</strong></div>
<div><strong>this-&gt;window-&gt;Render();</strong></div>
<div><strong>StretchBlt(dc,0,0,x,y,memDC,0,0,x,y,SRCCOPY);</strong></div>
<div><strong>this-&gt;window-&gt;ResumeScreenRendering();</strong></div>
<div>&nbsp;</div>
<div>but all is displayed is a <strong>white </strong>page. Especially because during process, <strong>unsigned char* MemoryData</strong> should be NULL.</div>
<div>&nbsp;</div>
<div>Please help me. </div><span class="ad">
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>&nbsp;</div><p>
                </p><hr size="1"> 
Découvrez le nouveau Yahoo! Mail : <font color="red">1 Go d'espace</font> de stockage pour vos mails, photos et vidéos !<br><a href="http://us.rd.yahoo.com/mail_fr/mail_campaigns/splash/taglines_1go/default/*http://fr.promotions.yahoo.com/mail/creer28.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Créez votre Yahoo! Mail</a> 
 

<p></p></span><br>_______________________________________________<br>This is the private VTK discussion list.<br>Please keep messages on-topic. Check the FAQ at: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">
http://www.vtk.org/Wiki/VTK_FAQ</a><br>Follow this link to subscribe/unsubscribe:<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers
</a><br><br><br></blockquote></div><br><br><br>-- <br>Randall Hand<br><a href="http://www.yeraze.com">http://www.yeraze.com</a>