|
TPCCLIB
|
Simulation of BTAC. More...
#include "tpcclibConfig.h"#include <stdio.h>#include <stdlib.h>#include <math.h>#include <time.h>#include <string.h>#include "tpccm.h"Go to the source code of this file.
Functions | |
| void | icmparcInit (ICMPARC *d) |
| int | icmparcAddMetabolites (ICMPARC *d, unsigned const int mNr) |
| int | icmparcAllocateTACs (ICMPARC *d, unsigned const int sNr, const int sub) |
| void | icmparcFree (ICMPARC *d) |
| int | simBTAC (double *t, const unsigned int nr, ICMPARC *p, double *c_BA) |
| int | simBM1 (double *t, double *ct, const int nr, const double k, double *cp) |
Simulation of BTAC.
Definition in file simblood.c.
| int icmparcAddMetabolites | ( | ICMPARC * | d, |
| unsigned const int | mNr ) |
Add sub-structures for metabolite(s) in parent ICMPARC structure.
| d | Pointer to parent ICMPARC; can itself be a sub-structure. |
| mNr | Number of metabolites to add. |
Definition at line 43 of file simblood.c.
| int icmparcAllocateTACs | ( | ICMPARC * | d, |
| unsigned const int | sNr, | ||
| const int | sub ) |
Allocate space for optional TACs inside ICMPARC structure.
| d | Pointer to ICMPARC. |
| sNr | Number of TAC samples (array lengths); set to zero to just free previous data. |
| sub | Allocate (1) or do not allocate (0) space for TACs inside sub-structures. |
Definition at line 72 of file simblood.c.
Referenced by icmparcAllocateTACs().
| void icmparcFree | ( | ICMPARC * | d | ) |
Free memory that is (optionally) allocated inside the ICMPARC structure or in its sub-structures. Field values are not changed, except for pointers to allocated memory that are set to NULL.
| d | Pointer to ICMPARC. |
Definition at line 125 of file simblood.c.
Referenced by icmparcAddMetabolites(), and icmparcFree().
| void icmparcInit | ( | ICMPARC * | d | ) |
Initiate the ICMPARC structure before any use.
| d | Pointer to ICMPARC. |
Definition at line 20 of file simblood.c.
Referenced by icmparcAddMetabolites().
| int simBM1 | ( | double * | t, |
| double * | ct, | ||
| const int | nr, | ||
| const double | k, | ||
| double * | cp ) |
Calculate metabolite correct input curve from total input curve using simplistic 1K model dCmetabolite(t)/dt = k*Cparent(t) and since Ctotal(t) = Cparent(t) + Cmetabolite(t), we calculate metabolite corrected curve as dCparent(t)/dt = dCtotal(t)/dt - k*Cparent(t). Note that this model may result in negative parent values.
The units of rate constants must be related to the time unit; 1/min and min, or 1/sec and sec.
| t | Array of time values. |
| ct | Array of total activities. |
| nr | Number of values in TACs. |
| k | Rate constant of the model. |
| cp | Pointer for metabolite corrected data array to be simulated; must be allocated. |
Definition at line 275 of file simblood.c.
| int simBTAC | ( | double * | t, |
| const unsigned int | nr, | ||
| ICMPARC * | p, | ||
| double * | c_BA ) |
Simulate BTAC using compartmental model. NOT FUNCTIONAL!
| t | Array of sample time values; must be non-negative and in increasing order. |
| nr | Number of values (samples) in TACs. |
| p | Pointer to data structure containing simulation parameters. |
| c_BA | Pointer for arterial BTAC array to be simulated; must be allocated. NULL can be given, if TAC space is allocated inside p structure. |
Definition at line 154 of file simblood.c.