Hi,<br>
I am not sure if this will help, but try to add img->Update() after the GetPixelData() method.<br>
Next time please put more of your code. 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> <<a href="mailto:hgl@ece.arizona.edu">hgl@ece.arizona.edu</a>> 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> I am trying to write out some rendered images using vtk. I used<br>"GetPixelData" method with "Medical2" 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> for (i = 0; i < 1; ++i)<br> {<br> // render the image<br> renWin->Render();<br> img = renWin->GetPixelData(0, 0, 639, 479, 1);<br> // rotate the active camera by one degree<br> aRenderer->GetActiveCamera()->Azimuth( 1 );
<br> }<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>