<html>
<body>
Use the vtkImageData::GetScalarPointer method.<br><br>
- Amy<br><br>
At 03:16 PM 6/8/2005, Renaud Isabelle wrote:<br>
<blockquote type=cite class=cite cite="">Hi,<br>
&nbsp;<br>
thanks for your reply. I check out your filter. This could be a good
idea. All I will have to do is: <br>
&nbsp;<br>
# Will render in memory.<br>
renWin-&gt;OffScreenRenderingOn();<br>
renWin-&gt;Render();<br>
&nbsp;<br>
vtkWindowToImageFilter w2if;<br>
w2if-&gt;SetInput(renWin);<br>
&nbsp;<br>
Ok. And I will have a 2D vtkImageData object. <br>
&nbsp;<br>
<b>But then, how can I have to pointer of the pixel data of this
vtkImageData object?<br>
</b>&nbsp;<br>
<b>Isa<br>
</b>&nbsp;<br>
&nbsp;<br><br>
<br>
<b><i>Randall Hand &lt;randall.hand@gmail.com&gt;</i></b> a écrit :<br>

<dl>
<dd>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>

<dd>
<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>

<dd>On 6/8/05, Renaud Isabelle</b>
&lt;<a href="mailto:renauisa@yahoo.fr">renauisa@yahoo.fr</a>&gt; wrote:
<br>

<dl>
<dd>I'm got really crazy</b>. I don't manage to use double buffering</b>
in order to avoid flickering</b> on screen.<br>

<dd>&nbsp;<br>

<dd>I'm using ImageSliceViewer</b> to render a 2D slice of my 3D image on
screen</b>. It works well without double buffering except for flickering
on screen.<br>

<dd>&nbsp;<br>

<dd>I have already use double buffering in MFC and I have a class CMemDC
that works fine to use memory buffering. <br>

<dd>&nbsp;<br>

<dd>-&gt; All I need is a method to get the pixel data of my 2D slice
displayed on screen</b>.Then I can use it to create a DIB Bitmap from
what is rendered off screen.&nbsp; <br>

<dd>&nbsp;<br>

<dd>I found the example of rendering in MFC and I tried the series of
instructions:<br>

<dd>&nbsp;<br>

<dd>this-&gt;window-&gt;SetupMemoryRendering(x,y,hdc);<br>

<dd>this-&gt;window-&gt;Render();<br>

<dd>StretchBlt(dc,0,0,x,y,memDC,0,0,x,y,SRCCOPY);<br>

<dd>this-&gt;window-&gt;ResumeScreenRendering();<br>
</b>
<dd>&nbsp;<br>

<dd>but all is displayed is a white </b>page. Especially because during
process, unsigned char* MemoryData</b> should be NULL.<br>

<dd>&nbsp;<br>

<dd>Please help me. <br>

<dd>&nbsp;<br>

<dd>&nbsp;<br>

<dd>&nbsp;<br><br>
<br>

<dd>Découvrez le nouveau Yahoo! Mail : <font color="#FF0000">1 Go
d'espace</font> de stockage pour vos mails, photos et vidéos !<br>

<dd>
<a href="http://us.rd.yahoo.com/mail_fr/mail_campaigns/splash/taglines_1go/default/*http://fr.promotions.yahoo.com/mail/creer28.html">
Créez votre Yahoo! Mail</a> <br><br>
<br>

<dd>_______________________________________________<br>

<dd>This is the private VTK discussion list.<br>

<dd>Please keep messages on-topic. Check the FAQ at:
<a href="http://www.vtk.org/Wiki/VTK_FAQ">
http://www.vtk.org/Wiki/VTK_FAQ</a><br>

<dd>Follow this link to subscribe/unsubscribe:<br>

<dd><a href="http://www.vtk.org/mailman/listinfo/vtkusers">
http://www.vtk.org/mailman/listinfo/vtkusers </a><br><br>
<br>

</dl><br><br>
<br>

<dd>-- <br>

<dd>Randall Hand<br>

<dd><a href="http://www.yeraze.com/">http://www.yeraze.com</a> <br><br>

</dl><br>
Découvrez le nouveau Yahoo! Mail : <font color="#FF0000">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">
Créez votre Yahoo! Mail</a> <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" eudora="autourl">
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" eudora="autourl">
http://www.vtk.org/mailman/listinfo/vtkusers</a></blockquote></body>
</html>