Oops. Forgot the link there:<br><br><a href="http://public.kitware.com/pipermail/vtkusers/2004-October/077010.html">http://public.kitware.com/pipermail/vtkusers/2004-October/077010.html</a><br><br><div><span class="gmail_quote">
On 03/10/06, <b class="gmail_sendername">Anja Ende</b> <<a href="mailto:anja.ende@googlemail.com">anja.ende@googlemail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Looks like another person had the same problem.<br><br>However, that thread has no further replies :((( but this is the exact behavior that I am experiencing. <br><br>Any experts here who have successfully implemented picking on 2D actors that are rendered on top of each other?
<div><span class="e" id="q_10e0f174a8107325_1"><br><br>Cheers,<br>Anja<br><br><div><span class="gmail_quote">On 03/10/06, <b class="gmail_sendername">Anja Ende</b> <<a href="mailto:anja.ende@googlemail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
anja.ende@googlemail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Here is the PrintSelf() output of the actor 2D that I am trying to pick. Maybe this will give someone a hint as to why it gets picked at (0, 0) instead of (238.5,209,0)<br><br> Debug: Off<br> Modified Time: 5308<br> Reference Count: 2
<br> Registered Events: (none)<br> Dragable: On<br> Pickable: On<br> AllocatedRenderTime: 5000<br> EstimatedRenderTime: 0<br> NumberOfConsumers: 1<br> RenderTimeMultiplier: 0.001<br> Visibility: On<br> Layer Number: 0<br>
<br> PositionCoordinate: 0xa7f650<br> Debug: Off<br> Modified Time: 4850<br> Reference Count: 2<br> Registered Events: (none)<br> Coordinate System: Viewport<br> Value: (238.5,209,0)<br> ReferenceCoordinate: (none)
<br> Viewport: (none)<br><br> Position2 Coordinate: 0xa97ae0<br> Debug: Off<br> Modified Time: 228<br> Reference Count: 1<br> Registered Events: (none)<br> Coordinate System: Normalized Viewport<br> Value: (
0.5,0.5,0)<br> ReferenceCoordinate: 0xa7f650<br> Viewport: (none)<br><br> Property: 0xac0f80<br> Debug: Off<br> Modified Time: 5307<br> Reference Count: 1<br> Registered Events: (none)<br> Opacity: 1<br> Color: (1, 1, 1)
<br> Point size: 1<br> Line width: 1<br> Line stipple pattern: 65535<br> Line stipple repeat factor: 1<br> Display location: foreground<br><br> Mapper: 0xa96980<br> Debug: Off<br> Modified Time: 221<br> Reference Count: 3
<br> Registered Events: (none)<br> Executive: 0xa973a0<br> ErrorCode: Success<br> Information: 0xa96b00<br> AbortExecute: Off<br> Progress: 0<br> Progress Text: (None)<br> TimeToDraw: 0<br> ClippingPlanes: (none)
<br> Color Window: 255<br> Color Level: 127.5<br> ZSlice: 0<br> RenderToRectangle: 0<br> UseCustomExtents: 0<br> CustomDisplayExtents: 0 0 0 0<br><br><br>Thanks,<div><span>
<br>Anja<br><br><br><div><span class="gmail_quote">
On 03/10/06, <b class="gmail_sendername">Anja Ende</b> <<a href="mailto:anja.ende@googlemail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">anja.ende@googlemail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Ok, I might have found a bug with the vtkPropPicker class or maybe something is missing from my code.<br><br>I have moved my cursor actor with the code:<br><br>m_actor->SetPosition(x, y);<br><br>However, when I click on the bottom left corner of my view, so basically around (0, 0) then it picks the cursor! Even though, on my screen it is at another position! Surely this is a bug???
<br><br>Cheers,<br><br>Anja<br><br><div><span class="gmail_quote">On 03/10/06, <b class="gmail_sendername">Anja Ende</b> <<a href="mailto:anja.ende@googlemail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
anja.ende@googlemail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi everyone,<br><br>I have a renderer that has 2 actors as follows:<br><br>this->m_renderer->AddActor(this->m_actor2D);<br>this->m_renderer->AddActor(m_cursor.GetActor());<br><br>Now, I am trying to pick this cursor actor on mouse clicks as follows:
<br><br>// This code is in vtkInteractorStyleImage based class...<br><br>int x = this->Interactor->GetEventPosition()[0];<br>int y = this->Interactor->GetEventPosition()[1];<br>this->FindPokedRenderer(x, y);
<br> <br>if (this->CurrentRenderer == NULL)<br> return;<br><br>vtkPropPicker * picker = vtkPropPicker::New();<br>if (picker->PickProp(x, y, this->CurrentRenderer))<br>{<br> vtkProp * prop = picker->GetViewProp();
<br> std::cout << prop << ": " << m_viewer->m_cursor.GetActor() << ": " << m_viewer->m_actor2D << std::endl;<br><br>}<br>picker->Delete();<br><br><br>
Now no matter where I click, on the cursor image or on the underlying image, I always seem to pick the bottom image and never the cursor image. Is it possible to actually layer these objects somehow and pick the top most one or something like that...
<br><br>Cheers,<br><span>Anja<br>
</span></blockquote></div><br>
</blockquote></div><br>
</span></div></blockquote></div><br>
</span></div></blockquote></div><br>