[vtkusers] URGENT:Getting world coordinates for any pixel in Render window
Veerapuram Varadhan
v.varadhan at californiadigital.com
Mon Apr 5 08:27:25 EDT 2004
Hi,
IIRC, in your MouseAction handler, what ever x and y that you receive will
be in World Co-ordinates only. Say for example, in Paraview, the function
vtkPVWindow::MouseAction(), handles the mouse events. The parameters x
and y of this function represents the x and y location of the mouse event
that occurred in the window. Likewise, whatever is your callback set for
your mouse action, the x and y of that action will be in
world-coordinates.
HTH,
Plese correct me if i am wrong.
--
V. Varadhan.
> 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
>
More information about the vtkusers
mailing list