Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

igtl_unit.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   OpenIGTLink Library
00004   Module:    $HeadURL:  $
00005   Language:  C
00006   Date:      $Date: 2009-11-13 11:37:44 -0500 (Fri, 13 Nov 2009) $
00007   Version:   $Revision: 5335 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010 
00011   This software is distributed WITHOUT ANY WARRANTY; without even
00012   the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00013   PURPOSE.  See the above copyright notices for more information.
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 /* PREFIX */
00026 #define IGTL_UNIT_PREFIX_NONE   0x0 /* None */
00027 #define IGTL_UNIT_PREFIX_DEKA   0x1 /* deka (deca) (1e1) */
00028 #define IGTL_UNIT_PREFIX_HECTO  0x2 /* hecto (1e2) */
00029 #define IGTL_UNIT_PREFIX_KILO   0x3 /* kilo (1e3) */
00030 #define IGTL_UNIT_PREFIX_MEGA   0x4 /* mega (1e6) */
00031 #define IGTL_UNIT_PREFIX_GIGA   0x5 /* giga (1e9) */
00032 #define IGTL_UNIT_PREFIX_TERA   0x6 /* tera (1e12) */
00033 #define IGTL_UNIT_PREFIX_PETA   0x7 /* peta (1e15) */
00034 #define IGTL_UNIT_PREFIX_DECI   0x9 /* deci (1e-1) */
00035 #define IGTL_UNIT_PREFIX_CENTI  0xA /* centi (1e-2) */
00036 #define IGTL_UNIT_PREFIX_MILLI  0xB /* milli (1e-3) */
00037 #define IGTL_UNIT_PREFIX_MICRO  0xC /* micro (1e-6) */
00038 #define IGTL_UNIT_PREFIX_NANO   0xD /* nano (1e-9) */
00039 #define IGTL_UNIT_PREFIX_PICO   0xE /* pico (1e-12) */
00040 #define IGTL_UNIT_PREFIX_FEMTO  0xF /* femto (1e-15) */
00041 
00042 /* SI Base Units */
00043 #define IGTL_UNIT_SI_BASE_NONE    0x00
00044 #define IGTL_UNIT_SI_BASE_METER   0x01 /* meter */
00045 #define IGTL_UNIT_SI_BASE_GRAM    0x02 /* gram */
00046 #define IGTL_UNIT_SI_BASE_SECOND  0x03 /* second */
00047 #define IGTL_UNIT_SI_BASE_AMPERE  0x04 /* ampere */
00048 #define IGTL_UNIT_SI_BASE_KELVIN  0x05 /* kelvin */
00049 #define IGTL_UNIT_SI_BASE_MOLE    0x06 /* mole */
00050 #define IGTL_UNIT_SI_BASE_CANDELA 0x07 /* candela */
00051 
00052 /* SI Derived Units */
00053 #define IGTL_UNIT_SI_DERIVED_RADIAN    0x08  /* radian     meter/meter */
00054 #define IGTL_UNIT_SI_DERIVED_STERADIAN 0x09  /* steradian  meter^2/meter^2 */
00055 #define IGTL_UNIT_SI_DERIVED_HERTZ     0x0A  /* hertz      /second */
00056 #define IGTL_UNIT_SI_DERIVED_NEWTON    0x0B  /* newton     meter-kilogram/second^2 */
00057 #define IGTL_UNIT_SI_DERIVED_PASCAL    0x0C  /* pascal     kilogram/meter-second^2 */
00058 #define IGTL_UNIT_SI_DERIVED_JOULE     0x0D  /* joule      meter^2-kilogram/second^2 */
00059 #define IGTL_UNIT_SI_DERIVED_WATT      0x0E  /* watt       meter^2-kilogram/second^3 */
00060 #define IGTL_UNIT_SI_DERIVED_COULOMB   0x0F  /* coulomb    second-ampere */
00061 #define IGTL_UNIT_SI_DERIVED_VOLT      0x10  /* volt       meter^2-kilogram/second^3-ampere */
00062 #define IGTL_UNIT_SI_DERIVED_FARAD     0x11  /* farad      second^4-ampere^2/meter^2-kilogram */
00063 #define IGTL_UNIT_SI_DERIVED_OHM       0x12  /* ohm        meter^2-kilogram/second^3-ampere^2 */
00064 #define IGTL_UNIT_SI_DERIVED_SIEMENS   0x13  /* siemens    second^3-ampere^2/meter^2-kilogram */
00065 #define IGTL_UNIT_SI_DERIVED_WEBER     0x14  /* weber      meter^2-kilogram/second^2-ampere */
00066 #define IGTL_UNIT_SI_DERIVED_TESLA     0x15  /* tesla      kilogram/second^2-ampere */
00067 #define IGTL_UNIT_SI_DERIVED_HENRY     0x16  /* henry      meter^2-kilogram/second^2-ampere^2 */
00068 #define IGTL_UNIT_SI_DERIVED_LUMEN     0x17  /* lumen      candela-steradian */
00069 #define IGTL_UNIT_SI_DERIVED_LUX       0x18  /* lux        candela-steradian/meter^2 */
00070 #define IGTL_UNIT_SI_DERIVED_BECQUEREL 0x19  /* becquerel  /second */
00071 #define IGTL_UNIT_SI_DERIVED_GRAY      0x1A  /* gray       meter^2/second^2 */
00072 #define IGTL_UNIT_SI_DERIVED_SIEVERT   0x1B  /* sievert    meter^2/second^2 */
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;            /* Prefix */
00083   igtl_uint8     unit[6];           /* Either SI-Base or SI-Derived */
00084   igtl_int8      exp[6];            /* Must be within [-7, 7] */
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 /* __IGTL_UNIT_H */
00096 
00097 
00098 
00099 
00100 

Generated at Mon May 2 2011 03:56:12 for OpenIGTLink by doxygen 1.7.3 written by Dimitri van Heesch, © 1997-2000