petunits.h
Go to the documentation of this file.
1 /******************************************************************************
2  Copyright (c) 2007,2010,2011 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  2011-07-01 VO
12  Added units Bq, kBq, MBq, GBq, nCi, uCi, and mCi.
13 
14 ******************************************************************************/
15 #ifndef _PETUNITS_H
16 #define _PETUNITS_H
17 /*****************************************************************************/
19 #ifndef MAX_UNITS_LEN
20 #define MAX_UNITS_LEN 31
21 #endif
22 /*****************************************************************************/
23 enum {
24  /* 0 */ CUNIT_UNKNOWN,
25  /* 1 */ CUNIT_CPS,
26  /* 2 */ CUNIT_COUNTS,
29  /* 5 */ CUNIT_PER_SEC,
30  /* 6 */ CUNIT_PER_MIN,
31  /* 7 */ CUNIT_ML_PER_ML,
32  /* 8 */ CUNIT_ML_PER_DL,
35  /* 11 */ CUNIT_UNITLESS,
36  /* 12 */ CUNIT_NCI_PER_ML,
37  /* 13 */ CUNIT_MBQ_PER_ML,
38  /* 14 */ CUNIT_BQ_PER_ML,
39  /* 15 */ CUNIT_UCI_PER_ML,
44  /* 20 */ CUNIT_PERCENTAGE,
45  /* 21 */ CUNIT_KCPS,
47  /* 23 */ CUNIT_BQ,
48  /* 24 */ CUNIT_KBQ,
49  /* 25 */ CUNIT_MBQ,
50  /* 26 */ CUNIT_GBQ,
51  /* 27 */ CUNIT_NCI,
52  /* 28 */ CUNIT_UCI,
53  /* 29 */ CUNIT_MCI
54 };
55 enum {
56  /* 0 */ TUNIT_UNKNOWN,
57  /* 1 */ TUNIT_SEC,
58  /* 2 */ TUNIT_MIN,
59  /* 3 */ TUNIT_UM,
60  /* 4 */ TUNIT_MM,
61  /* 5 */ TUNIT_CM,
62  /* 6 */ TUNIT_M,
63  /* 7 */ TUNIT_HOUR,
64  /* 8 */ TUNIT_MONTH,
65  /* 9 */ TUNIT_YEAR,
66  /* 10 */ TUNIT_MSEC
67 };
68 /*****************************************************************************/
69 extern int petCunitId(const char *unit);
70 extern int petTunitId(const char *timeunit);
71 /*****************************************************************************/
72 extern char *petCunit(int cunit);
73 extern char *petTunit(int tunit);
74 /*****************************************************************************/
75 extern int cunitFromFilename(char *fname);
76 /*****************************************************************************/
77 #endif
78 
Definition: petunits.h:27
Definition: petunits.h:51
Definition: petunits.h:61
char * petCunit(int cunit)
Definition: petunits.c:217
Definition: petunits.h:35
Definition: petunits.h:30
char * petTunit(int tunit)
Definition: petunits.c:230
Definition: petunits.h:34
Definition: petunits.h:53
Definition: petunits.h:62
Definition: petunits.h:43
Definition: petunits.h:38
Definition: petunits.h:58
Definition: petunits.h:52
Definition: petunits.h:60
Definition: petunits.h:25
Definition: petunits.h:24
Definition: petunits.h:33
Definition: petunits.h:29
Definition: petunits.h:59
Definition: petunits.h:56
int petCunitId(const char *unit)
Definition: petunits.c:109
Definition: petunits.h:41
Definition: petunits.h:39
Definition: petunits.h:42
Definition: petunits.h:65
Definition: petunits.h:31
Definition: petunits.h:66
Definition: petunits.h:36
Definition: petunits.h:32
Definition: petunits.h:64
Definition: petunits.h:45
int cunitFromFilename(char *fname)
Definition: petunits.c:245
Definition: petunits.h:48
Definition: petunits.h:50
Definition: petunits.h:40
Definition: petunits.h:47
Definition: petunits.h:28
Definition: petunits.h:57
Definition: petunits.h:26
Definition: petunits.h:63
Definition: petunits.h:44
int petTunitId(const char *timeunit)
Definition: petunits.c:195
Definition: petunits.h:46
Definition: petunits.h:49
Definition: petunits.h:37