TPCCLIB
|
Functions for interpolating and integrating DFT data. More...
#include "libtpcmodext.h"
Go to the source code of this file.
Functions | |
int | dftInterpolateCheckStart (DFT *input, DFT *output, char *status, int verbose) |
int | dftInterpolateCheckEnd (DFT *input, DFT *output, char *status, int verbose) |
int | dftInterpolate (DFT *input, DFT *tissue, DFT *output, char *status, int verbose) |
int | dftInterpolateInto (DFT *inp, DFT *tis, char *status, int verbose) |
int | dftTimeIntegral (DFT *dft, double t1, double t2, DFT *idft, int calc_mode, char *status, int verbose) |
int | dftDerivative_old (DFT *dft, DFT *deriv, char *status) |
int | dftDerivative (DFT *dft, DFT *deriv, char *status) |
Calculate simple derivatives from regional PET TACs. This must not be used for any quantitative purpose.
dft | DFT struct containing the regional tissue TACs |
deriv | Allocated DFT struct for derivatives |
status | Pointer to allocated string where the status or error message is written; set to NULL if not needed |
Definition at line 635 of file dftint.c.
Calculate simple derivatives from regional PET TACs. Old version. Requires that frame start and end times are known.
dft | DFT struct containing the regional tissue TACs |
deriv | Allocated DFT struct for derivatives |
status | Pointer to allocated string where the status or error message is written; set to NULL if not needed |
Definition at line 591 of file dftint.c.
Interpolate (and integrate) TAC data to sample times that are given with another TAC data. PET frame lengths are taken into account if available in tissue DFT struct.
Input frame lengths are taken into account if the framing is same as with tissue data.
input | Data which is interpolated; make sure that time unit is the same as in tissue data; time range is checked to cover the tissue data |
tissue | Data to which (sample times) the interpolation is done |
output | Pointer to initiated DFT into which interpolated values and integrals will be 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 162 of file dftint.c.
Referenced by dftReadinput().
Verify that data to-be-interpolated does not need too much extrapolation in the end, and that samples are not too sparse.
Time units in DFTs can be different, if specified.
input | Data that will be verified for reliable interpolation |
output | Data containing sample times for interpolated data |
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 82 of file dftint.c.
Referenced by dftInterpolate(), dftInterpolateForIMG(), and dftInterpolateInto().
Verify that data to-be-interpolated does not need too much extrapolation in the beginning.
input | Data that will be verified for reliable interpolation |
output | Data containing sample times for interpolated data |
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 17 of file dftint.c.
Referenced by dftInterpolate(), dftInterpolateForIMG(), and dftInterpolateInto().
Interpolate (and integrate) TAC data to sample times that are given with another TAC data. New TAC is written into existing TAC data. PET frame lengths are taken into account if available in tissue DFT struct. Input frame lengths are taken into account if the framing is same as with tissue data.
inp | Data which is interpolated; make sure that time unit is the same as in tissue data; time range is checked to cover the tissue data |
tis | Data into which the interpolation is done |
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 281 of file dftint.c.
Referenced by dftReadModelingData(), dftReadReference(), and imgReadModelingData().
int dftTimeIntegral | ( | DFT * | dft, |
double | t1, | ||
double | t2, | ||
DFT * | idft, | ||
int | calc_mode, | ||
char * | status, | ||
int | verbose ) |
Integration of regional TAC data from time1 to time2, i.e. AUC(t1,t2).
You may want to test the time range before applying this routine, because this function accepts relatively large extrapolation large.
dft | Regional TAC data in DFT struct. Number of samples must be at least one. If only one sample, then the integration time range must match with the possible frame start and times. Frames do not have to be continuous in time. |
t1 | Time where to start integration (same unit as in TACs) |
t2 | Time to stop integration (same unit as in TACs); must be higher than t1, except that t1=t2 is acceptable when calc_mode=average |
idft | Pointer to initiated but empty AUC DFT data (output) |
calc_mode | Calculate integral or average: 0=integral, 1=average |
status | Pointer to a string (allocated for at least 128 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 382 of file dftint.c.