[vtkusers] Using "GetPixelData" method

Andres Munarriz munarriz.a at gmail.com
Wed Oct 11 17:57:57 EDT 2006


Hi Hari,

Please search the VTK users archive for "Get Pixel Intensity".  This
should refer you to a post I placed with a similar question to which I
got a great answer.


Regards,
Andres E. Munarriz Soto

On 10/11/06, hariharan ganesh lalgudi <hgl at ece.arizona.edu> wrote:
>
> 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.
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>


-- 
-æ- Andrés E. Munarriz Soto -æ-



More information about the vtkusers mailing list