Difference between revisions of "OpenIGTLink/Discussion/NewCommands"

From NAMIC Wiki
Jump to: navigation, search
m
m
Line 16: Line 16:
 
= Image data =
 
= Image data =
  
IMAGE + COLORTABLE + METADATA
+
I would like to introduce a GET_IMGDATA message. This get-message has no parameters. The answer is IMGDATA:
 +
 
 +
{| 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" | Name
 +
| align="left" | char[64]
 +
| align="left" | Pretty name of the image
 +
|-
 +
| align="left" | Id
 +
| align="left" | char[20]
 +
| align="left" | Id to query the IMAGE and COLORT
 +
|-
 +
| align="left" | Modality
 +
| align="left" | char[32]
 +
| align="left" | String which specifies the modality
 +
|-
 +
| align="left" | Patient name
 +
| align="left" | char[64]
 +
| align="left" | Name of the patient
 +
|-
 +
| align="left" | Patient id
 +
| align="left" | char[64]
 +
| align="left" | Id of the patient
 +
|-
 +
| align="left" | Day
 +
| align="left" | 8 bit unsigned int
 +
| align="left" | Scan day
 +
|-
 +
| align="left" | Month
 +
| align="left" | 8 bit unsigned int
 +
| align="left" | Scan month
 +
|-
 +
| align="left" | Year
 +
| align="left" | 16 bit unsigned int
 +
| align="left" | Scan year
 +
|-
 +
| align="left" | RI, RJ, RK
 +
| align="left" | 16 bit unsigned int
 +
| align="left" | Number of pixels in each direction (same as in IMAGE)
 +
|-
 +
| align="left" | S
 +
| align="left" | 8 bit unsigned int
 +
| align="left" | Scalar type (e.g. 3:uint8, 5:uint16, same as in IMAGE)
 +
|-
 +
|}
 +
 
 +
* More than one item can be transmitted. The number is bodySize/itemSize.
 +
* To get the IMAGE, GET_IMAGE is used with the Id in the device name field.
 +
* To get the COLORTABLE, GET_COLORT is used with the Id in the device name field. See [[OpenIGTLink/ProtocolV2 | Standard OpenIGTLink Protocol description -- Version 2 draft]] for details.
  
 
= Point or fiducal data =
 
= Point or fiducal data =

Revision as of 09:40, 7 April 2010

Home < OpenIGTLink < Discussion < NewCommands

Common get list ?

A common GET_LIST message could be defined with the data type, like IMAGE, in the device name field. The answer could be a LIST message with ids (each 20 bytes, so it can they used as device names) of available data. Afterwards a GET_xy message with the id could be used to query the details.

Well, I don't think this will help in practice.

Example: an application would like to show a list of available images before querying them from the server. Ids are not very specific, so an additional meta data message must be defined. So we have a) GET_LIST and b) for each id: GET_IMGMETA. It would be easier to get all the meta data at once, which returns a list of meta data.

Next example: all ficucial points shall be queried. A two-step mechanism would result in 1+n queries, whereas getting all points at once would end in only 1 query. Even if the user would like to get only 1 specific point, how could he know which id to use?

Another reason is that sending all the data at once is much more efficient.

However, there might be use cases, where single items are useful. If the item size is constant, it makes no difference if only one or several items are transmitted. The number is bodySize/itemSize. Using this definion, single items can still be pushed over the network as it's currently done in most OpenIGTLink applications.

Image data

I would like to introduce a GET_IMGDATA message. This get-message has no parameters. The answer is IMGDATA:

Data Type Description
Name char[64] Pretty name of the image
Id char[20] Id to query the IMAGE and COLORT
Modality char[32] String which specifies the modality
Patient name char[64] Name of the patient
Patient id char[64] Id of the patient
Day 8 bit unsigned int Scan day
Month 8 bit unsigned int Scan month
Year 16 bit unsigned int Scan year
RI, RJ, RK 16 bit unsigned int Number of pixels in each direction (same as in IMAGE)
S 8 bit unsigned int Scalar type (e.g. 3:uint8, 5:uint16, same as in IMAGE)
* More than one item can be transmitted. The number is bodySize/itemSize.
* To get the IMAGE, GET_IMAGE is used with the Id in the device name field.
* To get the COLORTABLE, GET_COLORT is used with the Id in the device name field. See  Standard OpenIGTLink Protocol description -- Version 2 draft for details.

Point or fiducal data

POINTS

Start / stop push

START_PUSH + STOP_PUSH

Tracking data

TRACKINGDATA