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