Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __IGTL_UNIT_H
00018 #define __IGTL_UNIT_H
00019
00020 #include "igtl_types.h"
00021 #include "igtl_win32header.h"
00022 #include "igtl_unit.h"
00023
00024
00025
00026 #define IGTL_UNIT_PREFIX_NONE 0x0
00027 #define IGTL_UNIT_PREFIX_DEKA 0x1
00028 #define IGTL_UNIT_PREFIX_HECTO 0x2
00029 #define IGTL_UNIT_PREFIX_KILO 0x3
00030 #define IGTL_UNIT_PREFIX_MEGA 0x4
00031 #define IGTL_UNIT_PREFIX_GIGA 0x5
00032 #define IGTL_UNIT_PREFIX_TERA 0x6
00033 #define IGTL_UNIT_PREFIX_PETA 0x7
00034 #define IGTL_UNIT_PREFIX_DECI 0x9
00035 #define IGTL_UNIT_PREFIX_CENTI 0xA
00036 #define IGTL_UNIT_PREFIX_MILLI 0xB
00037 #define IGTL_UNIT_PREFIX_MICRO 0xC
00038 #define IGTL_UNIT_PREFIX_NANO 0xD
00039 #define IGTL_UNIT_PREFIX_PICO 0xE
00040 #define IGTL_UNIT_PREFIX_FEMTO 0xF
00041
00042
00043 #define IGTL_UNIT_SI_BASE_NONE 0x00
00044 #define IGTL_UNIT_SI_BASE_METER 0x01
00045 #define IGTL_UNIT_SI_BASE_GRAM 0x02
00046 #define IGTL_UNIT_SI_BASE_SECOND 0x03
00047 #define IGTL_UNIT_SI_BASE_AMPERE 0x04
00048 #define IGTL_UNIT_SI_BASE_KELVIN 0x05
00049 #define IGTL_UNIT_SI_BASE_MOLE 0x06
00050 #define IGTL_UNIT_SI_BASE_CANDELA 0x07
00051
00052
00053 #define IGTL_UNIT_SI_DERIVED_RADIAN 0x08
00054 #define IGTL_UNIT_SI_DERIVED_STERADIAN 0x09
00055 #define IGTL_UNIT_SI_DERIVED_HERTZ 0x0A
00056 #define IGTL_UNIT_SI_DERIVED_NEWTON 0x0B
00057 #define IGTL_UNIT_SI_DERIVED_PASCAL 0x0C
00058 #define IGTL_UNIT_SI_DERIVED_JOULE 0x0D
00059 #define IGTL_UNIT_SI_DERIVED_WATT 0x0E
00060 #define IGTL_UNIT_SI_DERIVED_COULOMB 0x0F
00061 #define IGTL_UNIT_SI_DERIVED_VOLT 0x10
00062 #define IGTL_UNIT_SI_DERIVED_FARAD 0x11
00063 #define IGTL_UNIT_SI_DERIVED_OHM 0x12
00064 #define IGTL_UNIT_SI_DERIVED_SIEMENS 0x13
00065 #define IGTL_UNIT_SI_DERIVED_WEBER 0x14
00066 #define IGTL_UNIT_SI_DERIVED_TESLA 0x15
00067 #define IGTL_UNIT_SI_DERIVED_HENRY 0x16
00068 #define IGTL_UNIT_SI_DERIVED_LUMEN 0x17
00069 #define IGTL_UNIT_SI_DERIVED_LUX 0x18
00070 #define IGTL_UNIT_SI_DERIVED_BECQUEREL 0x19
00071 #define IGTL_UNIT_SI_DERIVED_GRAY 0x1A
00072 #define IGTL_UNIT_SI_DERIVED_SIEVERT 0x1B
00073
00074 typedef igtl_uint64 igtl_unit;
00075
00076
00077 #ifdef __cplusplus
00078 extern "C" {
00079 #endif
00080
00081 typedef struct {
00082 igtl_uint8 prefix;
00083 igtl_uint8 unit[6];
00084 igtl_int8 exp[6];
00085 } igtl_unit_data;
00086
00087 void igtl_export igtl_unit_init(igtl_unit_data* data);
00088 igtl_unit igtl_export igtl_unit_pack(igtl_unit_data* data);
00089 int igtl_export igtl_unit_unpack(igtl_unit pack, igtl_unit_data* data);
00090
00091 #ifdef __cplusplus
00092 }
00093 #endif
00094
00095 #endif
00096
00097
00098
00099
00100