File: trackingdata.md

package info (click to toggle)
openigtlink 3.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,080 kB
  • sloc: cpp: 20,076; ansic: 6,704; sh: 227; perl: 74; makefile: 46
file content (149 lines) | stat: -rwxr-xr-x 4,805 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
---
layout: page
title: Specification > TrackingData
header: Pages
---
{% include JB/setup %}

## Summary

The TDATA message type is intended for transferring 3D positions of surgical tools, markers etc. Those positions are often measured by optical, electromagnetic or other type of 3D position sensor continuously and transferred as series of messages. Since it is important for software that receives TDATA to control data flow, STT_TDATA query data type has interval field to control the frame rate of consecutive messages.


## Message Types

### TDATA

<table border="1" cellpadding="5" cellspacing="0" align="center">

<tbody><tr>
<td style="background:#e0e0e0;"> Data
</td><td style="background:#e0e0e0;"> Type
</td><td style="background:#e0e0e0;"> Description
</td></tr>
<tr>
<td align="left"> NAME_1
</td><td align="left"> char[20]
</td><td align="left"> Name (=Id) of the instrument/tracker
</td></tr>
<tr>
<td align="left"> TYPE_1
</td><td align="left"> 8 bit unsigned
</td><td align="left"> 1: tracker, 2: 6D instrument (regular instrument), 3: 3D instrument (only tip of the instrument defined), 4: 5D instrument (tip and handle are defined, but not the normal vector)
</td></tr>
<tr>
<td align="left"> --
</td><td align="left"> 8 bit unsigned
</td><td align="left"> Reserved
</td></tr>
<tr>
<td align="left"> MATRIX_1
</td><td align="left"> 32 bit float
</td><td align="left"> 12 values like in TRANSFORM message
</td></tr>
<tr>
<td colspan="3" align="center" style="background:#f0f0f0;"> ...
</td></tr>
<tr>
<td align="left"> NAME_N
</td><td align="left"> char[20]
</td><td align="left"> Name (=Id) of the instrument/tracker
</td></tr>
<tr>
<td align="left"> TYPE_N
</td><td align="left"> 8 bit unsigned
</td><td align="left"> 1: tracker, 2: 6D instrument (regular instrument), 3: 3D instrument (only tip of the instrument defined), 4: 5D instrument (tip and handle are defined, but not the normal vector)
</td></tr>
<tr>
<td align="left"> --
</td><td align="left"> 8 bit unsigned
</td><td align="left"> Reserved
</td></tr>
<tr>
<td align="left"> MATRIX_N
</td><td align="left"> 32 bit float
</td><td align="left"> 12 values like in TRANSFORM message
</td></tr>
</tbody></table>

### GET_TDATA
<table border="1" cellpadding="5" cellspacing="0" align="center">
<tbody><tr>
<td style="background:#e0e0e0;"> Data
</td><td style="background:#e0e0e0;"> Type
</td><td style="background:#e0e0e0;"> Description
</td></tr>
</tbody></table>

### STT_TDATA
<table border="1" cellpadding="5" cellspacing="0" align="center">

<tbody><tr>
<td style="background:#e0e0e0;"> Data
</td><td style="background:#e0e0e0;"> Type
</td><td style="background:#e0e0e0;"> Description
</td></tr>
<tr>
<td align="left"> Resolution
</td><td align="left"> 32 bit unsigned
</td><td align="left"> Minimum time between two frames. Use 0 for as fast as possible. If e.g. 50 ms is specified, the maximum update rate will be 20 Hz.
</td></tr>
<tr>
<td align="left"> Coordinate system name
</td><td align="left"> char[32]
</td><td align="left"> Coordinate system to use. Can be empty for default coordinate system. (not included if action = 2)
</td></tr>
</tbody></table>
* All tracking data from one frame is included.
* Invisible/unavailable trackers/instruments are not included.
* Easy to develop. Sample pseudo code: while(true) { recv(trackingdata); updateView(trackingdata); }
* Usually the tracking data will be sent using the standard coordinate system, which is also used for POINT, IMAGE, ... But this does only work after patient registration. Therefore the body of START_PUSH has an optional field for specifing the coordinate system "CAMERA". To switch back to the standard coordinate system, one has to send STOP_PUSH and afterwards START_PUSH without explicitly specifing the camera coordinate system.

### STP_TDATA

<table border="1" cellpadding="5" cellspacing="0" align="center">

<tbody><tr>
<td style="background:#e0e0e0;"> Data
</td><td style="background:#e0e0e0;"> Type
</td><td style="background:#e0e0e0;"> Description
</td></tr>
</tbody></table>

### RTS_TDATA
<table border="1" cellpadding="5" cellspacing="0" align="center">

<tbody><tr>
<td style="background:#e0e0e0;"> Data
</td><td style="background:#e0e0e0;"> Type
</td><td style="background:#e0e0e0;"> Description
</td></tr>
<tr>
<td align="left"> Status
</td><td align="left"> 8 bit unsigned
</td><td align="left"> 0: Success 1: Error
</td></tr>
</tbody></table>


## Implementations

The TDATA message type is implemented in the following source code.

* [igtlTrackingDataMessage.h](https://github.com/openigtlink/OpenIGTLink/blob/master/Source/igtlTrackingDataMessage.h)
* [igtlTrackingDataMessage.cxx](https://github.com/openigtlink/OpenIGTLink/blob/master/Source/igtlTrackingDataMessage.cxx)

## Contributors

* Alexander Schaal