Difference between revisions of "OpenIGTLink/ProtocolV2/Type/Image"

From NAMIC Wiki
Jump to: navigation, search
 
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[OpenIGTLink/ProtocolV2/Proposals | << Version 2 Draft Page]]
+
[[OpenIGTLink/ProtocolV2/Index | << Version 2 Index Page]]
  
 
=Summary=
 
=Summary=
 
The IMAGE format supports 2D or 3D images with metric information including image matrix size, voxel size, coordinate system type, position, and orientation. The body section of the IMAGE data consists of two parts: image header to transfer the metric information and image body to transfer the array of pixel or voxel values. The data type of pixel or voxel can be either scalar or vector, and numerical values can be 8-, 16-, 32-bit integer, or 32- or 64-bit floating point. The pixel values can be either big-endian or little-endian, since the sender software can specify the byte order in the image header. The format also supports “partial image transfer”, in which a region of the image is transferred instead of the whole image. This mechanism is suitable for real-time applications, in which images are updated region-by-region. The sub-volume must be box-shaped and defined by 6 parameters consisting of the indices for the corner voxel of the sub-volume and matrix size of the sub-volume.
 
The IMAGE format supports 2D or 3D images with metric information including image matrix size, voxel size, coordinate system type, position, and orientation. The body section of the IMAGE data consists of two parts: image header to transfer the metric information and image body to transfer the array of pixel or voxel values. The data type of pixel or voxel can be either scalar or vector, and numerical values can be 8-, 16-, 32-bit integer, or 32- or 64-bit floating point. The pixel values can be either big-endian or little-endian, since the sender software can specify the byte order in the image header. The format also supports “partial image transfer”, in which a region of the image is transferred instead of the whole image. This mechanism is suitable for real-time applications, in which images are updated region-by-region. The sub-volume must be box-shaped and defined by 6 parameters consisting of the indices for the corner voxel of the sub-volume and matrix size of the sub-volume.
  
=IMAGE=
+
=Message Types=
 +
==IMAGE==
  
 
{| border="1" cellpadding="5" cellspacing="0" align="center"
 
{| border="1" cellpadding="5" cellspacing="0" align="center"
Line 18: Line 19:
 
| align="left" | T
 
| align="left" | T
 
| align="left" | 8bit unsigned int
 
| align="left" | 8bit unsigned int
| align="left" | Image type (1: Scalar, 3: Vector)
+
| align="left" | Number of Image Components (1:Scalar, >1:Vector). (NOTE: Vector data is stored fully interleaved.)
 
|-
 
|-
 
| align="left" | S
 
| align="left" | S
Line 35: Line 36:
 
| align="left" | 16 bit unsigned int
 
| align="left" | 16 bit unsigned int
 
| align="left" | Number of pixels in each direction
 
| align="left" | Number of pixels in each direction
|-
 
| align="left" | PX, PY, PZ
 
| align="left" | 32 bit float
 
| align="left" | center position of the image
 
 
|-
 
|-
 
| align="left" | TX, TY, TZ
 
| align="left" | TX, TY, TZ
 
| align="left" | 32 bit float
 
| align="left" | 32 bit float
| align="left" | Transverse vector (direction for 'i' index) / The length represents pixel size in 'i' direction
+
| align="left" | Transverse vector (direction for 'i' index) / The length represents pixel size in 'i' direction in millimeter
 
|-
 
|-
 
| align="left" | SX, SY, SZ
 
| align="left" | SX, SY, SZ
 
| align="left" | 32 bit float
 
| align="left" | 32 bit float
| align="left" | Transverse vector (direction for 'j' index) / The length represents pixel size in 'j' direction
+
| align="left" | Transverse vector (direction for 'j' index) / The length represents pixel size in 'j' direction in millimeter
 
|-
 
|-
 
| align="left" | NX, NY, NZ
 
| align="left" | NX, NY, NZ
 
| align="left" | 32 bit float
 
| align="left" | 32 bit float
| align="left" | Normal vector of image plane(direction for 'k' index) /  The length represents pixel size in 'z' direction or slice thickness
+
| align="left" | Normal vector of image plane(direction for 'k' index) /  The length represents pixel size in 'z' direction or slice thickness in millimeter
 +
|-
 +
| align="left" | PX, PY, PZ
 +
| align="left" | 32 bit float
 +
| align="left" | center position of the image (in millimeter) <font color=red>(*)</font>
 
|-
 
|-
 
| align="left" | DI, DJ, DK
 
| align="left" | DI, DJ, DK
Line 66: Line 67:
 
|}
 
|}
  
 +
