<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2800.1458" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I have a problem in picking a point in the
viewport. What I do is to click one point in the window and try to get the
coordiate in world system. After click the mouse, I can get the x, y position,
then .</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> float pos[3], z = 0;<BR>
vtkWorldPointPicker* picker = vtkWorldPointPicker::New();<BR>//
vtkPropPicker* picker = vtkPropPicker::New();</FONT></DIV>
<DIV><FONT face=Arial size=2> picker->Pick(x, y, z, m_Renderer);
<BR> picker->GetPickPosition(pos);<BR></FONT></DIV>
<DIV><FONT face=Arial size=2> I found that regardless where I click the
point, they will respond the same Zbuffer value. I check using with the
following code</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> float z2 = m_Renderer->GetZ(x,
y);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>So I found the return value of z2 is always 1.0
regardless of x and y. Feel strange about it, anyone has some code to get
the world coordinate from selected point in the viewport?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Thanks</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>---------------------------------------------------------------------------------------------------<BR>Hui
Zhang (James), Ph.D. </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Imaging Science and Information Systems (ISIS)
Center<BR>Radiology Department, Georgetown University Medical
Center <BR>2115 Wisconsin Avenue, Suite 603, Washington,
DC 20007 </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Office: 202-687-2902<BR>Cell: 240-643-7103<BR>Fax:
202-784-3479<BR>Web: <A
href="http://www.isis.georgetown.edu">www.isis.georgetown.edu</A><BR>Email: <A
href="mailto:zhang@isis.imac.georgetown.edu">zhang@isis.imac.georgetown.edu</A><BR>---------------------------------------------------------------------------------------------------<BR></FONT></DIV></BODY></HTML>