TPCCLIB
|
Noise simulation for PET modelling. More...
#include "libtpcmodext.h"
Go to the source code of this file.
Functions | |
int | noiseSD4Simulation (double y, double t1, double dt, double hl, double a, double *sd, char *status, int verbose) |
int | noiseSD4SimulationFromDFT (DFT *dft, int index, double pc, double *sd, char *status, int verbose) |
Noise simulation for PET modelling.
Definition in file noise.c.
int noiseSD4Simulation | ( | double | y, |
double | t1, | ||
double | dt, | ||
double | hl, | ||
double | a, | ||
double * | sd, | ||
char * | status, | ||
int | verbose ) |
Calculate SD for PET radioactivity concentration data to be used to simulate noise.
Note that SD is dependent on the time units.
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 same units as the halflife) |
dt | Radioactivity measurement (frame) duration (in same units as the halflife) |
hl | Isotope halflife (in same units as the sample time); enter 0 if not to be considered |
a | Proportionality factor. Note that it is inside square root. |
sd | Pointer in which SD is written |
status | Pointer to a string (allocated for at least 64 chars) where error message or other execution status will be written; enter NULL, if not needed |
verbose | Verbose level; if zero, then nothing is printed to stderr or stdout |
Definition at line 21 of file noise.c.
Referenced by noiseSD4SimulationFromDFT().
int noiseSD4SimulationFromDFT | ( | DFT * | dft, |
int | index, | ||
double | pc, | ||
double * | sd, | ||
char * | status, | ||
int | verbose ) |
Calculate SD for noise simulation from TAC data.
Sample times will be converted to minutes if necessary.
Reference: Varga & Szabo. J Cereb Blood Flow Metab 2002;22(2):240-244.
dft | Pointer to TAC data in DFT struct, based on which the SD for each frame is calculated. Contents are not changed. Struct must contain correct values for the isotope, time unit, and frame times (start and end). Status of decay correction is used, and if not known, then data is assumed to be decay corrected. |
index | TAC index [0..voiNr-1] which is used to calculate the SD in case DFT contains more than one TAC. Non-effective if DFT contains only one TAC. Set to <0 if mean of all TACs is to be used. |
pc | Proportionality factor |
sd | Pointer to allocated array in which SD is written |
status | Pointer to a string (allocated for at least 64 chars) where error message or other execution status will be written; enter NULL, if not needed |
verbose | Verbose level; if zero, then nothing is printed to stderr or stdout |
Definition at line 79 of file noise.c.