Hi,<br>

&nbsp;I am not sure if this will help, but try to add img-&gt;Update()&nbsp; after the GetPixelData() method.<br>

Next time&nbsp; please put more of your code.&nbsp; That will help to understand what you are in for.<br>

thh. <br><br><div><span class="gmail_quote">On 10/12/06, <b class="gmail_sendername">hariharan ganesh lalgudi</b> &lt;<a href="mailto:hgl@ece.arizona.edu">hgl@ece.arizona.edu</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;">
<br>Hii,<br><br>&nbsp;&nbsp; I am trying to write out some rendered images using vtk. I used<br>&quot;GetPixelData&quot; method with &quot;Medical2&quot; example (altered code below). But<br>the values I get are all zeros. However I do get the image on the screen.
<br>I looked at the mailing archive. This problem has been posted before. But I couldn't find<br>the solution/correct way to acheive this. It would very helpful if I can<br>get some suggestions.<br><br>Thanks<br>Hari<br><br>
....<br>&nbsp;&nbsp; for (i = 0; i &lt; 1; ++i)<br>&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp; // render the image<br>&nbsp;&nbsp;&nbsp;&nbsp; renWin-&gt;Render();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;img = renWin-&gt;GetPixelData(0, 0, 639, 479, 1);<br>&nbsp;&nbsp;&nbsp;&nbsp; // rotate the active camera by one degree<br>&nbsp;&nbsp;&nbsp;&nbsp; aRenderer-&gt;GetActiveCamera()-&gt;Azimuth( 1 );
<br>&nbsp;&nbsp;&nbsp;&nbsp; }<br>....<br><br>--------------------------------<br>Hariharan G Lalgudi<br>Graduate Student<br>Electrical and Computer Engineering<br>University of Arizona.<br><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">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">http://www.vtk.org/mailman/listinfo/vtkusers</a><br></blockquote></div><br>