Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  
igtl_position.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: OpenIGTLink Library
4  Module: $HeadURL: http://svn.na-mic.org/NAMICSandBox/trunk/OpenIGTLink/Source/igtlutil/igtl_position.h $
5  Language: C
6  Date: $Date: 2009-11-13 11:37:44 -0500 (Fri, 13 Nov 2009) $
7  Version: $Revision: 5335 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10 
11  This software is distributed WITHOUT ANY WARRANTY; without even
12  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13  PURPOSE. See the above copyright notices for more information.
14 
15 =========================================================================*/
16 
17 #ifndef __IGTL_POSITION_H
18 #define __IGTL_POSITION_H
19 
20 #include "igtl_win32header.h"
21 #include "igtl_util.h"
22 #include "igtl_types.h"
23 
24 #define IGTL_POSITION_MESSAGE_DEFAULT_SIZE 28
25 
26 #define IGTL_POSITION_MESSAGE_POSITON_ONLY_SIZE 12 /* size w/o quaternion */
27 #define IGTL_POSITION_MESSAGE_WITH_QUATERNION3_SIZE 24 /* size 3-element quaternion */
28 
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 #pragma pack(1) /* For 1-byte boundary in memroy */
35 /*
36  * Status data header for OpenIGTLinik protocol
37  *
38  */
39 
40 typedef struct {
41  igtl_float32 position[3]; /* (x, y, z) */
42  igtl_float32 quaternion[4]; /* (ox, oy, oz, w) */
44 
45 #pragma pack()
46 
47 /*
48  * Byte order conversion for the position data structure
49  *
50  * This function converts endianness of each member variable
51  * in igtl_status_header from host byte order to network byte order,
52  * or vice versa.
53  */
54 
56 
57 
58 /*
59  * CRC calculation
60  *
61  * This function calculates CRC of position message
62  *
63  */
64 
66 
67 #ifdef __cplusplus
68 }
69 #endif
70 
71 #endif /* __IGTL_POSITION_H */
72 
73 
74 

Generated at Thu Mar 20 2014 16:32:06 for OpenIGTLink by doxygen 1.8.1.2 written by Dimitri van Heesch, © 1997-2000