TPCCLIB
Loading...
Searching...
No Matches
tpcli.h
Go to the documentation of this file.
1
7#ifndef _TPCLI_H_
8#define _TPCLI_H_
9/*****************************************************************************/
10
11/*****************************************************************************/
12#include "tpcclibConfig.h"
13/*****************************************************************************/
14#include <stdio.h>
15#include <stdlib.h>
16#include <string.h>
17#include <math.h>
18/*****************************************************************************/
19#include "tpcextensions.h"
20/*****************************************************************************/
21
22/*****************************************************************************/
23/* interpolate */
24extern int liInterpolate(
25 double *x, double *y, const int nr,
26 double *newx, double *newy, double *newyi, double *newyii, const int newnr,
27 const int se, const int ee, const int verbose
28);
29extern int liInterpolateForPET(
30 double *x, double *y, const int nr,
31 double *newx1, double *newx2, double *newy, double *newyi, double *newyii,
32 const int newnr, const int se, const int ee, const int verbose
33);
34extern double liFirstStepSize(double *x, const int nr);
35/*extern int liFrameMidValue(
36 double *x1, double *x2, double *y, const size_t nr, double *newy,
37 const int verbose
38);*/
39extern unsigned int simSamples(
40 double initStep, double maxStep, double endTime, int mode, double *x
41);
42/*****************************************************************************/
43/* integrate */
44extern int liIntegrate(
45 double *x, double *y, const int nr,
46 double *yi, const int se, const int verbose
47);
48extern int liIntegratePET(
49 double *x1, double *x2, double *y, int nr,
50 double *ie, double *iie, const int verbose
51);
52extern int liIntegrateFE(
53 double *x1, double *x2, double *y, int nr,
54 double *ie, double *iie, const int verbose
55);
56extern int liIntegrateHalfFrame(
57 double *x1, double *x2, double *y, const size_t nr, double *fhi, const int verbose
58);
59extern int liDerivate(
60 double *x, double *y, const int nr, double *d, double *dd, const int verbose
61);
62extern int liDerivate3(
63 double *x, double *y, const int nr, double *d, double *dd, const int verbose
64);
65/*****************************************************************************/
66
67/*****************************************************************************/
68#endif /* _TPCLI_H */
Header file for library libtpcextensions.
unsigned int simSamples(double initStep, double maxStep, double endTime, int mode, double *x)
Definition interpolate.c:50
int liInterpolate(double *x, double *y, const int nr, double *newx, double *newy, double *newyi, double *newyii, const int newnr, const int se, const int ee, const int verbose)
Linear interpolation and/or integration with trapezoidal method.
int liIntegrateHalfFrame(double *x1, double *x2, double *y, const size_t nr, double *fhi, const int verbose)
Calculate the integrals (AUC) of the first halves of PET frames based on dot-to-dot linear interpolat...
Definition integrate.c:309
int liDerivate3(double *x, double *y, const int nr, double *d, double *dd, const int verbose)
Simplistic derivation of PET TAC using regression line over three points.
Definition integrate.c:493
int liIntegrateFE(double *x1, double *x2, double *y, int nr, double *ie, double *iie, const int verbose)
Linear integration of PET TAC to frame end times.
Definition integrate.c:219
double liFirstStepSize(double *x, const int nr)
Find the initial x step size.
Definition interpolate.c:25
int liInterpolateForPET(double *x, double *y, const int nr, double *newx1, double *newx2, double *newy, double *newyi, double *newyii, const int newnr, const int se, const int ee, const int verbose)
Linear TAC interpolation and/or integration to PET frames.
int liIntegrate(double *x, double *y, const int nr, double *yi, const int se, const int verbose)
Linear integration of TAC with trapezoidal method.
Definition integrate.c:33
int liIntegratePET(double *x1, double *x2, double *y, int nr, double *ie, double *iie, const int verbose)
Calculate PET TAC AUC from start to each time frame, as averages during each frame.
Definition integrate.c:120
int liDerivate(double *x, double *y, const int nr, double *d, double *dd, const int verbose)
Simplistic derivation of TAC as Δy divided by Δx, in relation to the previous point.
Definition integrate.c:444