[IGSTK-Users] HelloWorld with QT

Fabian Torres fabian.trobles at gmail.com
Wed Feb 15 20:41:49 EST 2012


Hi.

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.

Basically the code is the same but instead of use a FLTKWidget I´m using a
QTWidget.


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.

But the problem comes when I use the MouseTracker. It doesn´t work. The
tracker doesn´t update, when I use the next code

         QTest::qWait(0.05);

         igstk::PulseGenerator::CheckTimeouts(); //FOR TRACKERS TO UPDATE

 		 typedef ::itk::Vector<double, 3> VectorType;

		 typedef ::itk::Versor<double> VersorType;

		 igstk::Transform transform;

		 VectorType position;

		 coordobserver->Clear();

		 trackertool->RequestGetTransformToParent();

 		 if (coordobserver->GotTransform())

		 {

 			 transform = coordobserver->GetTransform();

			 position = transform.GetTranslation();

			 std::cout << "Trackertool :"

			 << trackertool->GetTrackerToolIdentifier()

			 << "\t\t Position = (" << position[0]

			 << "," << position[1] << "," << position[2]

			 << ")" << std::endl;

		 }


I always get position 0,0,0.

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.

Does it has something to do with QTWidget?

Thanks
-- 
Fabián Torres Robles
Maestría en Ciencias en Ingeniería Electrónica
Ingeniería en Sistemas Electrónicos
tel. 58081280, 0445534661338
e-mail fabian.trobles at gmail.com, dae.wong at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/igstk-users/attachments/20120215/c78dda21/attachment-0001.html>


More information about the IGSTK-Users mailing list