Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  
igtl_string.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_STRING_H
18 #define __IGTL_STRING_H
19 
20 #include "igtl_win32header.h"
21 #include "igtl_util.h"
22 #include "igtl_types.h"
23 #include "igtl_win32header.h"
24 
25 #define IGTL_STRING_HEADER_SIZE 4
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 #pragma pack(1) /* For 1-byte boundary in memroy */
32 
33 typedef struct {
34  igtl_uint16 encoding; /* Character encoding type as MIBenum value (defined by IANA). Default=3. */
35  /* Please refer http://www.iana.org/assignments/character-sets for detail */
36  igtl_uint16 length; /* Length of string */
38 
39 #pragma pack()
40 
41 /*
42  * String data size
43  *
44  * This function calculates size of the pixel array, which will be
45  * transferred with the specified header.
46  */
47 
49 
50 /*
51  * Byte order conversion
52  *
53  * This function converts endianness from host byte order to network byte order,
54  * or vice versa.
55  * NOTE: It is developer's responsibility to have the string body with BOM
56  * (byte order mark) or in big endian ordrer.
57  */
58 
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_string_get_crc(igtl_string_header * header, void* string);
70 
71 #ifdef __cplusplus
72 }
73 #endif
74 
75 #endif /* __IGTL_STRING_H */
76 
77 
78 

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