<P>&nbsp;Hi, Krs: 
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Because I use java and vtkPanel, I need not associate a vtkPicker with an interactor, in fact, there is no interactor in java-vtk program at all. I have tried picking other normal actors such as cone or sphere in the same way, it works well. So I think there is no any problem with vtkPicker. One possible reason maybe vtkTensorGlyph ( or even vtkGlyph2D and vtkGlyph3D ) is incomptible with vtkPicker.( ? ) However, I know from the mail list that some people can pick objects of glyph, and there is also a possible way to figure out which glyph object I have picked even if all of the glyph objects are rendered with only one actor. 
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;So have you any&nbsp;idea ?&nbsp; Thanks a lot. 
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Below are some abstract of the relative mail list: 
<P>////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 
<P>"&nbsp; Hi Jiaye-<BR><BR>Pick the point with the point picker, get a point id.<BR><BR>Use this point id to get the value of input point id, something like:<BR>vtkDataArray *inputIds = <BR>glyph-&gt;GetOutput()-&gt;GetPointData()-&gt;GetArray("InputPointIds");<BR>inputId = inputIds-&gt;GetTuple1(pickedId);<BR><BR>You have to have the latest vtk4.0 for this to work.<BR><BR>Will&nbsp; "</P>
<P>///////////////////////////////////////////////////////////////////////////////////////////////////////////////////</P>
<P>"<BR>&gt;<I>There is a method in vtkGlyph3D and vtkGlyph2D (very recently added) called<BR></I>&gt;<I>GeneratePointIdsOn/Off. This causes the glyphers to generate a field of ids<BR></I>&gt;<I>associated with each output point. Then if you use a pointpicker or<BR></I>&gt;<I>cellpicker to pick a point (from the output of the glyph), you can then use<BR></I>&gt;<I>the picked point id to index into the generated point ids. You'll have to<BR></I>&gt;<I>get the nightly release or use CVS to get this feature.<BR></I>&gt;<I><BR></I>&gt;<I>Will<BR></I>"</P>
<P>//////////////////////////////////////////////////////////////////////////////////////////////////////////////<BR>"Hi Malcolm,<BR><BR>&nbsp; Thanks for the reply. I looked at vtkProgrammableGlyphFilter. I think I<BR>understand what's going on. Following the tcl example included in the<BR>distribution, I used vtkTransform, vtkTransformPolyDataFilter, and<BR>vtkProgrammableGlyphFilter. I am using Java, so when it comes to setting the<BR>GlyphMethod, I am lost at mapping to Java code. (I'm not sure how I can pass<BR>the address of a method, since in C++ I could use &amp;proc_name, but I don't<BR>have an &amp; in Java)<BR>Anyway, leaving implementation issue behind, do I seem to be on the right<BR>track though? Back to the implementation issue, would you happen to be using<BR>Java, or something other than tcl? If so, would you have any suggestions on<BR>how this can be approached? Thank you for your help.<BR><BR>jiaye<BR>"&nbsp;</P>
<P>/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////</P>
<P>"Hi Jiaye<BR><BR>I use spheres to represent multiple seismic events with one actor. I get =<BR>around picking by using a programmable glyph filter and building a =<BR>lookup-table based on cell-ids on each iteration of the GlyphMethod. =<BR>When you do a pick on the actor you can then get the id of your input =<BR>point from the id of the picked cell.<BR>=20<BR>I hope this helps<BR>"</P>
<P>Best Wishes 
<P> 
<P>Lian 
<P> 
<P>&nbsp; <B><I>"K.R.Subramanian" &lt;krs@cs.uncc.edu&gt;</I></B> wrote: 
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Lian:<BR><BR>You create a vtkPointPicker and then assign it to the interactor. Then you write<BR>a callback function. As I have done in one of my applications which is<BR>reproduced below; here<BR>I am determining the position of the picked point. There should be a method<BR>to also return the actor that was picked.<BR><BR>Hope that helps.<BR><BR>-- krs<BR><BR><BR><BR>void ivus3dPick (void *arg)<BR>{<BR><BR>vtkXRenderWindowInteractor<BR>*interactor = (vtkXRenderWindowInteractor *) arg;<BR><BR>vtkPointPicker *picker = (vtkPointPicker *) interactor-&gt;GetPicker();<BR><BR>if (picker-&gt;GetPointId() &gt;= 0)<BR>{<BR>cout &lt;&lt; "Point id: " &lt;&lt; picker-&gt;GetPointId() &lt;&lt; "\n" &lt;&lt; flush;<BR><BR>float *a = picker-&gt;GetPickPosition();<BR><BR>cout &lt;&lt; "Pick Position: " &lt;&lt; a[0] &lt;&lt;"," &lt;&lt; a[1] &lt;&lt;"," &lt;&lt; a[2]<BR>&lt;&lt; endl &lt;&lt; flush;<BR><BR><BR>}<BR><BR>interactor-&gt;GetRenderWindow()-&gt;Render();<BR>}<BR><BR>*************<BR><BR>What you are doing is call the Pick method directly - this should also do<BR>something similar - what I show above is interactive picking using the mouse<BR>(in the default bindings, placing the mouse over the object and hitting the key 'p'<BR>should call the above function and output the position coordinates.) Of course,<BR>if the ray doesnt hit anything, then you will return a negative value..<BR><BR>Hope that helps.<BR><BR>-- krs<BR><BR>--<BR>K.R.Subramanian Phone: (704) 687-4872<BR>Department of Computer Science FAX: (704) 687-4893<BR>UNC Charlotte, CARC 311 Email: krs@cs.uncc.edu<BR>Charlotte, NC 28223-0001 Web: http://www.cs.uncc.edu/~krs<BR><BR><BR></BLOCKQUOTE><p><br><hr size=1><b>Do You Yahoo!?</b><br>
<a href="$rd_url/tag/http://movies.yahoo.com/">Yahoo! Movies</a> - coverage of the 74th Academy Awards®