<div dir="ltr"><div><div><div>Hello Abdelkhalek,<br><br></div>Your question seem to be related to VTK, not ITK. You may want to contact the VTK mailing list. You can register to the VTK mailing lists from this page:<br><a href="http://www.vtk.org/mailing-lists/">http://www.vtk.org/mailing-lists/</a><br><br></div>Hope this helps,<br></div>Francois<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 7, 2016 at 8:53 AM, Abdelkhalek Bakkari <span dir="ltr"><<a href="mailto:bakkari.abdelkhalek@hotmail.fr" target="_blank">bakkari.abdelkhalek@hotmail.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div id="m_1182063263478020919divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:'Times New Roman',Times,serif" dir="ltr">
<p></p>
<p style="margin-right:0px;margin-bottom:1em;margin-left:0px;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:Arial,"Helvetica Neue",Helvetica,sans-serif">
<span style="font-family:"Times New Roman",Times,serif">Dear ITK users</span><span style="font-family:"Times New Roman",Times,serif">,</span></p>
<p style="margin-right:0px;margin-bottom:1em;margin-left:0px;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:Arial,"Helvetica Neue",Helvetica,sans-serif">
<br>
<br>
<span style="font-family:"Times New Roman",Times,serif">I am using QT and VTK. I created a mouse release method to use it inside a QVTKWidget :</span></p>
<pre class="m_1182063263478020919lang-cpp m_1182063263478020919prettyprint m_1182063263478020919prettyprinted" style="margin-top:0px;margin-bottom:1em;padding:5px;border:0px;font-size:13px;width:auto;max-height:600px;overflow:auto;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;background-color:rgb(239,240,241);color:rgb(57,51,24);word-wrap:normal"><code style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;white-space:inherit"><span class="m_1182063263478020919kwd" style="margin:0px;padding:0px;border:0px;color:rgb(16,16,148)">void</span><span class="m_1182063263478020919pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)"> </span><span class="m_1182063263478020919typ" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">MyQVTKWidget</span><span class="m_1182063263478020919pun" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">::</span><span class="m_1182063263478020919pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">mouseReleaseEven<wbr>t</span><span class="m_1182063263478020919pun" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">(</span><span class="m_1182063263478020919typ" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">QMouseEvent</span><span class="m_1182063263478020919pun" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">*</span><span class="m_1182063263478020919pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)"> event</span><span class="m_1182063263478020919pun" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">)</span></code></pre>
<p style="margin-right:0px;margin-bottom:1em;margin-left:0px;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:Arial,"Helvetica Neue",Helvetica,sans-serif">
{</p>
<pre class="m_1182063263478020919lang-cpp m_1182063263478020919prettyprint m_1182063263478020919prettyprinted" style="margin-top:0px;margin-bottom:1em;padding:5px;border:0px;font-size:13px;width:auto;max-height:600px;overflow:auto;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;background-color:rgb(239,240,241);color:rgb(57,51,24);word-wrap:normal"><code style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;white-space:inherit"><span class="m_1182063263478020919kwd" style="margin:0px;padding:0px;border:0px;color:rgb(16,16,148)">if</span><span class="m_1182063263478020919pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)"> </span><span class="m_1182063263478020919pun" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">(</span><span class="m_1182063263478020919pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">pMainWindow</span><span class="m_1182063263478020919pun" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">)</span><span class="m_1182063263478020919pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">
</span><span class="m_1182063263478020919pun" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">{</span><span class="m_1182063263478020919pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">
</span><span class="m_1182063263478020919pun" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">((</span><span class="m_1182063263478020919typ" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">MainWindow</span><span class="m_1182063263478020919pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)"> </span><span class="m_1182063263478020919pun" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">*)</span><span class="m_1182063263478020919pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">pMainWindow</span><span class="m_1182063263478020919pun" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">)-></span><span class="m_1182063263478020919pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">myMouseRelease<wbr>Event</span><span class="m_1182063263478020919pun" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">(</span><span class="m_1182063263478020919pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">event</span><span class="m_1182063263478020919pun" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">);</span><span class="m_1182063263478020919pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">
</span><span class="m_1182063263478020919pun" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">}</span><span class="m_1182063263478020919pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">
</span><span class="m_1182063263478020919com" style="margin:0px;padding:0px;border:0px;color:rgb(133,140,147)">// call the super class to avoid troubles</span><span class="m_1182063263478020919pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">
</span><span class="m_1182063263478020919typ" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">QVTKWidget</span><span class="m_1182063263478020919pun" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">::</span><span class="m_1182063263478020919pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">mouseReleaseEvent</span><span class="m_1182063263478020919pun" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">(</span><span class="m_1182063263478020919pln" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)"><wbr>event</span><span class="m_1182063263478020919pun" style="margin:0px;padding:0px;border:0px;color:rgb(48,51,54)">);</span></code></pre>
<p style="margin-right:0px;margin-bottom:1em;margin-left:0px;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:Arial,"Helvetica Neue",Helvetica,sans-serif">
}</p>
<p style="margin-right:0px;margin-bottom:1em;margin-left:0px;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:Arial,"Helvetica Neue",Helvetica,sans-serif">
<span style="font-family:"Times New Roman",Times,serif">Now, I would like to map (x,y) to slice (i,j). Generally, <span>mouse position should be mapped into ( i, j) of current slice. I</span></span><span style="font-family:"Times New Roman",Times,serif">t
depends on the zoom factor, </span><span style="font-family:"Times New Roman",Times,serif">aspect ratio of the slice </span><span style="font-family:"Times New Roman",Times,serif">and the window size.</span><span style="font-family:"Times New Roman",Times,serif"><br>
</span><span style="font-family:"Times New Roman",Times,serif"> </span></p>
<p style="margin-right:0px;margin-bottom:1em;margin-left:0px;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:Arial,"Helvetica Neue",Helvetica,sans-serif">
<span style="font-family:"Times New Roman",Times,serif">But, I am wondering about how can I solve this issue. </span></p>
<p style="margin-right:0px;margin-bottom:1em;margin-left:0px;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:Arial,"Helvetica Neue",Helvetica,sans-serif">
<span style="color:rgb(33,33,33);font-family:"Times New Roman",Times,serif"><br>
</span></p>
<p style="margin-right:0px;margin-bottom:1em;margin-left:0px;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:Arial,"Helvetica Neue",Helvetica,sans-serif">
<span style="color:rgb(33,33,33);font-family:"Times New Roman",Times,serif"><br>
</span></p>
<p style="margin-right:0px;margin-bottom:1em;margin-left:0px;padding:0px;border:0px;font-size:15px;clear:both;color:rgb(36,39,41);font-family:Arial,"Helvetica Neue",Helvetica,sans-serif">
<span style="font-family:"Times New Roman",Times,serif"></span><span style="color:rgb(33,33,33);font-family:"Times New Roman",Times,serif">Thanks in advance!</span></p>
<span style="font-family:"Times New Roman",Times,serif">Best regards,</span>
<p></p>
<p><br>
</p>
<div id="m_1182063263478020919Signature"><font size="3" face="Garamond">Abdelkhalek Bakkari</font>
<div><span style="line-height:14px"><font size="3" face="Garamond">Ph.D candidate in Computer Science</font></span></div>
<div><span style="line-height:20.82666778564453px;background-color:rgb(255,255,255)"><font size="3" face="Garamond">Institute of Applied Computer Science</font></span></div>
<div><span style="line-height:18.399999618530273px"><font size="3" face="Garamond">Lodz University of Technology, Poland</font></span></div>
<div><span style="line-height:18.399999618530273px"><font size="3" face="Garamond"><br>
</font></span></div>
<div><br>
</div>
</div>
</div>
</div>
<br>______________________________<wbr>_______<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" target="_blank">http://www.itk.org/Wiki/ITK_<wbr>FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br></div>