Hi.<div><br></div><div>I´m trying to run the hello world example that comes in the IGSTK package, but instead of use FLTK I want to use QT.</div><div><br></div><div>Basically the code is the same but instead of use a FLTKWidget I´m using a QTWidget.</div>
<div><br></div><div><br></div><div>The project builds without error and the display of the scene works fine. I´m able to see the igstk view in the GUI created on QT.</div><div><br></div><div>But the problem comes when I use the MouseTracker. It doesn´t work. The tracker doesn´t update, when I use the next code </div>
<div><br></div><div><pre style="margin-top:0px;margin-bottom:0px"><span style="color:#c0c0c0"> </span>QTest::qWait(<span style="color:#000080">0.05</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#c0c0c0"> </span>igstk::PulseGenerator::CheckTimeouts();<span style="color:#c0c0c0"> </span><span style="color:#008000">//FOR</span><span style="color:#c0c0c0"> </span><span style="color:#008000">TRACKERS</span><span style="color:#c0c0c0"> </span><span style="color:#008000">TO</span><span style="color:#c0c0c0"> </span><span style="color:#008000">UPDATE</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#c0c0c0"> </span><span style="color:#808000">typedef</span><span style="color:#c0c0c0"> </span>::itk::Vector<<span style="color:#808000">double</span>,<span style="color:#c0c0c0"> </span><span style="color:#000080">3</span>><span style="color:#c0c0c0"> </span><span style="color:#800080">VectorType</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#c0c0c0"> </span><span style="color:#808000">typedef</span><span style="color:#c0c0c0"> </span>::itk::Versor<<span style="color:#808000">double</span>><span style="color:#c0c0c0"> </span><span style="color:#800080">VersorType</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#c0c0c0"> </span>igstk::Transform<span style="color:#c0c0c0"> </span>transform;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#c0c0c0"> </span><span style="color:#800080">VectorType</span><span style="color:#c0c0c0"> </span>position;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#c0c0c0"> </span>coordobserver->Clear();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#c0c0c0"> </span>trackertool->RequestGetTransformToParent();</pre>
<pre style="margin-top:0px;margin-bottom:0px"></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#c0c0c0"> </span><span style="color:#808000">if</span><span style="color:#c0c0c0"> </span>(coordobserver->GotTransform())</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#c0c0c0"> </span>{</pre>
<pre style="margin-top:0px;margin-bottom:0px"></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#c0c0c0"> </span>transform<span style="color:#c0c0c0"> </span>=<span style="color:#c0c0c0"> </span>coordobserver->GetTransform();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#c0c0c0"> </span>position<span style="color:#c0c0c0"> </span>=<span style="color:#c0c0c0"> </span>transform.GetTranslation();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#c0c0c0"> </span>std::cout<span style="color:#c0c0c0"> </span><<<span style="color:#c0c0c0"> </span><span style="color:#008000">"Trackertool</span><span style="color:#c0c0c0"> </span><span style="color:#008000">:"</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#c0c0c0"> </span><<<span style="color:#c0c0c0"> </span>trackertool->GetTrackerToolIdentifier()</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#c0c0c0"> </span><<<span style="color:#c0c0c0"> </span><span style="color:#008000">"\t\t</span><span style="color:#c0c0c0"> </span><span style="color:#008000">Position</span><span style="color:#c0c0c0"> </span><span style="color:#008000">=</span><span style="color:#c0c0c0"> </span><span style="color:#008000">("</span><span style="color:#c0c0c0"> </span><<<span style="color:#c0c0c0"> </span>position[<span style="color:#000080">0</span>]</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#c0c0c0"> </span><<<span style="color:#c0c0c0"> </span><span style="color:#008000">","</span><span style="color:#c0c0c0"> </span><<<span style="color:#c0c0c0"> </span>position[<span style="color:#000080">1</span>]<span style="color:#c0c0c0"> </span><<<span style="color:#c0c0c0"> </span><span style="color:#008000">","</span><span style="color:#c0c0c0"> </span><<<span style="color:#c0c0c0"> </span>position[<span style="color:#000080">2</span>]</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#c0c0c0"> </span><<<span style="color:#c0c0c0"> </span><span style="color:#008000">")"</span><span style="color:#c0c0c0"> </span><<<span style="color:#c0c0c0"> </span>std::endl;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#c0c0c0"> </span>}</pre><pre style="margin-top:0px;margin-bottom:0px"><br></pre></div><div>I always get position 0,0,0.</div><div><br></div><div>The code works fine with FLTK. The tracker update and I can see the movement of the elipsoide. In QT the Elipsoide stays on the origin.</div>
<div><br></div><div>Does it has something to do with QTWidget? <br clear="all"><div><br></div><div>Thanks</div>-- <br>Fabián Torres Robles<br>Maestría en Ciencias en Ingeniería Electrónica<br>Ingeniería en Sistemas Electrónicos<br>
tel. 58081280, 0445534661338<br>e-mail <a href="mailto:fabian.trobles@gmail.com" target="_blank">fabian.trobles@gmail.com</a>, <a href="mailto:dae.wong@gmail.com" target="_blank">dae.wong@gmail.com</a> <div style="padding:0px;margin-left:0px;margin-top:0px;overflow:hidden;word-wrap:break-word;color:black;font-size:10px;text-align:left;line-height:130%">
</div><div style="padding:0px;margin-left:0px;margin-top:0px;overflow:hidden;word-wrap:break-word;color:black;font-size:10px;text-align:left;line-height:130%"></div><br>
</div>