[vtkusers] Using "GetPixelData" method

hariharan ganesh lalgudi hgl at ece.arizona.edu
Wed Oct 11 14:09:48 EDT 2006


Hii,

   I am trying to write out some rendered images using vtk. I used 
"GetPixelData" method with "Medical2" example (altered code below). But 
the values I get are all zeros. However I do get the image on the screen. 
I looked at the mailing archive. This problem has been posted before. But I couldn't find 
the solution/correct way to acheive this. It would very helpful if I can 
get some suggestions.

Thanks
Hari

....
   for (i = 0; i < 1; ++i)
     {
     // render the image
     renWin->Render();
      img = renWin->GetPixelData(0, 0, 639, 479, 1);
     // rotate the active camera by one degree
     aRenderer->GetActiveCamera()->Azimuth( 1 );
     }
....

--------------------------------
Hariharan G Lalgudi
Graduate Student
Electrical and Computer Engineering
University of Arizona.




More information about the vtkusers mailing list