[vtkusers] Polydata to Image

tom fogal tfogal at apollo.sr.unh.edu
Thu Sep 23 17:44:05 EDT 2004


Sorry for not sending my last one to vtkusers...

 <BAY10-DAV32PBOUbYAG00004386 at hotmail.com>"Bernhard Mayrhofer" writes:
>Thanks for yur answer
>
>vtkWindowToImageFilter works fine. I want to get images of different viewing 
>directions. I use vtkCamera for this. I tried with   GetPosition, 
>SetFocalPoint,.. but it seems i do something wrong. I never get images of 
>same scale with an defined point in the middle.

Hrm. It sounds like the new camera position/focal point isn't getting
used correctly? Have you already tried putting updates in your code?

Otherwise I'm not quite sure... maybe you could include some sample
code where you manipulate the camera && then use the W2I filter, and/or
describe the problems with the 2nd, 3rd, ..., Nth images, and that
would help someone on the list in recognizing your problem...

-tom

>>
>>>I wrote some Code to get an image of a surface where i stored the color =
>>>in scalars. I search for the closest point from the centre of the image =
>>>(i use ann because it=B4s faster than vtkpointfinder). i transform the =
>>>coordinates to  x y which i store in an 2dim array. This code works but =
>>>i =B4m not satisfied. The output of the renderer on the screen is much =
>>>better than the image i created. So, maybe you have some ideas to =
>>>optimize following code.
>>
>> ANN? Are you just trying to dump exactly what you see on the screen
>> into an image file?
>>
>> If so I would suggest you look at vtkWindowToImageFilter. Its fast
>> enough, especially compared to what you're doing below =)
>>
>> -tom
>>
>> <snip>
>> 



More information about the vtkusers mailing list