Difference between revisions of "OpenIGTLink/Library/Discussions"

From NAMIC Wiki
Jump to: navigation, search
Line 3: Line 3:
 
<div class="redirectText">'''Discussions on Open IGT Link Library Development'''</div>
 
<div class="redirectText">'''Discussions on Open IGT Link Library Development'''</div>
 
<div class="floatright">__TOC__</div>
 
<div class="floatright">__TOC__</div>
 +
 +
=Build for QNX=
 +
Harman Bassan, from CSTAR, Canada, has successfully built OpenIGTLink library with the following modifications.
 +
 +
The first step was to update the compiler on QNX. The version I have tried is gcc V4.2.1. The instructions to update this compiler were available at:
 +
 +
http://community.qnx.com/sf/wiki/do/viewPage/projects.toolchain/wiki/Downloads_gcc4.2Preview
 +
 +
It also required to update the binary utilities (I used version 2.17).
 +
 +
Once CMAKE was compiled and working (there were a few warning during the compilation, but it compiled without any errors), I got the latest version of OpenIGTLink using svn. After doing the configuration with CMAKE, I was getting an ERROR during the make process. The error was coming from a missing "pthread" library on QNX. For QNX, the equivalent library is "libc". So I manually edited the "CMakeLists.txt" file in the "Source" directory to reflect the following changes:
 +
 +
IF(OpenIGTLink_PLATFORM_WIN32)
 +
  SET(LINK_LIBS
 +
    ws2_32
 +
    wsock32
 +
  )
 +
ELSE(OpenIGTLink_PLATFORM_WIN32)
 +
  SET(LINK_LIBS
 +
    /usr/qnx632/target/qnx6/x86/lib/libc.so;    /usr/qnx632/target/qnx6/x86/lib/libsocket.so;
 +
    m
 +
  )
 +
ENDIF(OpenIGTLink_PLATFORM_WIN32)
 +
 +
With the "libc.so" and "libsocket.so" libraries included, I was still getting an error from one of the example files "Imager". The error had to do with redifinition of "fopen" and "FILE", but I haven't tried to fix it yet. So I commented the "Imager" example in the CMakeLists.txt in the Examples directories and finally OpenIGTLink compiled without any error. We tested the TrackerClient example and it is sending data to SLICER.
 +
 +
  
 
=Log function=
 
=Log function=

Revision as of 18:55, 21 October 2008

Home < OpenIGTLink < Library < Discussions

<< OpenIGTLink

Discussions on Open IGT Link Library Development

Build for QNX

Harman Bassan, from CSTAR, Canada, has successfully built OpenIGTLink library with the following modifications.

The first step was to update the compiler on QNX. The version I have tried is gcc V4.2.1. The instructions to update this compiler were available at:

http://community.qnx.com/sf/wiki/do/viewPage/projects.toolchain/wiki/Downloads_gcc4.2Preview

It also required to update the binary utilities (I used version 2.17).

Once CMAKE was compiled and working (there were a few warning during the compilation, but it compiled without any errors), I got the latest version of OpenIGTLink using svn. After doing the configuration with CMAKE, I was getting an ERROR during the make process. The error was coming from a missing "pthread" library on QNX. For QNX, the equivalent library is "libc". So I manually edited the "CMakeLists.txt" file in the "Source" directory to reflect the following changes:

IF(OpenIGTLink_PLATFORM_WIN32)
  SET(LINK_LIBS
    ws2_32
    wsock32
  )
ELSE(OpenIGTLink_PLATFORM_WIN32)
  SET(LINK_LIBS
    /usr/qnx632/target/qnx6/x86/lib/libc.so;     /usr/qnx632/target/qnx6/x86/lib/libsocket.so;
    m
  )
ENDIF(OpenIGTLink_PLATFORM_WIN32)

With the "libc.so" and "libsocket.so" libraries included, I was still getting an error from one of the example files "Imager". The error had to do with redifinition of "fopen" and "FILE", but I haven't tried to fix it yet. So I commented the "Imager" example in the CMakeLists.txt in the Examples directories and finally OpenIGTLink compiled without any error. We tested the TrackerClient example and it is sending data to SLICER.


Log function

Data file format

  • binary (dump message data to file)
    • pro
      • can be used for any type of data
      • easy to replay
    • con
      • too redundant, if the data source does not change
      • needs reader software
  • text format
    • pro
      • human readable
    • con
      • size
      • needs interpreter. impossible to record unknown type message.

Architecture

  • 1 connection / port
    • needs threading
    • implemented in the OpenIGTLink library
  • multiple connection port
    • use 'select()' function
    • not implemented in the OpenIGTLink library
    • can be implemented as a single-thread program

Logistics

Skills required