Difference between revisions of "OpenIGTLink/Library/Discussions"

From NAMIC Wiki
Jump to: navigation, search
 
(6 intermediate revisions by the same user not shown)
Line 5: Line 5:
  
 
=Build for QNX=
 
=Build for QNX=
Harman Bassan, from CSTAR, Canada, has successfully built OpenIGTLink library with the following modifications.
+
Harman Bassan, from CSTAR, Canada, has successfully built OpenIGTLink library with the following procedures.
  
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:
+
The first step was to update the compiler on QNX. The version he has 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
 
  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).
+
It also required to update the binary utilities (He 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:
+
Once CMAKE was compiled and working (there were a few warning during the compilation, but it compiled without any errors), He got the latest version of OpenIGTLink using svn. After doing the configuration with CMAKE, he 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 he manually edited the "CMakeLists.txt" file in the "Source" directory to reflect the following changes:
  
 
  IF(OpenIGTLink_PLATFORM_WIN32)
 
  IF(OpenIGTLink_PLATFORM_WIN32)
Line 27: Line 27:
 
  ENDIF(OpenIGTLink_PLATFORM_WIN32)
 
  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.
+
The example files in "Examples/Imager" causes errors due to the calls of "fopen" and "FILE". You may need to disable those examples.
 
 
 
 
  
 
=Log function=
 
=Log function=

Latest revision as of 04:06, 30 November 2011

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 procedures.

The first step was to update the compiler on QNX. The version he has 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 (He used version 2.17).

Once CMAKE was compiled and working (there were a few warning during the compilation, but it compiled without any errors), He got the latest version of OpenIGTLink using svn. After doing the configuration with CMAKE, he 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 he 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)

The example files in "Examples/Imager" causes errors due to the calls of "fopen" and "FILE". You may need to disable those examples.

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