Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  
igtl_types.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_TYPES_H
16#define __IGTL_TYPES_H
17
18#include "igtl_typeconfig.h"
19
20/* 8-bit integer type */
21#if IGTL_SIZEOF_CHAR == 1
22 typedef unsigned char igtl_uint8;
23 typedef signed char igtl_int8;
24#else
25 # error "No native data type can represent an 8-bit integer."
26#endif
27
28/* 16-bit integer type */
29#if IGTL_SIZEOF_SHORT == 2
30 typedef unsigned short igtl_uint16;
31 typedef signed short igtl_int16;
32#elif IGTL_SIZEOF_INT == 2
33 typedef unsigned int igtl_uint16;
34 typedef signed int igtl_int16;
35#else
36 # error "No native data type can represent a 16-bit integer."
37#endif
38
39/* 32-bit integer type */
40#if IGTL_SIZEOF_INT == 4
41 typedef unsigned int igtl_uint32;
42 typedef signed int igtl_int32;
43#elif IGTL_SIZEOF_LONG == 4
44 typedef unsigned long igtl_uint32;
45 typedef signed long igtl_int32;
46#else
47 # error "No native data type can represent a 32-bit integer."
48#endif
49
50/* 64-bit integer type */
51#if defined(IGTL_TYPE_USE_LONG_LONG) && IGTL_SIZEOF_LONG_LONG == 8
52 typedef unsigned long long igtl_uint64;
53 typedef signed long long igtl_int64;
54#elif IGTL_SIZEOF_INT == 8
55 typedef unsigned int igtl_uint64;
56 typedef signed int igtl_int64;
57#elif IGTL_SIZEOF_LONG == 8
58 typedef unsigned long igtl_uint64;
59 typedef signed long igtl_int64;
60#elif defined(IGTL_TYPE_USE___INT64) && IGTL_SIZEOF___INT64 == 8
61 typedef unsigned __int64 igtl_uint64;
62 typedef signed __int64 igtl_int64;
63#elif defined(IGTL_TYPE_USE_INT64_T) && IGTL_SIZEOF_INT64_T == 8
64 typedef unsigned int64_t igtl_uint64;
65 typedef signed int64_t igtl_int64;
66#else
67 # error "No native data type can represent a 64-bit integer."
68#endif
69
70/* 32-bit floating point type */
71#if IGTL_SIZEOF_FLOAT == 4
72 typedef float igtl_float32;
73#else
74# error "No native data type can represent a 32-bit floating point value."
75#endif
76
77/* 64-bit floating point type */
78#if IGTL_SIZEOF_DOUBLE == 8
79 typedef double igtl_float64;
80#else
81# error "No native data type can represent a 64-bit floating point value."
82#endif
83
84/* 128-bit complex type (64-bit real + 64-bit imaginal)*/
85typedef double igtl_complex[2];
86
87
88#endif /* __IGTL_TYPES_H */
89
90
91
92
double igtl_complex[2]
Definition igtl_types.h:85

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