|
TPCCLIB
|
Header file for library libtpcisotope. More...
#include "tpcclibConfig.h"#include <stdio.h>#include <stdlib.h>#include <string.h>#include <strings.h>#include <ctype.h>#include <math.h>#include "tpcextensions.h"Go to the source code of this file.
Macros | |
| #define | MAX_ATOMIC_NUMBER 118 |
| Max atomic number, and the size of element_symbol and element_name lists. | |
| #define | M_LN2 0.69314718055994530942 |
| Defined ln(2) for faster computations. | |
| #define | MAX_ISOTOPE_LEN 16 |
| Max string length for PET isotope. | |
Enumerations | |
| enum | isotope { ISOTOPE_UNKNOWN , ISOTOPE_BR_75 , ISOTOPE_BR_76 , ISOTOPE_CU_62 , ISOTOPE_CU_64 , ISOTOPE_FE_52 , ISOTOPE_GA_68 , ISOTOPE_GE_68 , ISOTOPE_NA_22 , ISOTOPE_RB_82 , ISOTOPE_SC_44 , ISOTOPE_TB_152 , ISOTOPE_ZN_62 , ISOTOPE_ZR_89 , ISOTOPE_C_11 , ISOTOPE_F_18 , ISOTOPE_I_124 , ISOTOPE_N_13 , ISOTOPE_O_15 , ISOTOPE_O_14 } |
| enum | decaycorrection { DECAY_UNKNOWN , DECAY_NOTCORRECTED , DECAY_CORRECTED , DECAY_CORRECTED_START , DECAY_CORRECTED_ADMIN } |
Functions | |
| char * | elementName (unsigned short int z) |
| char * | elementSymbol (unsigned short int z) |
| unsigned short int | elementIdentify (const char *str) |
| double | isotopeHalflife (int isotope) |
| double | isotopeBranching (int isotope) |
| char * | isotopeName (int isotope) |
| int | isotopeIdentifyHalflife (double halflife) |
| int | isotopeIdentify (const char *isotope) |
| char * | decayDescr (decaycorrection d) |
| double | lambdaFromHalflife (double halflife) |
| double | lambdaFromIsotope (int isotope) |
| double | decayCorrectionFactorFromLambda (double lambda, double starttime, double duration) |
| double | decayCorrectionFactorFromIsotope (int isotope, double starttime, double duration) |
| double | noiseSD4Frame (double y, double t1, double dt, int isotope, double a) |
Header file for library libtpcisotope.
Isotope half-lives and branching fractions are based on the following references, except isotopes Br-75, Br-76, Cu-62, Cu-64, Fe-52, O-14, Rb-82, Zn-62, I-124, which thus should be treated with caution.
References:
Definition in file tpcisotope.h.
| #define M_LN2 0.69314718055994530942 |
Defined ln(2) for faster computations.
Definition at line 37 of file tpcisotope.h.
Referenced by lambdaFromHalflife(), and lambdaFromIsotope().
| #define MAX_ATOMIC_NUMBER 118 |
Max atomic number, and the size of element_symbol and element_name lists.
Definition at line 33 of file tpcisotope.h.
Referenced by elementIdentify(), elementName(), and elementSymbol().
| #define MAX_ISOTOPE_LEN 16 |
Max string length for PET isotope.
Definition at line 41 of file tpcisotope.h.
Referenced by tacGetHeaderIsotope(), tacGetIsotope(), tacReadSIF(), and tacWriteSIF().
| enum decaycorrection |
Is data corrected for physical decay or not?
Definition at line 78 of file tpcisotope.h.
| enum isotope |
isotope_code, same as isotopes position in isotope table (table can not be accessed directly outside the c file).
Definition at line 50 of file tpcisotope.h.
|
extern |
Calculate the correction factor for physical decay from measurement time to time zero.
| isotope | isotope_code as enum or the index of isotope in isotope table. |
| starttime | Radioactivity measurement start time, or middle time, if measurement duration is not known. Unit must be min. |
| duration | Radioactivity measurement duration; if not known, then set to zero, and put measurement middle time for starttime. Unit must be min. |
Definition at line 107 of file decay.c.
Referenced by noiseSD4Frame(), and sifWeight().
|
extern |
Calculate the correction factor for physical decay from measurement time to time zero.
| lambda | Positive or negative lambda for the isotope. Note that time unit must be 1/timeunit of the starttime and duration. |
| starttime | Radioactivity measurement start time, or middle time, if measurement duration is not known. |
| duration | Radioactivity measurement duration; if not known, then set to zero, and put measurement middle time for starttime. |
Definition at line 79 of file decay.c.
Referenced by decayCorrectionFactorFromIsotope(), tacDecayCorrection(), and tacWByFreq().
|
extern |
Return pointer to string describing the status of decay correction.
| d | Enum decaycorrection. |
Definition at line 32 of file decay.c.
Referenced by dcmImgIsotope(), and imgReadDICOM().
|
extern |
Identify the given string representation of element name or symbol.
| str | Name or symbol of element, for example 'Carbon' or 'C'. |
Definition at line 298 of file elements.c.
Referenced by isotopeIdentify().
|
extern |
Return pointer to element name.
| z | Atomic number (Z) of the element. |
Definition at line 270 of file elements.c.
|
extern |
Return pointer to element symbol.
| z | Atomic number (Z) of the element. |
Definition at line 284 of file elements.c.
|
extern |
Get the branching ratio (fraction) of an isotope spcecified with its isotope_code.
| isotope_code | isotope_code as enum or the index of isotope in isotope table |
Definition at line 81 of file isotope.c.
|
extern |
Get the half-life (in minutes) of an isotope specified with its isotope_code.
| isotope_code | isotope_code as enum or the index of isotope in isotope table. |
Definition at line 62 of file isotope.c.
Referenced by abssWrite(), imgWriteDICOM(), lambdaFromIsotope(), and tacDecayCorrection().
|
extern |
Identify the given string representation of isotope, whether it is in format like 'C-11', '11C', '^11^C', or '^11^Carbon'. Even a one-letter symbol like 'C' may be accepted for the most common PET isotopes.
| isotope | Name of isotope to identify. |
Definition at line 145 of file isotope.c.
Referenced by abssWrite(), dcmImgIsotope(), tacGetIsotope(), tacRead4DM(), and tacReadSIF().
|
extern |
Identify the isotope based on halflife.
| halflife | Halflife in minutes |
Definition at line 121 of file isotope.c.
Referenced by dcmImgIsotope().
|
extern |
Get the string representation of an isotope specified with its isotope_code.
| isotope_code | isotope_code as enum or the index of isotope in isotope table. |
Definition at line 101 of file isotope.c.
Referenced by dcmImgIsotope(), imgContents(), imgFillOHeader(), imgReadDICOM(), sifWeight(), tacRead4DM(), tacReadSIF(), tacSetIsotope(), tacSetWeights(), and tacWByFreq().
|
extern |
Calculate lambda based on specified halflife.
| halflife | Halflife of the isotope; if halflife is in minutes, then the unit of lambda will be 1/min, if seconds, then lambda will be in units 1/sec, etc. |
Definition at line 47 of file decay.c.
Referenced by tacDecayCorrection().
|
extern |
Calculate lambda for specified isotope.
| isotope | isotope_code as enum or the index of isotope in isotope table. |
Definition at line 63 of file decay.c.
Referenced by decayCorrectionFactorFromIsotope(), and tacWByFreq().
|
extern |
Calculate the standard deviation (SD) of noise for PET radioactivity concentration.
SD of noise can be used in simulations. Reference: Varga & Szabo. J Cereb Blood Flow Metab 2002;22(2):240-244.
| y | Sample radioactivity concentration (decay corrected to zero time). |
| t1 | Radioactivity measurement (frame) start time in minutes. |
| dt | Radioactivity measurement (frame) duration in minutes. |
| isotope | Isotope code as enum or index of isotope in isotope table; enter ISOTOPE_UNKNOWN if not to be considered. |
| a | Proportionality factor. Note that it should be in relation to the unit of y. |
Definition at line 26 of file ranoise.c.