Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  
igtl_tdata.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: The OpenIGTLink Library
4  Language: C
5  Web page: http://openigtlink.org/
6 
7  Copyright (c) Insight Software Consortium. All rights reserved.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notices for more information.
12 
13 =========================================================================*/
14 
15 #ifndef __IGTL_TDATA_H
16 #define __IGTL_TDATA_H
17 
18 #include "igtl_win32header.h"
19 #include "igtl_util.h"
20 #include "igtl_types.h"
21 
22 #define IGTL_TDATA_ELEMENT_SIZE 70
23 #define IGTL_STT_TDATA_SIZE 36
24 #define IGTL_RTS_TDATA_SIZE 1
25 
26 #define IGTL_TDATA_LEN_NAME 20 /* Maximum length of tracking instrument name */
27 #define IGTL_STT_TDATA_LEN_COORDNAME 32 /* Maximum length of coordinate system name */
28 
29 #define IGTL_TDATA_TYPE_TRACKER 1 /* Tracker */
30 #define IGTL_TDATA_TYPE_6D 2 /* 6D instrument (regular instrument) */
31 #define IGTL_TDATA_TYPE_3D 3 /* 3D instrument (only tip of the instrument defined) */
32 #define IGTL_TDATA_TYPE_5D 4 /* 5D instrument (tip and handle are defined,
33  but not the normal vector) */
34 
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 #pragma pack(1) /* For 1-byte boundary in memroy */
41 
43 typedef struct {
44  char name[IGTL_TDATA_LEN_NAME]; /* Name of instrument / tracker */
45  igtl_uint8 type; /* Tracking data type (1-4) */
46  igtl_uint8 reserved; /* Reserved byte */
47  igtl_float32 transform[12]; /* same as TRANSFORM */
49 
50 
51 typedef struct {
52  igtl_int32 resolution; /* Minimum time between two frames. Use 0 for as fast as possible. */
53  /* If e.g. 50 ms is specified, the maximum update rate will be 20 Hz. */
54  char coord_name[IGTL_STT_TDATA_LEN_COORDNAME]; /* Name of the coordinate system */
56 
57 typedef struct {
58  igtl_int8 status; /* 0: Success 1: Error */
60 
61 #pragma pack()
62 
65 #define igtl_tdata_get_data_size(n) ((n) * IGTL_TDATA_ELEMENT_SIZE)
66 
69 #define igtl_tdata_get_data_n(size) ((size) / IGTL_TDATA_ELEMENT_SIZE)
70 
78 
80 igtl_uint64 igtl_export igtl_tdata_get_crc(igtl_tdata_element* tdatalist, int nelem);
81 igtl_uint64 igtl_export igtl_stt_tdata_get_crc(igtl_stt_tdata* stt_tdata);
82 igtl_uint64 igtl_export igtl_rts_tdata_get_crc(igtl_rts_tdata* rts_tdata);
84 
85 #ifdef __cplusplus
86 }
87 #endif
88 
89 #endif /* __IGTL_TDATA_H */
90 
91 
igtl_int8 status
Definition: igtl_tdata.h:58
igtl_uint64 igtl_export igtl_stt_tdata_get_crc(igtl_stt_tdata *stt_tdata)
#define igtl_export
void igtl_export igtl_rts_tdata_convert_byte_order(igtl_rts_tdata *rts_tdata)
void igtl_export igtl_stt_tdata_convert_byte_order(igtl_stt_tdata *stt_tdata)
igtl_uint8 reserved
Definition: igtl_tdata.h:46
void igtl_export igtl_tdata_convert_byte_order(igtl_tdata_element *tdatalist, int nelem)
igtl_uint64 igtl_export igtl_rts_tdata_get_crc(igtl_rts_tdata *rts_tdata)
#define IGTL_TDATA_LEN_NAME
Definition: igtl_tdata.h:26
#define IGTL_STT_TDATA_LEN_COORDNAME
Definition: igtl_tdata.h:27
igtl_uint8 type
Definition: igtl_tdata.h:45
igtl_int32 resolution
Definition: igtl_tdata.h:52
igtl_uint64 igtl_export igtl_tdata_get_crc(igtl_tdata_element *tdatalist, int nelem)

Generated at Sat Apr 15 2017 02:30:07 for OpenIGTLink by doxygen 1.8.13 written by Dimitri van Heesch, © 1997-2012