Defines | Functions
halflife.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define HL_O15   2.05
#define HL_N13   10.0
#define HL_C11   20.4
#define HL_F18   109.8
#define HL_Ge68   396000.0
#define HL_Ga68   68.0
#define HL_Br75   98.0
#define HL_Br76   978.33
#define HL_Cu62   9.7
#define HL_Cu64   768.0
#define HL_Fe52   4980.0
#define HL_Na22   1368000.0
#define HL_O14   1.1818
#define HL_Rb82   1.25
#define HL_Zn62   558.0
#define HL_I124   6013.44
#define M_LN2   0.69314718055994530942
#define lambda2factor   hlLambda2factor
#define lambda2factor_float   hlLambda2factor_float

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)

Define Documentation

#define HL_Br75   98.0
#define HL_Br76   978.33
#define HL_C11   20.4
#define HL_Cu62   9.7
#define HL_Cu64   768.0
#define HL_F18   109.8
#define HL_Fe52   4980.0
#define HL_Ga68   68.0
#define HL_Ge68   396000.0
#define HL_I124   6013.44
#define HL_N13   10.0
#define HL_Na22   1368000.0
#define HL_O14   1.1818
#define HL_O15   2.05

Isotope halflife in minutes

#define HL_Rb82   1.25
#define HL_Zn62   558.0
#define lambda2factor   hlLambda2factor
#define lambda2factor_float   hlLambda2factor_float
#define M_LN2   0.69314718055994530942

Referenced by hl2lambda().


Function Documentation

double hl2lambda ( double  halflife)

Calculates the isotope lambda from specified halflife.

Parameters:
halflifehalflife time value
Returns:
A negative value is returned in case of error.

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.

Parameters:
isocodePointer to string "C-11", "11c" etc; contents of this string is not changed, and this is not returned in any case
Returns:
pointer to correct isotope code, and NULL if it was not valid and could not be corrected.

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.

Parameters:
isocodePointer to string "C-11", "18f" etc. This argument is not changed
Returns:
A negative value is returned in case of error.

References hlCorrectIsotopeCode(), isotope_code, and isotope_halflife.

Here is the call graph for this function:

char* hlIsotopeCode ( int  isotope)

Isotope code as a string, based on isotope list number.

Parameters:
isotopeindex of PET isotope in the list in halflife.c
Returns:
pointer to static string or "unknown".

References isotope_code.

int hlIsotopeFromHalflife ( double  halflife)

Identify the isotope based on its halflife (in minutes).

Parameters:
halflifeHalf-life in minutes
Returns:
the isotope list number, or negative value if not identified.

References isotope_halflife.

double hlLambda2factor ( double  lambda,
double  frametime,
double  framedur 
)

Calculate the decay correction factor for specified isotope lambda.

Parameters:
lambdaNegative lambda removes decay correction
frametimeFrame start time, or mid time if framedur<=0
framedurIf unknown, set <0 and give mid time for frametime
Returns:
A negative value is returned in case of error.
float hlLambda2factor_float ( float  lambda,
float  frametime,
float  framedur 
)

Calculate the decay correction factor for specified isotope lambda. Version for floats (mainly image data).

Parameters:
lambdaNegative lambda removes decay correction
frametimeFrame start time, or mid time if framedur<=0
framedurIf unknown, set <0 and give mid time for frametime
Returns:
A negative value is returned in case of error.