#include <stdio.h>#include <stdlib.h>#include <string.h>#include <ctype.h>#include <math.h>#include "include/halflife.h"#include "include/substitutions.h"Go to the source code of this file.
Functions | |
| char * | hlIsotopeCode (int isotope) |
| double | hlFromIsotope (char *isocode) |
| double | hl2lambda (double halflife) |
| double | hlLambda2factor (double lambda, double frametime, double framedur) |
| float | hlLambda2factor_float (float lambda, float frametime, float framedur) |
| char * | hlCorrectIsotopeCode (char *isocode) |
| int | hlIsotopeFromHalflife (double halflife) |
Variables | |
| static char * | isotope_code [] |
| static double | isotope_halflife [] |
| double hl2lambda | ( | double | halflife | ) |
Calculates the isotope lambda from specified halflife.
| halflife | halflife time value |
Definition at line 139 of file halflife.c.
References M_LN2.
| char* hlCorrectIsotopeCode | ( | char * | isocode | ) |
Check that isotope code, e.g. F-18, is in valid format, containing '-' and in this order. Returns the correct isotope code.
| isocode | Pointer to string "C-11", "11c" etc; contents of this string is not changed, and this is not returned in any case |
Definition at line 196 of file halflife.c.
References isotope_code.
Referenced by hlFromIsotope().
| double hlFromIsotope | ( | char * | isocode | ) |
Identify the isotope from the specified isotope code string and return the halflife (min). This function checks the validity of the isotope string using hlCorrectIsotopeCode(), but does not change it in any way.
| isocode | Pointer to string "C-11", "18f" etc. This argument is not changed |
Definition at line 113 of file halflife.c.
References hlCorrectIsotopeCode(), isotope_code, and isotope_halflife.
| char* hlIsotopeCode | ( | int | isotope | ) |
Isotope code as a string, based on isotope list number.
| isotope | index of PET isotope in the list in halflife.c |
Definition at line 93 of file halflife.c.
References isotope_code.
| int hlIsotopeFromHalflife | ( | double | halflife | ) |
Identify the isotope based on its halflife (in minutes).
| halflife | Half-life in minutes |
Definition at line 250 of file halflife.c.
References isotope_halflife.
| double hlLambda2factor | ( | double | lambda, |
| double | frametime, | ||
| double | framedur | ||
| ) |
Calculate the decay correction factor for specified isotope lambda.
| lambda | Negative lambda removes decay correction |
| frametime | Frame start time, or mid time if framedur<=0 |
| framedur | If unknown, set <0 and give mid time for frametime |
Definition at line 153 of file halflife.c.
| float hlLambda2factor_float | ( | float | lambda, |
| float | frametime, | ||
| float | framedur | ||
| ) |
Calculate the decay correction factor for specified isotope lambda. Version for floats (mainly image data).
| lambda | Negative lambda removes decay correction |
| frametime | Frame start time, or mid time if framedur<=0 |
| framedur | If unknown, set <0 and give mid time for frametime |
Definition at line 173 of file halflife.c.
char* isotope_code[] [static] |
{
"Br-75", "Br-76", "Cu-62", "Cu-64", "Fe-52",
"Ga-68", "Ge-68", "Na-22", "Rb-82", "Zn-62",
"F-18", "C-11", "N-13", "O-15", "O-14", "I-124",
0}
Valid isotope codes. Note: when adding isotopes, make sure that all isotopes with one letter are AFTER all two letter isotopes with the same initial letter.
Definition at line 72 of file halflife.c.
Referenced by hlCorrectIsotopeCode(), hlFromIsotope(), and hlIsotopeCode().
double isotope_halflife[] [static] |
1.8.0