<DIV><FONT face=Arial>Hi, everyone,</FONT></DIV>
<DIV><FONT face=Arial>&nbsp; I am displaying several 2D images&nbsp;using class vtkImageViewer2, of course, there is&nbsp;several objects of class vtkImageViewer2. and I want to&nbsp;know which object would be picked when I press my mouse left button. so I&nbsp;want to use&nbsp;vtkPointPicker to do it.</FONT></DIV>
<DIV><FONT face=Arial>&nbsp; however, the actor of class vtkImageViewer2 is vtkImageActor,&nbsp;while&nbsp;class vtkPointPicker could only get a object of class vtkActor by method GetActor(). so I&nbsp;have to change my mind. I want to&nbsp;testify which&nbsp;vtkImageViewer2&nbsp;would be picked by class vtkRenderWindowInteractor.</FONT></DIV>
<DIV><FONT face=Arial>&nbsp; I add a mouse events observer like:</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff>virtual void execute(...) {</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff>&nbsp;&nbsp;&nbsp; // picker and viewer are pointers to the actual vtkPointPicker/vtkImageViewer2 objects.<BR>&nbsp;&nbsp;&nbsp; int i = picker-&gt;Pick(viewer-&gt;GetRenderWindow()-&gt;GetInteractor()-&gt;GetEventPosition()[0],</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; viewer-&gt;GetRenderWindow()-&gt;GetInteractor()-&gt;GetEventPosition()[1],</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; viewer-&gt;GetSlice(), viewer-&gt;GetRenderer());</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff>&nbsp;&nbsp;&nbsp; if (i == 0) </FONT></DIV>
<DIV><FONT face=Arial color=#0000ff>&nbsp;&nbsp;&nbsp; {</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff>&nbsp;&nbsp;&nbsp; }</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff>&nbsp;&nbsp;&nbsp; vtkRenderWindowInteractor * temp = picker-&gt;GetRenderer()-&gt;GetRenderWindow()-&gt;GetInteractor();</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff>&nbsp;&nbsp;&nbsp; <FONT color=#ff0000>// .... and then test which vtkImageViewer2&nbsp;the interactor is in</FONT></FONT></DIV>
<DIV><FONT face=Arial color=#ff0000>&nbsp;&nbsp;&nbsp; // but it don't work!!!!</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff>}&nbsp;</FONT></DIV>
<DIV><FONT face=Arial>&nbsp; who can tell me how to pick one object of vtkImageViewer2 from the objects&nbsp;set of vtkImageViewer2? is there any method to know whick one I have picked?</FONT></DIV>
<DIV><FONT face=Arial>&nbsp; thank you!</FONT></DIV>
<DIV><FONT face=Arial>&nbsp; MJ</FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>