w2if->GetOutput()->GetPointData()->GetArray(0) will return the
vtkDataArray storing the pixel information.  Then you can use it's
"GetVoidPointer" function to get a pointer to the beginning of the
data. <br>
<br>
But I *STRONGLY* recommend you reconsider what you're doing, and try to
keep it in the standard VTK Pipeline interface.&nbsp; Dealing with the
pointer directly can lead to all kinds of nastiness &amp;
problems.&nbsp; The vtkImagedata that the w2if filter generates can be
handed off to any of the Image filters to do processing, storage, or
computation.<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>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><span class="q">
<div><strong></strong>&nbsp;</div>
<div><strong>Isa</strong></div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div><br><br><b><i>Randall Hand &lt;<a href="mailto:randall.hand@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">randall.hand@gmail.com</a>&gt;</i></b> a écrit :</div></span><div><span class="e" id="q_1045d61a7410e923_2">

<blockquote style="border-left: 2px solid rgb(16, 16, 255); padding-left: 5px; margin-left: 5px;">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" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">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" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">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>
<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 href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://www.vtk.org/Wiki/VTK_FAQ</a><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">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/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.yeraze.com</a> </blockquote></span></div>
<p>
                </p><hr size="1"><span class="q"> 
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> 
 

</span><p></p></blockquote></div><br><br><br>-- <br>Randall Hand<br><a href="http://www.yeraze.com">http://www.yeraze.com</a>