#include <stdio.h>#include <stdlib.h>#include <math.h>#include <string.h>#include <time.h>#include "include/petunits.h"#include "include/substitutions.h"
Functions | |
| int | petCunitId (const char *unit) |
| int | petTunitId (const char *timeunit) |
| char * | petCunit (int cunit) |
| char * | petTunit (int tunit) |
| int | cunitFromFilename (char *fname) |
Variables | |
| static char * | cunit_string [] |
| static char * | tunit_string [] |
| int cunitFromFilename | ( | char * | fname | ) |
Tries to find calibration unit from filename.
| fname | Pointer to filename, where calibration unit is tried to be found |
References CUNIT_BQ_PER_ML, CUNIT_CPS, CUNIT_KBQ_PER_ML, CUNIT_KCPS, CUNIT_MBQ_PER_ML, CUNIT_NCI_PER_ML, CUNIT_UNKNOWN, and strcasestr().

| char* petCunit | ( | int | cunit | ) |
Return pointer to string describing the calibration data units
| cunit | index of PET_data units_string[] |
References cunit_string, and CUNIT_UNKNOWN.
| int petCunitId | ( | const char * | unit | ) |
Identify the specified units string as PET data unit.
References CUNIT_BQ_PER_ML, CUNIT_COUNTS, CUNIT_CPS, CUNIT_KBQ_PER_ML, CUNIT_KCPS, CUNIT_MBQ_PER_ML, CUNIT_MG_PER_MIN_PER_100G, CUNIT_MIN_KBQ_PER_ML, CUNIT_ML_PER_DL, CUNIT_ML_PER_DL_PER_MIN, CUNIT_ML_PER_ML, CUNIT_ML_PER_ML_PER_MIN, CUNIT_NCI_PER_ML, CUNIT_PER_MIN, CUNIT_PER_SEC, CUNIT_PERCENTAGE, CUNIT_SEC_KBQ_PER_ML, CUNIT_UCI_PER_ML, CUNIT_UMOL_PER_MIN_PER_100G, CUNIT_UNITLESS, and CUNIT_UNKNOWN.
| char* petTunit | ( | int | tunit | ) |
Return pointer to string describing the time unit
| tunit | index of PET_time unit_string[] |
References tunit_string, and TUNIT_UNKNOWN.
| int petTunitId | ( | const char * | timeunit | ) |
Identifies the specified string as PET time (x axis) units.
References TUNIT_CM, TUNIT_HOUR, TUNIT_M, TUNIT_MIN, TUNIT_MM, TUNIT_MONTH, TUNIT_MSEC, TUNIT_SEC, TUNIT_UM, TUNIT_UNKNOWN, and TUNIT_YEAR.
char* cunit_string[] [static] |
{
"unknown",
"cnts/sec",
"counts",
"kBq/mL",
"sec*kBq/mL",
"1/sec",
"1/min",
"mL/mL",
"mL/dL",
"mL/(mL*min)",
"mL/(dL*min)",
"unitless",
"nCi/mL",
"MBq/mL",
"Bq/cc",
"uCi/cc",
"umol/(100g*min)",
"mg/(100g*min)",
"umol/(dL*min)",
"mg/(dL*min)",
"%",
"kcps",
"min*kBq/mL",
0
}
Valid PET data calibration (y axis) units. Max MAX_UNITS_LEN characters (Currently 31). Try to use these with IMG and DFT structs
Referenced by petCunit().
char* tunit_string[] [static] |
{
"unknown",
"sec",
"min",
"um",
"mm",
"cm",
"m",
"h",
"months",
"y",
"msec",
0
}
Valid PET time (x axis) units.
Referenced by petTunit().
1.7.4