[vtkusers] URGENT:Getting world coordinates for any pixel in Render window
shrinivas kulkarni
kshrinivas at operamail.com
Mon Apr 5 05:09:41 EDT 2004
Hi All,
Is there any way to get the world point for any pixel in Render window, even if it is not part of object being drawn. To explain more, attached is the image which describes my problem:
I want to convert points 1,2,3,4 and 5,6,7,8 to world coordinates and check which vertices lie in that region.
This is what I precisely want to do:
User is allowed to make selection in render window, this can be rectangualr OR Free hand selection. Once this is done, then user can do selective processing of data.
I tried using:
pRenderer->SetDisplayPoint(selectionX, selectionY, selectionZ);
pRenderer->DisplayToWorld();
worldCoords = pRenderer->GetWorldPoint();
But when I take this transformed point and check for the points in mesh for whether they are "inside region" or not, the test fails even for the points which lie in the region. Therefore, I did some analysis and found that z-depth value is not available for the pixels which are not affected by object rendering. By this I mean to say for the points which are not part of the object.
--
_____________________________________________________________
Web-based SMS services available at http://www.operamail.com.
>From your mailbox to local or overseas cell phones.
Powered by Outblaze
-------------- next part --------------
A non-text attachment was scrubbed...
Name: selection3.JPG
Type: image/jpeg
Size: 15325 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040405/4c6fd3e8/attachment.jpeg>
More information about the vtkusers
mailing list