My Project
petunits.h
Go to the documentation of this file.
1 /******************************************************************************
2  Copyright (c) 2007,2010 by Turku PET Centre
3 
4  petunits.h
5 
6  Version:
7  2007-08-10 Vesa Oikonen
8  First introduced.
9  2010-07-01 VO
10  Added function cunitFromFilename().
11 
12 ******************************************************************************/
13 #ifndef _PETUNITS_H
14 #define _PETUNITS_H
15 /*****************************************************************************/
17 #ifndef MAX_UNITS_LEN
18 #define MAX_UNITS_LEN 31
19 #endif
20 /*****************************************************************************/
21 enum {
22  /* 0 */ CUNIT_UNKNOWN,
23  /* 1 */ CUNIT_CPS,
24  /* 2 */ CUNIT_COUNTS,
27  /* 5 */ CUNIT_PER_SEC,
28  /* 6 */ CUNIT_PER_MIN,
29  /* 7 */ CUNIT_ML_PER_ML,
30  /* 8 */ CUNIT_ML_PER_DL,
33  /* 11 */ CUNIT_UNITLESS,
34  /* 12 */ CUNIT_NCI_PER_ML,
35  /* 13 */ CUNIT_MBQ_PER_ML,
36  /* 14 */ CUNIT_BQ_PER_ML,
37  /* 15 */ CUNIT_UCI_PER_ML,
42  /* 20 */ CUNIT_PERCENTAGE,
43  /* 21 */ CUNIT_KCPS,
45 };
46 enum {
47  /* 0 */ TUNIT_UNKNOWN,
48  /* 1 */ TUNIT_SEC,
49  /* 2 */ TUNIT_MIN,
50  /* 3 */ TUNIT_UM,
51  /* 4 */ TUNIT_MM,
52  /* 5 */ TUNIT_CM,
53  /* 6 */ TUNIT_M,
54  /* 7 */ TUNIT_HOUR,
55  /* 8 */ TUNIT_MONTH,
56  /* 9 */ TUNIT_YEAR,
57  /* 10 */ TUNIT_MSEC
58 };
59 /*****************************************************************************/
60 extern int petCunitId(const char *unit);
61 extern int petTunitId(const char *timeunit);
62 /*****************************************************************************/
63 extern char *petCunit(int cunit);
64 extern char *petTunit(int tunit);
65 /*****************************************************************************/
66 extern int cunitFromFilename(char *fname);
67 /*****************************************************************************/
68 #endif
69 
Definition: petunits.h:25
Definition: petunits.h:52
int petTunitId(const char *timeunit)
Definition: petunits.c:177
Definition: petunits.h:33
Definition: petunits.h:28
Definition: petunits.h:32
Definition: petunits.h:53
Definition: petunits.h:41
Definition: petunits.h:36
int cunitFromFilename(char *fname)
Definition: petunits.c:227
Definition: petunits.h:49
Definition: petunits.h:51
Definition: petunits.h:23
Definition: petunits.h:22
int petCunitId(const char *unit)
Definition: petunits.c:98
Definition: petunits.h:31
Definition: petunits.h:27
Definition: petunits.h:50
Definition: petunits.h:47
Definition: petunits.h:39
Definition: petunits.h:37
Definition: petunits.h:40
Definition: petunits.h:56
Definition: petunits.h:29
Definition: petunits.h:57
Definition: petunits.h:34
Definition: petunits.h:30
Definition: petunits.h:55
Definition: petunits.h:43
Definition: petunits.h:38
char * petTunit(int tunit)
Definition: petunits.c:212
Definition: petunits.h:26
Definition: petunits.h:48
Definition: petunits.h:24
Definition: petunits.h:54
Definition: petunits.h:42
Definition: petunits.h:44
Definition: petunits.h:35
char * petCunit(int cunit)
Definition: petunits.c:199