<font color=red> * NOTE 1/10/11: There was a discrepancy between the protocol document and the library. Since the library has been used by most of OpenIGTLink software, the protocol document was modified to be consistent with the library. </font>
 +
 +
==GET_IMAGE==
 +
 +
{| 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
 +
|-
 +
|}
 +
 +
==STT_IMAGE==
 +
 +
{| 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
 +
|-
 +
 +
|}
 +
 +
==STP_IMAGE==
 +
 +
{| 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
 +
|-
 +
|}
 +
 +
==RTS_IMAGE==
 +
 +
{| 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" | Status
 +
| align="left" | 8 bit unsigned
 +
| align="left" | 0: Success 1: Error
 +
|-
 +
|}
 +
 +
=Notes=
 +
*The example application of vector type is:
 +
**Vector field
 +
**Image with complex pixel values (e.g. MRI raw data)
 +
**Color image
 +
*Vector data is stored fully interleaved. For example, if you are storing RGB color image, the order should be RGBRGBRGB... (not RRR....GGG...BBB...)
  
=GET_IMAGE=
+
=Implementations=
 +
IMAGE type is implemented in the following files:
 +
*[http://svn.na-mic.org/NAMICSandBox/trunk/OpenIGTLink/Source/igtlImageMessage.h igtlImageMessage.h]
 +
*[http://svn.na-mic.org/NAMICSandBox/trunk/OpenIGTLink/Source/igtlImageMessage.cxx igtlImageMessage.cxx]
  
=STT_IMAGE=
+
=Contributors=
 +
This message type was originally proposed in version 1 protocol.
  
=STP_IMAGE=
+
=Comments=

Latest revision as of 04:41, 30 November 2011

Home < OpenIGTLink < ProtocolV2 < Type < Image

<< Version 2 Index Page

Summary

The IMAGE format supports 2D or 3D images with metric information including image matrix size, voxel size, coordinate system type, position, and orientation. The body section of the IMAGE data consists of two parts: image header to transfer the metric information and image body to transfer the array of pixel or voxel values. The data type of pixel or voxel can be either scalar or vector, and numerical values can be 8-, 16-, 32-bit integer, or 32- or 64-bit floating point. The pixel values can be either big-endian or little-endian, since the sender software can specify the byte order in the image header. The format also supports “partial image transfer”, in which a region of the image is transferred instead of the whole image. This mechanism is suitable for real-time applications, in which images are updated region-by-region. The sub-volume must be box-shaped and defined by 6 parameters consisting of the indices for the corner voxel of the sub-volume and matrix size of the sub-volume.

Message Types

IMAGE

Data Type Description
V unsigned short version number
T 8bit unsigned int Number of Image Components (1:Scalar, >1:Vector). (NOTE: Vector data is stored fully interleaved.)
S 8bit unsigned int Scalar type (2:int8 3:uint8 4:int16 5:uint16 6:int32 7:uint32 10:float32 11:float64)
E 8bit unsigned int Endian for image data (1:BIG 2:LITTLE) (NOTE: values in image header is fixed to BIG endian)
O 8bit unsigned int image coordinate (1:RAS 2:LPS)
RI, RJ, RK 16 bit unsigned int Number of pixels in each direction
TX, TY, TZ 32 bit float Transverse vector (direction for 'i' index) / The length represents pixel size in 'i' direction in millimeter
SX, SY, SZ 32 bit float Transverse vector (direction for 'j' index) / The length represents pixel size in 'j' direction in millimeter
NX, NY, NZ 32 bit float Normal vector of image plane(direction for 'k' index) / The length represents pixel size in 'z' direction or slice thickness in millimeter
PX, PY, PZ 32 bit float center position of the image (in millimeter) (*)
DI, DJ, DK 16 bit unsigned int Starting index of subvolume
DRI, DRJ, DRK 16 bit unsigned int number of pixels of subvolume
IMAGE_DATA Binary image data () Image data (endian is determined by "E" field)

* NOTE 1/10/11: There was a discrepancy between the protocol document and the library. Since the library has been used by most of OpenIGTLink software, the protocol document was modified to be consistent with the library.

GET_IMAGE

Data Type Description

STT_IMAGE

Data Type Description

STP_IMAGE

Data Type Description

RTS_IMAGE

Data Type Description
Status 8 bit unsigned 0: Success 1: Error

Notes

  • The example application of vector type is:
    • Vector field
    • Image with complex pixel values (e.g. MRI raw data)
    • Color image
  • Vector data is stored fully interleaved. For example, if you are storing RGB color image, the order should be RGBRGBRGB... (not RRR....GGG...BBB...)

Implementations

IMAGE type is implemented in the following files:

Contributors

This message type was originally proposed in version 1 protocol.

Comments