Tracker Daemon

From NAMIC Wiki
Jump to: navigation, search
Home < Tracker Daemon

Purpose

Tracker Daemon is created for the communication between Slicer 3 and IGSTK through socket connection. For now, a program built on top of IGSTK can send tracking data to Slicer 3, which then updates the locator and related images accordingly. In the future, Tracker Daemon will be used to receive realtime images.

Recipe for using Tracker Daemon

  1. Rerun CMake in the VTK that you used for building IGSTK and turn "VTK_USE_PARALLEL" ON. Then compile VTK (no need to make a clean build, it will just build the vtkParallel library).
  2. Put the igstkTracker.cxx file from the NAMIC sandbox directory NAMICSandBox/trunk/IGSTK-Slicer-IntegrationViaSockets/IGSTKAdaptor into the IGSTK/Source directory. (replacing the existing one). Rerun CMake on IGSTK, then build IGSTK.
  3. Configure the directory NAMICSandBox/trunk/IGSTK-Slicer-IntegrationViaSockets with CMake, provide in IGSTK_DIR the directory where you build IGSTK, and provide ITK_DIR and VTK_DIR as the directories that you used for building IGSTK. They don't have to be the same that you used for building Slicer.
  4. Once you build from step (3) above, you will get three executables: igstkTrackerToolSocketRelayTest1.exe, igstkTrackerToolSocketRelayTest2.exe and igstkTransformSocketListener.exe. First, test your system by running the following commands: a) igstkTransformSocketListener.exe 16666 &; b) igstkTrackerToolSocketRelayTest2.exe localhost 16666 &. Preferably, run each command on a different console. That should print out the following output on the console (a): $ Port = 16666

0 : 1 0 0 0 1 0 0 0 1 0 100 0 1 : 1 0 0 0 1 0 0 0 1 0.999983 99.995 0 2 : 1 0 0 0 1 0 0 0 1 1.99987 99.98 0 3 : 1 0 0 0 1 0 0 0 1 2.99955 99.955 0 4 : 1 0 0 0 1 0 0 0 1 3.99893 99.92 0 5 : 1 0 0 0 1 0 0 0 1 4.99792 99.875 0 6 : 1 0 0 0 1 0 0 0 1 5.9964 99.8201 0 7 : 1 0 0 0 1 0 0 0 1 6.99428 99.7551 0


    This is a made-up tracker that provides position in
    a circle.


    If this works fine, then move to the following test:


  1. Kill the two commands above.
  1. Run, in separate consoles the following commands:
   a) igstkTransformSocketListener.exe 16666  &
   b) igstkTrackerToolSocketRelayTest1.exe  localhost 16666 &


   Note that now in (b) you use the executable with "1".
   This execuatble will initialize the Aurora Tracker in
   serial port 0, and start grabbing transforms and sending
   them through the socket.
   In console (a), you should see transform values comming in,
   but this time, the values will match the movements of the
   Aurora Tracker Tool.


7) If this works fine, then move to the real final test;


8) Kill the two commands above

9) Start Slicer IGT, and follows Steve recipe:

   a) create a transform called "tracker"
   b) load a dataset or a moder and make it a child
      of the "tracker" transform that you just created
   c) Open the Interactor window and from there start
      the tracker daemon (I'll need help from Steve
      here, to remember the exact command).


10) Once Slicer is ready waiting for transforms,

    then do in a console the following command:
    igstkTrackerToolSocketRelayTest1.exe  localhost 8529 &


    Note that this time we use a different port number.


    At that point, the Aurora tracker should be initialized
    (beeping), and Slicer should popup a message asking for
    authorization to let somebody connect in "127.0.0.1".
    If you click on "OK" in that message, then Slicer should
    start receiving the transforms from the socket, and you
    should see the volume moving as you move the Tracket tool.