<DIV>Hi,</DIV>
<DIV>&nbsp;</DIV>
<DIV>thanks for your reply. I check out&nbsp;your filter. This could be a good idea. All I will have to do is: </DIV>
<DIV>&nbsp;</DIV>
<DIV># Will render in memory.<BR>renWin-&gt;OffScreenRenderingOn();</DIV>
<DIV>renWin-&gt;Render();</DIV>
<DIV>&nbsp;</DIV>
<DIV>vtkWindowToImageFilter w2if;<BR>w2if-&gt;SetInput(renWin);</DIV>
<DIV>&nbsp;</DIV>
<DIV>Ok. And I will have a 2D vtkImageData object. </DIV>
<DIV>&nbsp;</DIV>
<DIV><STRONG>But then, how can I&nbsp;have to pointer of the pixel data of this vtkImageData object?</STRONG></DIV>
<DIV><STRONG></STRONG>&nbsp;</DIV>
<DIV><STRONG>Isa</STRONG></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR><BR><B><I>Randall Hand &lt;randall.hand@gmail.com&gt;</I></B> a écrit :</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">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="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<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 onclick="return top.js.OpenExtLink(window,event,this)" href="http://us.rd.yahoo.com/mail_fr/mail_campaigns/splash/taglines_1go/default/*http://fr.promotions.yahoo.com/mail/creer28.html" target=_blank>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> </BLOCKQUOTE><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">Créez votre Yahoo! Mail</a>