Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

halflife.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
#include "include/halflife.h"

Functions

double hlFromIsotope (char *isocode)
double hl2lambda (double halflife)
double lambda2factor (double lambda, double frametime, double framedur)
char * hlCorrectIsotopeCode (char *isocode)

Variables

static char * isotope_code []

Function Documentation

double hl2lambda double  halflife  ) 
 

Calculates the isotope lambda from specified halflife.

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

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.

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

double hlFromIsotope char *  isocode  ) 
 

Identify the isotope from the specified isotope code string and return the halflife (min).

Returns:
A negative value is returned in case of error.
Parameters:
isocode  Pointer to string "C-11", "18f" etc.

double lambda2factor double  lambda,
double  frametime,
double  framedur
 

Calculate the decay correction factor for specified isotope lambda.

Returns:
A negative value is returned in case of error.
Parameters:
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


Variable Documentation

char* isotope_code[] [static]
 

Initial value:

 {
  "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",
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.


Generated on Fri Jan 21 16:17:41 2005 for libPET by  doxygen 1.4.1