Main Page
Namespace List
Class Hierarchy
Alphabetical List
Compound List
File List
Namespace Members
Compound Members
File Members
Source
igtlutil
igtl_unit.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_UNIT_H
16
#define __IGTL_UNIT_H
17
18
#include "
igtl_types.h
"
19
#include "
igtl_win32header.h
"
20
#include "
igtl_unit.h
"
21
22
23
/* PREFIX */
24
#define IGTL_UNIT_PREFIX_NONE 0x0
/* None */
25
#define IGTL_UNIT_PREFIX_DEKA 0x1
/* deka (deca) (1e1) */
26
#define IGTL_UNIT_PREFIX_HECTO 0x2
/* hecto (1e2) */
27
#define IGTL_UNIT_PREFIX_KILO 0x3
/* kilo (1e3) */
28
#define IGTL_UNIT_PREFIX_MEGA 0x4
/* mega (1e6) */
29
#define IGTL_UNIT_PREFIX_GIGA 0x5
/* giga (1e9) */
30
#define IGTL_UNIT_PREFIX_TERA 0x6
/* tera (1e12) */
31
#define IGTL_UNIT_PREFIX_PETA 0x7
/* peta (1e15) */
32
#define IGTL_UNIT_PREFIX_DECI 0x9
/* deci (1e-1) */
33
#define IGTL_UNIT_PREFIX_CENTI 0xA
/* centi (1e-2) */
34
#define IGTL_UNIT_PREFIX_MILLI 0xB
/* milli (1e-3) */
35
#define IGTL_UNIT_PREFIX_MICRO 0xC
/* micro (1e-6) */
36
#define IGTL_UNIT_PREFIX_NANO 0xD
/* nano (1e-9) */
37
#define IGTL_UNIT_PREFIX_PICO 0xE
/* pico (1e-12) */
38
#define IGTL_UNIT_PREFIX_FEMTO 0xF
/* femto (1e-15) */
39
40
/* SI Base Units */
41
#define IGTL_UNIT_SI_BASE_NONE 0x00
42
#define IGTL_UNIT_SI_BASE_METER 0x01
/* meter */
43
#define IGTL_UNIT_SI_BASE_GRAM 0x02
/* gram */
44
#define IGTL_UNIT_SI_BASE_SECOND 0x03
/* second */
45
#define IGTL_UNIT_SI_BASE_AMPERE 0x04
/* ampere */
46
#define IGTL_UNIT_SI_BASE_KELVIN 0x05
/* kelvin */
47
#define IGTL_UNIT_SI_BASE_MOLE 0x06
/* mole */
48
#define IGTL_UNIT_SI_BASE_CANDELA 0x07
/* candela */
49
50
/* SI Derived Units */
51
#define IGTL_UNIT_SI_DERIVED_RADIAN 0x08
/* radian meter/meter */
52
#define IGTL_UNIT_SI_DERIVED_STERADIAN 0x09
/* steradian meter^2/meter^2 */
53
#define IGTL_UNIT_SI_DERIVED_HERTZ 0x0A
/* hertz /second */
54
#define IGTL_UNIT_SI_DERIVED_NEWTON 0x0B
/* newton meter-kilogram/second^2 */
55
#define IGTL_UNIT_SI_DERIVED_PASCAL 0x0C
/* pascal kilogram/meter-second^2 */
56
#define IGTL_UNIT_SI_DERIVED_JOULE 0x0D
/* joule meter^2-kilogram/second^2 */
57
#define IGTL_UNIT_SI_DERIVED_WATT 0x0E
/* watt meter^2-kilogram/second^3 */
58
#define IGTL_UNIT_SI_DERIVED_COULOMB 0x0F
/* coulomb second-ampere */
59
#define IGTL_UNIT_SI_DERIVED_VOLT 0x10
/* volt meter^2-kilogram/second^3-ampere */
60
#define IGTL_UNIT_SI_DERIVED_FARAD 0x11
/* farad second^4-ampere^2/meter^2-kilogram */
61
#define IGTL_UNIT_SI_DERIVED_OHM 0x12
/* ohm meter^2-kilogram/second^3-ampere^2 */
62
#define IGTL_UNIT_SI_DERIVED_SIEMENS 0x13
/* siemens second^3-ampere^2/meter^2-kilogram */
63
#define IGTL_UNIT_SI_DERIVED_WEBER 0x14
/* weber meter^2-kilogram/second^2-ampere */
64
#define IGTL_UNIT_SI_DERIVED_TESLA 0x15
/* tesla kilogram/second^2-ampere */
65
#define IGTL_UNIT_SI_DERIVED_HENRY 0x16
/* henry meter^2-kilogram/second^2-ampere^2 */
66
#define IGTL_UNIT_SI_DERIVED_LUMEN 0x17
/* lumen candela-steradian */
67
#define IGTL_UNIT_SI_DERIVED_LUX 0x18
/* lux candela-steradian/meter^2 */
68
#define IGTL_UNIT_SI_DERIVED_BECQUEREL 0x19
/* becquerel /second */
69
#define IGTL_UNIT_SI_DERIVED_GRAY 0x1A
/* gray meter^2/second^2 */
70
#define IGTL_UNIT_SI_DERIVED_SIEVERT 0x1B
/* sievert meter^2/second^2 */
71
72
typedef
igtl_uint64
igtl_unit
;
73
74
75
#ifdef __cplusplus
76
extern
"C"
{
77
#endif
78
79
typedef
struct
{
80
igtl_uint8
prefix
;
/* Prefix */
81
igtl_uint8 unit[6];
/* Either SI-Base or SI-Derived */
82
igtl_int8 exp[6];
/* Must be within [-7, 7] */
83
}
igtl_unit_data
;
84
85
void
igtl_export
igtl_unit_init
(
igtl_unit_data
* data);
86
igtl_unit
igtl_export
igtl_unit_pack
(
igtl_unit_data
* data);
87
int
igtl_export
igtl_unit_unpack
(
igtl_unit
pack,
igtl_unit_data
* data);
88
89
#ifdef __cplusplus
90
}
91
#endif
92
93
#endif
/* __IGTL_UNIT_H */
94
95
96
97
igtl_unit
igtl_uint64 igtl_unit
Definition:
igtl_unit.h:72
igtl_unit_data::prefix
igtl_uint8 prefix
Definition:
igtl_unit.h:80
igtl_types.h
igtl_unit_unpack
int igtl_export igtl_unit_unpack(igtl_unit pack, igtl_unit_data *data)
igtl_unit_data
Definition:
igtl_unit.h:79
igtl_unit_pack
igtl_unit igtl_export igtl_unit_pack(igtl_unit_data *data)
igtl_win32header.h
igtl_unit_init
void igtl_export igtl_unit_init(igtl_unit_data *data)
igtl_unit.h
igtl_export
#define igtl_export
Definition:
igtl_win32header.h:28
Generated for OpenIGTLink by
Doxygen
1.8.17 written by
Dimitri van Heesch
, © 1997-2012