#include <stdio.h>#include <stdlib.h>#include <string.h>#include <math.h>#include <time.h>#include "include/libtpcmodext.h"Go to the source code of this file.
Functions | |
| int | dftInterpolateCheckStart (DFT *input, DFT *output, char *status) |
| int | dftInterpolateCheckEnd (DFT *input, DFT *output, char *status) |
| int | dftInterpolate (DFT *input, DFT *tissue, DFT *output, char *status) |
| int | dftInterpolateInto (DFT *inp, DFT *tis, char *status) |
| int | dftTimeIntegral (DFT *dft, double t1, double t2, DFT *idft, int calc_mode, char *status) |
| int | dftDerivative_old (DFT *dft, DFT *deriv, char *status) |
| int | dftDerivative (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 |
| int dftDerivative_old | ( | DFT * | dft, |
| DFT * | deriv, | ||
| char * | status | ||
| ) |
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 |
| int dftInterpolate | ( | DFT * | input, |
| DFT * | tissue, | ||
| DFT * | output, | ||
| char * | status | ||
| ) |
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 |
Definition at line 173 of file dftint.c.
References check_times_dft_vs_dft(), dftInterpolateCheckEnd(), and dftInterpolateCheckStart().
Referenced by dftReadinput().
| int dftInterpolateCheckEnd | ( | DFT * | input, |
| DFT * | output, | ||
| char * | status | ||
| ) |
Verify that data to-be-interpolated does not need too much extrapolation in the end, and that samples are not too sparse.
| 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 |
Definition at line 104 of file dftint.c.
References MODEXT_TEST.
Referenced by dftInterpolate(), and dftInterpolateInto().
| int dftInterpolateCheckStart | ( | DFT * | input, |
| DFT * | output, | ||
| char * | status | ||
| ) |
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 |
Definition at line 52 of file dftint.c.
References MODEXT_TEST.
Referenced by dftInterpolate(), dftInterpolateForIMG(), and dftInterpolateInto().
| int dftInterpolateInto | ( | DFT * | inp, |
| DFT * | tis, | ||
| char * | status | ||
| ) |
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 |
Definition at line 286 of file dftint.c.
References check_times_dft_vs_dft(), dftInterpolateCheckEnd(), and dftInterpolateCheckStart().
Referenced by dftReadModelingData(), and dftReadReference().
| int dftTimeIntegral | ( | DFT * | dft, |
| double | t1, | ||
| double | t2, | ||
| DFT * | idft, | ||
| int | calc_mode, | ||
| char * | status | ||
| ) |
Integration of regional TAC data from time1 to time2, i.e. AUC(t1,t2). You may want to test the time range before applyin 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 |
Definition at line 379 of file dftint.c.
References MODEXT_TEST.
1.8.0