Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  
igtl_qtdata.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_QTDATA_H
16#define __IGTL_QTDATA_H
17
18#include "igtl_win32header.h"
19#include "igtl_util.h"
20#include "igtl_types.h"
21
22#define IGTL_QTDATA_ELEMENT_SIZE 50
23#define IGTL_STT_QTDATA_SIZE 36
24#define IGTL_RTS_QTDATA_SIZE 1
25
26#define IGTL_QTDATA_LEN_NAME 20 /* Maximum length of tracking instrument name */
27#define IGTL_STT_QTDATA_LEN_COORDNAME 32 /* Maximum length of coordinate system name */
28
29#define IGTL_QTDATA_TYPE_TRACKER 1 /* Tracker */
30#define IGTL_QTDATA_TYPE_6D 2 /* 6D instrument (regular instrument) */
31#define IGTL_QTDATA_TYPE_3D 3 /* 3D instrument (only tip of the instrument defined) */
32#define IGTL_QTDATA_TYPE_5D 4 /* 5D instrument (tip and handle are defined,
33 but not the normal vector) */
34
35
36#ifdef __cplusplus
37extern "C" {
38#endif
39
40#pragma pack(1) /* For 1-byte boundary in memroy */
41
43typedef struct {
44 char name[IGTL_QTDATA_LEN_NAME]; /* Name of instrument / tracker */
45 igtl_uint8 type; /* Tracking data type (1-4) */
46 igtl_uint8 reserved; /* Reserved byte */
47 igtl_float32 position[3]; /* position (x, y, z) */
48 igtl_float32 quaternion[4]; /* orientation as quaternion (qx, qy, qz, w) */
51
53typedef struct {
54 igtl_int32 resolution; /* Minimum time between two frames. Use 0 for as fast as possible. */
55 /* If e.g. 50 ms is specified, the maximum update rate will be 20 Hz. */
56 char coord_name[IGTL_STT_QTDATA_LEN_COORDNAME]; /* Name of the coordinate system */
59typedef struct {
60 igtl_int8 status; /* 0: Success 1: Error */
62
63#pragma pack()
64
67#define igtl_qtdata_get_data_size(n) ((n) * IGTL_QTDATA_ELEMENT_SIZE)
68
71#define igtl_qtdata_get_data_n(size) ((size) / IGTL_QTDATA_ELEMENT_SIZE)
72
80
82igtl_uint64 igtl_export igtl_qtdata_get_crc(igtl_qtdata_element* qtdatalist, int nelem);
86
87#ifdef __cplusplus
88}
89#endif
90
91#endif /* __IGTL_QTDATA_H */
92
93
#define IGTL_STT_QTDATA_LEN_COORDNAME
Definition igtl_qtdata.h:27
void igtl_export igtl_qtdata_convert_byte_order(igtl_qtdata_element *qtdatalist, int nelem)
void igtl_export igtl_rts_qtdata_convert_byte_order(igtl_rts_qtdata *rts_qtdata)
igtl_uint64 igtl_export igtl_rts_qtdata_get_crc(igtl_rts_qtdata *rts_qtdata)
igtl_uint64 igtl_export igtl_qtdata_get_crc(igtl_qtdata_element *qtdatalist, int nelem)
void igtl_export igtl_stt_qtdata_convert_byte_order(igtl_stt_qtdata *stt_qtdata)
#define IGTL_QTDATA_LEN_NAME
Definition igtl_qtdata.h:26
igtl_uint64 igtl_export igtl_stt_qtdata_get_crc(igtl_stt_qtdata *stt_qtdata)
#define igtl_export

Generated for OpenIGTLink by Doxygen 1.9.8 written by Dimitri van Heesch, © 1997-2012