Difference between revisions of "OpenIGTLink/Library/Discussions"

From NAMIC Wiki
Jump to: navigation, search
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
[OpenIGTLink | << OpenIGTLink]]
+
[[OpenIGTLink | << OpenIGTLink]]
  
<div class="redirectText">'''Open IGT Link protocol description'''</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 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=
 
=Log function=
 
==Data file format==
 
==Data file format==
* dump message data to the file
+
* binary (dump message data to file)
 
**pro
 
**pro
 
*** can be used for any type of data
 
*** can be used for any type of data
Line 18: Line 43:
 
** con
 
** con
 
*** size
 
*** size
*** need interpretation
+
*** needs interpreter. impossible to record unknown type message.
  
 
==Architecture==
 
==Architecture==
* 1-port, 1-connection
+
* 1 connection / port
 
** needs threading
 
** needs threading
** implemented in the OpenIGTLink libary
+
** implemented in the OpenIGTLink library
* 1-port, multiple connection
+
* multiple connection port
 
** use 'select()' function
 
** use 'select()' function
 
** not implemented in the OpenIGTLink library
 
** not implemented in the OpenIGTLink library
 
** can be implemented as a single-thread program
 
** can be implemented as a single-thread program
 +
 +
==Logistics==
 +
*Make a copy repository of OpenIGTLink library
 +
*Make wiki account and SVN repository account for the student
 +
**[[Editing_Guide:Getting_Started| NA-MIC wiki editing guide]]
 +
**[[Engineering:SandBox| NA-MIC Subversion Repository]]
 +
 +
==Skills required==
 +
*Basic knowledge about [[OpenIGTLink | OpenIGTLink]]. --> See [http://www.na-mic.org/Wiki/index.php/IGT:ToolKit IGT Toolkit Tutorial]
 +
*[[OpenIGTLink/Library]]
 +
*Socket programming
 +
*Thread
 +
*SVN, CMake
 +
 +
 +
* http://svn.na-mic.org/NAMICSandBox/trunk/IGTLoadableModules/ProstateNav

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