|
TPCCLIB
|
Time delay between PET tissue and blood curve. More...
#include "tpcclibConfig.h"#include <stdio.h>#include <stdlib.h>#include <math.h>#include <time.h>#include <string.h>#include "tpcextensions.h"#include "tpctac.h"#include "tpcli.h"#include "tpclinopt.h"#include "tpctacmod.h"Go to the source code of this file.
Functions | |
| int | tacDelay (TAC *tac, double dt, int ti, TPCSTATUS *status) |
| Move TAC y values (concentrations) in time, keeping sample times (x values) intact. | |
| void | initDelayCMFitData (DELAYCMFITDATA *d) |
| Before first use, initiate the data structure for delay time estimation. | |
| void | freeDelayCMFitData (DELAYCMFITDATA *d) |
| After last use, free memory in the data structure for delay time estimation. | |
| int | tacDelayCMFit (TAC *btac, TAC *ttac, int ci, double dtmin, double dtmax, double fitend, double dtstep, double *dt, int mode, int model, DELAYCMFITDATA *tdata, TPCSTATUS *status) |
| Fit time delay between PET tissue and plasma or blood curve. | |
Time delay between PET tissue and blood curve.
Definition in file delay.c.
| void freeDelayCMFitData | ( | DELAYCMFITDATA * | d | ) |
After last use, free memory in the data structure for delay time estimation.
| d | Pointer to the data structure to be initialized. |
Definition at line 150 of file delay.c.
Referenced by tacDelayCMFit().
| void initDelayCMFitData | ( | DELAYCMFITDATA * | d | ) |
Before first use, initiate the data structure for delay time estimation.
| d | Pointer to the data structure to be initialized. |
Definition at line 131 of file delay.c.
Referenced by tacDelayCMFit().
Move TAC y values (concentrations) in time, keeping sample times (x values) intact.
If TAC has frame start and end times, this function tries to retain the AUC with stepwise frame interpretation. If you wish to prevent this, then set tac->isframe=0 before calling this function and after it set back tac->isframe=1.
| tac | Pointer to TAC structure. |
| dt | Time (in TAC tunit's) to move the TAC forward (negative time moves TAC backward). |
| ti | Index [0..tacNr-1] of the TAC to move, or <0 to move all TACs. |
| status | Pointer to status data; enter NULL if not needed. |
Definition at line 29 of file delay.c.
| int tacDelayCMFit | ( | TAC * | btac, |
| TAC * | ttac, | ||
| int | ci, | ||
| double | dtmin, | ||
| double | dtmax, | ||
| double | fitend, | ||
| double | dtstep, | ||
| double * | dt, | ||
| int | mode, | ||
| int | model, | ||
| DELAYCMFITDATA * | tdata, | ||
| TPCSTATUS * | status ) |
Fit time delay between PET tissue and plasma or blood curve.
Initial part of tissue curve is fitted with a range of input curves moved in time, using linearised one or two-tissue compartment model with blood volume term. The time that provides the best fit is selected. It is assumed that tissue heterogeneity, dispersion of the blood curve, metabolites, and variable plasma-to-blood ratio will only minimally impact the time delay estimate, since only the initial part of the data is fitted, especially if reversible two-tissue model (R2tCM) is used.
| btac | Pointer to input data (blood or plasma curve). Units of input and tissue TAC must match. All but first curve in TAC are ignored. Enter NULL in subsequent runs |
| ttac | Pointer to tissue data. Units of input and tissue TAC must match. All but first curve in TAC are ignored. |
| ci | Index [0..ttac->tacNr-1] of tissue tac to use. |
| dtmin | Minimum delay to be tested, for example -10 s, in the same units as in TACs. Not used in subsequent runs with tdata. |
| dtmax | Maximum delay to be tested, for example +50 s, in the same units as in TACs. Not used in subsequent runs with tdata. |
| fitend | Fitting uses data from 0 to end time, for example 120 s, in the same units as in TACs. In case of short PET scan, end time may need to be reduced so that input TAC with negative delay extends to the fit end. Not used in subsequent runs with tdata. |
| dtstep | The step length for moving the input curve, for example 1 s, in the same units as in TACs. Not used in subsequent runs with tdata. |
| dt | Pointer for the time delay estimate. Positive delay time means that tissue curve is delayed as compared to the input curve, and vice versa. Thus, input curve needs to be moved by the delay time to match the tissue curve. |
| mode | Mode for multilinear equations: 0=integrals and 2nd integrals, 1=derivates and 2nd derivates (experimental), 2=integrals and derivates (experimental). |
| model | Model: 0=R1TCM, 1=I2TCM, 2=R2TCM. |
| tdata | Pointer to temporary data structure, which quickens subsequent runs with other tissue TACs; enter NULL if not needed. |
| status | Pointer to status data; enter NULL if not needed. |
Definition at line 179 of file delay.c.