<div dir="ltr"><br>Do you know that you may specify actor not pickable?<br><a class="" href="http://www.vtk.org/doc/nightly/html/classvtkProp.html#ad32346f0598b93698d9bcf501a1526ef">PickableOff</a> ()<br><div class="gmail_extra">
And it will be ignored during picking operation.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Alex<br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 13, 2013 at 7:49 AM, Max <span dir="ltr">&lt;<a href="mailto:smapersmaper@gmail.com" target="_blank">smapersmaper@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear VTKers,<br>
I need to pick an object that is located inside another object.<br>
How can i do it?<br>
The code for picking now is:<br>
<br>
private void LineActor_LeftButtonPressEvt(vtkObject sender,<br>
vtkObjectEventArgs e)<br>
        {<br>
            vtkInteractorStyle style = (vtkInteractorStyle)e.Caller;<br>
            int[] clickPos = style.GetInteractor().GetEventPosition();<br>
<br>
            vtkPropPicker picker = new vtkPropPicker();<br>
            picker.Pick(clickPos[0], clickPos[1], 0, firstLayerRenderer);<br>
            if (picker.GetActor() != null)<br>
            {<br>
                vtkAlgorithm algorithm =<br>
picker.GetActor().GetMapper().GetInputConnection(0,0).GetProducer();<br>
                vtkTubeFilter lineSource = algorithm as vtkTubeFilter;<br>
                if (lineSource != null)<br>
                {<br>
                    string label = lineSource.GetProgressText();<br>
                    foreach (VTKBiopsy biopsy in biopsies)<br>
                    {<br>
                        if<br>
(label.Equals(biopsy.BiopsyLabel.TextLabel.Label))<br>
                        {<br>
                            biopsy.Selected = biopsy.Selected == true ?<br>
false : true;<br>
                        }<br>
                    }<br>
                }<br>
<br>
But when an object is inside another one, it returns vtkAlgorithm of the<br>
outside object...<br>
<br>
Thank you,<br>
Max<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Pick-object-inside-another-object-tp5721376.html" target="_blank">http://vtk.1045678.n5.nabble.com/Pick-object-inside-another-object-tp5721376.html</a><br>

Sent from the VTK - Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br></div></div>