Difference between revisions of "OpenIGTLink"

From NAMIC Wiki
Jump to: navigation, search
 
(269 intermediate revisions by 9 users not shown)
Line 1: Line 1:
<div class="floatright">__TOC__</div>
+
<font color=red>The OpenIGTLink official web page has moved to http://openigtlink.org/</font>
Open IGT Link is a simple network protocol intended for trackers, robots and other devices to send data to the main application. Some devices might accept commands.
 
* [http://www.ndigital.com/ Optotrack]
 
* MRI real time image
 
* [http://www.cisst.org/wiki/MRI_Robot JHU robots]
 
(Please contact us if you would like to include other devices.)
 
  
License: [http://www.opensource.org/licenses/bsd-license.php new BSD license] &copy;2008 Insight Software Consortium
+
Please click [[OpenIGTLink_OldPage|here]] to visit the old page.
 
 
=People / Organizations=
 
* [http://www.kitware.com/profile/team/ibanez.html Luis Ibanez], Kitware
 
* [http://www.spl.harvard.edu/pages/People/tokuda  Junichi Tokuda], BWH
 
* [http://www.cisst.org/wiki/User:Csoma Csaba Csoma], JHU
 
* Jack Blevins, Acousticmed
 
* Patrick Cheng, Georgetown University
 
* [http://www.spl.harvard.edu/pages/People/hliu Haying Liu], BWH
 
* [http://www.insightsoftwareconsortium.org/ Insight Software Consortium]
 
* [http://www.na-mic.org/ National Alliance for Medical Image Computing (NA-MIC)]
 
 
 
=Protocol=
 
 
 
===Header Structure===
 
  Bytes
 
  0  2                      14                                      34            42              50              58
 
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+.....
 
  | V |          TYPE        |              DEVICE_NAME              |  TIME_STAMP  |  BODY_SIZE  |    CRC64    |  BODY   
 
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+.....
 
 
 
===Byte Order===
 
Big endian should be used for all numerical values (version, body size, crc). Unused spaces are padded with 0 (binary).
 
 
 
===Header Fields===
 
{| border="1" cellpadding="5" cellspacing="0" align="center"
 
|-
 
| align="left style="background:#e0e0e0;" | Data
 
| align="left style="background:#e0e0e0;" | Type
 
| align="left style="background:#e0e0e0;" | Description
 
|-
 
| align="left" | V
 
| align="left" | Unsigned short (16bit)
 
| align="left" | Version number (1)
 
|-
 
| align="left" | TYPE
 
| align="left" | char[8]
 
| align="left" | Type name of data
 
|-
 
| align="left" | DEVICE_NAME
 
| align="left" | char[20]
 
| align="left" | Unique device name
 
|-
 
| align="left" | TIME_STAMP
 
| align="left" | 64 bit unsigned int
 
| align="left" | [[OpenIGTLink/Timestamp | Timestamp]] or 0 if unused
 
|-
 
| align="left" | BODY_SIZE
 
| align="left" | 64 bit unsigned int
 
| align="left" | Size of body in bytes
 
|-
 
| align="left" | CRC
 
| align="left" | 64 bit unsigned int
 
| align="left" | 64 bit CRC for body data
 
|-
 
|}
 
 
 
= Data types =
 
 
 
==IMAGE==
 
Image data consists of ascii header information followed by binary image pixel data.
 
(Ascii header is used to maintain compatibility with SlicerDaemon connection)
 
 
 
space right-anterior-superior\n
 
dimensions <xsize> <ysize> <zsize>\n
 
space_origin (<x>, <y>, <z>)\n
 
space_directions (<tx>, <ty>, <tz>) (<sx>, <sy>, <sz>) (<nx>, <ny>, <nz>) \n
 
kinds space space space\n
 
components 1\n
 
scalar_type <scalar type #>\n
 
<binary image data>
 
 
 
Descriptions:
 
{| border="1" cellpadding="5" cellspacing="0" align="center"
 
|-
 
| align="left style="background:#e0e0e0;" | Data
 
| align="left style="background:#e0e0e0;" | Type
 
| align="left style="background:#e0e0e0;" | Description
 
|-
 
| align="left" | <xsize>, <ysize>, <zsize>
 
| align="left" | text number (real)
 
| align="left" | Center position of the image in RAS coordinate
 
|-
 
| align="left" | <tx>, <ty>, <tz>
 
| align="left" | text number (real)
 
| align="left" | Transverse vector (direction for 'i' index) / The length represents pixel size in 'i' direction
 
|-
 
| align="left" | <sx>, <sy>, <sz>
 
| align="left" | text number (real)
 
| align="left" | Transverse vector (direction for 'j' index) / The length represents pixel size in 'j' direction
 
|-
 
| align="left" | <nx>, <ny>, <nz>
 
| align="left" | text number (real)
 
| align="left" | Normal vector of image plane(direction for 'k' index) /  The length represents pixel size in 'z' direction or slice thickness
 
|-
 
| align="left" | <scalar type #>
 
| align="left" | Pixel scalar type number (Ascii)
 
| align="left" | 2:int8 3:int8 4:int16 5:uint16 6:int32 7:uint32 10:float32 11:float64
 
|-
 
| align="left" | <binary image data>
 
| align="left" | Binary image data (<xsize>*<ysize>*<zsize>* (pixel size)
 
| align="left" | Image data
 
|-
 
|}
 
 
 
==TRANSFORM==
 
The transform data is upper three rows of 4x4 transformation matrix, where element (3,3) is assumed to be 1.
 
 
 
  Bytes (Body)
 
  58      62      66      70      74      78      82      86      90      94      98    102    106
 
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
  | (0,0) | (1,0) | (2,0) | (0,1) | (1,1) | (2,1) | (0,2) | (1,2) | (2,2) | (0,3) | (1,3) | (2,3) |
 
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
 
 
==POSITION==
 
* 3D Position
 
* Optional: Orientation
 
 
 
==STATUS==
 
  Bytes (Body)
 
  58  60            68                          88
 
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+-+-+.....
 
  | C |  Sub Code  |      Status name          |   Status message (optional)
 
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+--+-+-+.....
 
 
 
{| border="1" cellpadding="5" cellspacing="0"
 
|-
 
| align="left style="background:#e0e0e0;" | Data
 
| align="left style="background:#e0e0e0;" | Type
 
| align="left style="background:#e0e0e0;" | Description
 
|-
 
| align="left" | C
 
| align="left" | Unsigned short (16bit)
 
| align="left" | Status code groups: 1-Ok, 2-Generic Error, ... (see below)
 
|-
 
| align="left" | Sub Code
 
| align="left" | 64 bit integer
 
| align="left" | Sub code for the error (ex. 0x200 - file not found)
 
|-
 
| align="left" | Error name
 
| align="left" | char[20]
 
| align="left" | "Error", "Ok", "Starting up" - can be anything, don't relay on this
 
|-
 
| align="left" | Status Message (optional)
 
| align="left" | char[ BodySize - 30 ]
 
| align="left" | Optional (English) description (ex. "File C:\test.ini not found")
 
|-
 
|}
 
 
 
 
 
'''Status codes:'''<br />
 
0 No Errors Found (use status 1 instead!)<br />
 
1 OK (Default status)<br />
 
2 Unknown error<br />
 
3 Panic mode (emergency)<br />
 
4 Not found (file, configuration, device etc)<br />
 
5 Access denied<br />
 
6 Busy<br />
 
7 Time out / Connection lost<br />
 
8 Overflow / Can't be reached<br />
 
9 Checksum error<br />
 
10 Configuration error<br />
 
11 Not enough resource (memory, storage etc)<br />
 
12 Illegal/Unknown instruction (or feature not implemented)<br />
 
13 Device not ready (starting up)<br />
 
14 Manual mode (device does not accept commands)<br />
 
15 Device disabled<br />
 
16 Device not present<br />
 
17 Device version not known<br />
 
18 Hardware failure<br />
 
19 Exiting / shut down in progress<br />
 
<br />
 
 
 
= Open questions =
 
# What if the application receives hundreds of "position" packets? <br> Should we add "keep only the last" flag to the packet type?
 
# Authentication (other than Unique Name)
 
# Compression
 
# Priority
 
# Duplicate messages
 
#
 
 
 
= Resources =
 
* [[Slicer3:_Image_Guided_Therapy_(IGT) ]]
 
* [[Slicer/Features/Middleware | Middleware features]]
 
* [http://www.cisst.org/wiki/MRI_robot/MIT_2007_06_27_Meeting Initial discussion about requirements]
 

Latest revision as of 05:07, 7 April 2013

Home < OpenIGTLink

The OpenIGTLink official web page has moved to http://openigtlink.org/

Please click here to visit the old page.