I have something like this...<br><br><span style="font-family: courier new,monospace;">void ImageInteraction::Execute(vtkObject *, unsigned long event, void *)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">{</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    vtkRenderWindowInteractor *interactor = this-&gt;GetInteractor();</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    int lastPos[2];</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    interactor-&gt;GetLastEventPosition(lastPos);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    int currPos[2];</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    interactor-&gt;GetEventPosition(currPos);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    if (event == vtkCommand::LeftButtonPressEvent)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">      {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">      this-&gt;Slicing = 1;</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">       // Pick at the mouse location provided by the interactor</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">       this-&gt;Picker-&gt;Pick(interactor-&gt;GetEventPosition()[0],</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">                   interactor-&gt;GetEventPosition()[1],</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">                   interactor-&gt;GetEventPosition()[2], this-&gt;Renderer);</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">       double pos[3];</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">       this-&gt;Picker-&gt;GetPickPosition(pos);</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    // There could be other props assigned to this picker, so </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    // make sure we picked the image actor</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    vtkAssemblyPath* path = this-&gt;Picker-&gt;GetPath();</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    bool validPick = false;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    if (path)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">      {</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">      vtkCollectionSimpleIterator sit;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">      path-&gt;InitTraversal(sit);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">      vtkAssemblyNode *node;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">      for (int i = 0; i &lt; path-&gt;GetNumberOfItems() &amp;&amp; !validPick; ++i)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">        {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">        node = path-&gt;GetNextNode(sit);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">        if (this-&gt;Actor == vtkImageActor::SafeDownCast(node-&gt;GetViewProp()))</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">          {</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">          validPick = true; </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">          break;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">          }</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">        }</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">      }</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    if (!validPick)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">      {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">      return;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">      }</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">      }</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    else if (event == vtkCommand::LeftButtonReleaseEvent)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">      {</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">      this-&gt;Slicing = 0;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">      }</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    else if (event == vtkCommand::MouseMoveEvent)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">      {</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">      if (this-&gt;Slicing)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">        { // something</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">        }</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">      else</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">        {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">        vtkInteractorStyle *style = vtkInteractorStyle::SafeDownCast(interactor-&gt;GetInteractorStyle());</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">        if (style)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">          {</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">          style-&gt;OnMouseMove();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">          }</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">        }</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">      }</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">}</span><br><br>And I would like to get array pos to my GUI QT. I dont know, how to emit signal from this class/method or &quot;return&quot; value to GUI class<br>Thanks for all answers.<br>
<br><br><div class="gmail_quote">2011/4/25 G G <span dir="ltr">&lt;<a href="mailto:greenlander1986@gmail.com">greenlander1986@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Do you have some example? or example on the internet, please. I am trying something all afternoon but any solution :(<br><br><div class="gmail_quote"><div><div></div><div class="h5">2011/4/25 Rashid Tanweer <span dir="ltr">&lt;<a href="mailto:quantum_cook@yahoo.com" target="_blank">quantum_cook@yahoo.com</a>&gt;</span><br>

</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5"><div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><div>
Hi, <br>QT and VTK events are different and are generated through seperate pipelines. Best way is to have them both catch, vtk events in vtkCommand Callback by registering it through interactor and QT Event by registering a proper slot for it. <br>

<br>Regards,<br>Rashid <br></div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><br><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><font size="2" face="Tahoma"><hr size="1">

<b><span style="font-weight:bold">From:</span></b> G G &lt;<a href="mailto:greenlander1986@gmail.com" target="_blank">greenlander1986@gmail.com</a>&gt;<br><b><span style="font-weight:bold">To:</span></b> <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br>

<b><span style="font-weight:bold">Sent:</span></b> Mon, April 25, 2011 1:30:35 AM<br><b><span style="font-weight:bold">Subject:</span></b> [vtkusers] interaction
 problem<br></font><div><div></div><div><br>
Hi, could someone help me, how to connect this code<br><span><a href="http://vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/ImageProcessing/Cxx/ImageSlicing.cxx" target="_blank">http://vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/ImageProcessing/Cxx/ImageSlicing.cxx</a></span><br>


with <br>vtkEventQtSlotConnect<br>?<br>A dont know how to connect it :( <br>Thanks a lot<br>
</div></div></div></div>
</div></div><br></div></div>_______________________________________________<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>
<br></blockquote></div><br>
</blockquote></div><br>