Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  
igtl_sensor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: OpenIGTLink Library
4  Module: $HeadURL: $
5  Language: C
6  Date: $Date: 2010-11-23 14:47:40 -0500 (Tue, 23 Nov 2010) $
7  Version: $Revision: 6958 $
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_SENSOR_H
18 #define __IGTL_SENSOR_H
19 
20 #include "igtl_win32header.h"
21 #include "igtl_util.h"
22 #include "igtl_types.h"
23 #include "igtl_unit.h"
24 #include "igtl_win32header.h"
25 
26 #define IGTL_SENSOR_HEADER_SIZE 10
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 #pragma pack(1) /* For 1-byte boundary in memroy */
33 
34 typedef struct {
35  igtl_uint8 larray; /* Length of array (0-255) */
36  igtl_uint8 status; /* (reserved) sensor status */
37  igtl_unit unit; /* Unit */
39 
40 #pragma pack()
41 
42 /*
43  * Sensor data size
44  *
45  * This function calculates size of the pixel array, which will be
46  * transferred with the specified header.
47  */
48 
50 
51 /*
52  * Byte order conversion
53  *
54  * This function converts endianness from host byte order to network byte order,
55  * or vice versa.
56  */
57 
58 void igtl_export igtl_sensor_convert_byte_order(igtl_sensor_header * header, igtl_float64* data);
59 
60 
61 /*
62  * CRC calculation
63  *
64  * This function calculates CRC of image data body including header
65  * and array of pixel data.
66  *
67  */
68 
69 igtl_uint64 igtl_export igtl_sensor_get_crc(igtl_sensor_header * header, igtl_float64* data);
70 
71 #ifdef __cplusplus
72 }
73 #endif
74 
75 #endif /* __IGTL_SENSOR_H */
76 

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