5#include "tpcclibConfig.h"
21typedef struct TPC_MODEL {
51static TPC_MODEL tpc_model[]={
52 {
"unknown", 0, 0, 0,
"unknown"},
54 {
"level", 100, 2, 1,
"f(x)=A"},
55 {
"line", 101, 2, 2,
"line"},
56 {
"pol2", 102, 2, 3,
"2nd degree polynomial"},
57 {
"pol3", 103, 2, 4,
"3rd degree polynomial"},
58 {
"pol4", 104, 2, 5,
"4th degree polynomial"},
59 {
"pol5", 105, 2, 6,
"5th degree polynomial"},
60 {
"pol6", 106, 2, 7,
"6th degree polynomial"},
61 {
"pol7", 107, 2, 8,
"7th degree polynomial"},
62 {
"pol8", 108, 2, 9,
"8th degree polynomial"},
63 {
"pol9", 109, 2, 10,
"9th degree polynomial"},
64 {
"ratf11", 211, 2, 0,
"1st/1st order rational function"},
65 {
"ratf21", 221, 2, 0,
"2nd/1st order rational function"},
66 {
"ratf22", 222, 2, 0,
"2nd/2nd order rational function"},
67 {
"ratf32", 232, 2, 0,
"3rd/2nd order rational function"},
68 {
"ratf33", 233, 2, 0,
"3rd/3rd order rational function"},
69 {
"1exp", 301, 2, 0,
"single exponential"},
70 {
"2exp", 302, 2, 0,
"sum of 2 exponentials"},
71 {
"3exp", 303, 2, 0,
"sum of 3 exponentials"},
72 {
"4exp", 304, 2, 0,
"sum of 4 exponentials"},
73 {
"5exp", 305, 2, 0,
"sum of 5 exponentials"},
74 {
"lundq1", 321, 2, 0,
"Lundqvist function"},
75 {
"lundq2", 322, 2, 0,
"sum of 2 Lundqvist functions"},
76 {
"lundq3", 323, 2, 0,
"sum of 3 Lundqvist functions"},
77 {
"ebolinf", 331, 2, 0,
"exponential bolus infusion function"},
78 {
"ebolinfrw", 332, 2, 0,
"Kudomi's exponential bolus infusion function for radiowater"},
79 {
"ebolinfaz", 334, 2, 0,
"exponential bolus function approaching zero"},
80 {
"ppfpk11195", 351, 2, 0,
"exp function for PK11195 plasma parent fraction"},
81 {
"igam", 401, 2, 2,
"Lower incomplete gamma function divided by gamma function"},
82 {
"igamc", 402, 2, 2,
"Upper incomplete gamma function divided by gamma function"},
83 {
"ppfigam", 403, 2, 5,
"Inverted gamma cdf for plasma parent fraction"},
84 {
"mpfhill", 841, 2, 0,
"Hill function"},
85 {
"ppfhill", 842, 2, 0,
"Hill function (1-f(x))"},
86 {
"ppfhille", 843, 2, 0,
"Hill function (1-f(x)) with ascending or descending end"},
87 {
"mpfb", 844, 2, 0,
"Hill function with background"},
88 {
"ppfb", 845, 2, 0,
"Hill function (A-f(x))"},
89 {
"ppfehill1", 846, 2, 0,
"Extended Hill function for plasma parent fraction"},
90 {
"mpfehill1", 847, 2, 0,
"Extended Hill function for plasma metabolite fraction"},
91 {
"ppfefill2", 848, 2, 0,
"Extended Hill function #2 for plasma parent fraction"},
92 {
"mpfehill2", 849, 2, 0,
"Extended Hill function #2 for plasma metabolite fraction"},
93 {
"mpfmamede", 851, 2, 0,
"Mamede function"},
94 {
"ppfmamede", 852, 2, 0,
"Mamede function (1-f(x)"},
95 {
"ppfmeyer", 861, 2, 0,
"Meyer function for plasma parent fraction"},
96 {
"mpfmeyer", 862, 2, 0,
"Meyer function for plasma metabolite fraction"},
97 {
"ppfemeyer", 863, 2, 0,
"extended Meyer function for plasma parent fraction"},
98 {
"mpfemeyer", 864, 2, 0,
"extended Meyer function for plasma metabolite fraction"},
99 {
"ppf3hill", 871, 2, 0,
"1-3 metabolite Hill function for plasma parent fraction"},
100 {
"mpf3hill1", 872, 2, 0,
"1-3 metabolite Hill function for plasma metab1 fraction"},
101 {
"mpf3hill2", 873, 2, 0,
"1-3 metabolite Hill function for plasma metab2 fraction"},
102 {
"mpf3hill3", 874, 2, 0,
"1-3 metabolite Hill function for plasma metab3 fraction"},
103 {
"ppf3pow", 881, 2, 0,
"1-3 metabolite power function for plasma parent fraction"},
104 {
"mpf3pow1", 882, 2, 0,
"1-3 metabolite power function for plasma metab1 fraction"},
105 {
"mpf3pow2", 883, 2, 0,
"1-3 metabolite power function for plasma metab2 fraction"},
106 {
"mpf3pow3", 884, 2, 0,
"1-3 metabolite power function for plasma metab3 fraction"},
107 {
"step", 1010, 2, 2,
"Step function with x values and y values after those"},
108 {
"ratf32d", 1232, 2, 0,
"3rd/2nd order rational function with delay"},
109 {
"fengm2s", 1312, 2, 5,
"PTAC function with two exponentials"},
110 {
"fengm2", 1313, 2, 7,
"PTAC function with three exponentials"},
111 {
"fengm2e", 1314, 2, 9,
"PTAC function with four exponentials"},
112 {
"gammav", 1401, 2, 4,
"Gamma variate"},
113 {
"gammavb", 1402, 2, 0,
"Gamma variate with background"},
114 {
"weibullcdfd", 1421, 2, 4,
"Weibull cdf with delay"},
115 {
"weibullcdfdd",1423, 2, 5,
"Weibull cdf and pdf sum with delay"},
116 {
"surge", 1431, 2, 2,
"Surge function with AUC as parameter"},
117 {
"tradsurge", 1432, 2, 2,
"Traditional surge function"},
118 {
"surgerecirc", 1433, 2, 3,
"Surge function with recirculation"},
119 {
"p2bsrc", 1434, 2, 4,
"Surge function with recirculation for plasma-to-blood ratio"},
120 {
"surgefdgaif", 1435, 2, 5,
"Surge function for late FDG AIF with delay"},
121 {
"erlangpdf", 1441, 2, 3,
"Probability density function of Erlang distribution"},
122 {
"hilld", 1801, 2, 0,
"Hill function with delay"},
123 {
"hilldd", 1811, 2, 0,
"derivative of Hill function with delay"},
124 {
"hillssd", 1821, 2, 0,
"sum of Hill function and derivative with delay"},
125 {
"surgerecircd",1833, 2, 4,
"Surge function with recirculation and delay"},
126 {
"imgprofile", 2111, 2, 0,
"image profile"},
127 {
"p2brf", 2233, 2, 7,
"Rational function for plasma-to-blood ratio"},
128 {
"p2bfm2", 2313, 2, 7,
"Feng M2 function for plasma-to-blood ratio"},
129 {
"p2bhill", 2841, 2, 4,
"Hill function for plasma-to-blood ratio"},
131 {
"FRTM", 0, 1, 4,
"full reference tissue model"},
132 {
"SRTM", 0, 1, 3,
"simplified reference tissue model"},
133 {
"RRTM", 0, 1, 3,
"reduced reference tissue model"},
134 {
"TRTM", 0, 1, 3,
"transport-limited reference tissue model"},
135 {
"1TCM", 0, 1, 5,
"one-tissue compartmental model"},
136 {
"2TCM", 0, 1, 7,
"two-tissue compartmental model"},
137 {
"PAR3TCM", 0, 1, 9,
"parallel three-tissue compartmental model"},
138 {
"SER3TCM", 0, 1, 9,
"serial three-tissue compartmental model"},
139 {
"TTM", 0, 1, 2,
"transit-time model"},
140 {
"radiowater", 0, 1, 4,
"radiowater perfusion model"},
141 {
"radiowater2", 0, 1, 6,
"radiowater perfusion model 2"},
142 {
"radiowater-lung", 0, 1, 5,
"radiowater perfusion model for lungs"},
143 {
"radiowater-liver", 0, 1, 7,
"radiowater perfusion model for liver"},
144 {
"radiowater-liver-TTM", 0, 1, 6,
"radiowater perfusion TTM model for liver"},
145 {
"oxygen-brain", 0, 1, 7,
"oxygen model for brain"},
146 {
"dispdelay", 0, 1, 2,
"dispersion and delay in radiowater studies"},
148 {
"O1CM", 0, 3, 3,
"one-compartment model with first-order absorption and elimination"},
149 {
"O2CM", 0, 3, 5,
"two-compartment model with first-order absorption and elimination"},
151 {
"ebolinfdd", 3331,12, 8,
"exponential bolus infusion function plus delay and dispersion"},
164 while(tpc_model[i].code[0]!=
'\0') i++;
179 if(i>=
modelNr())
return((
char*)NULL);
180 return(tpc_model[i].code);
194 return(tpc_model[i].
id);
210 for(
unsigned int j=1; j<n; j++)
if(tpc_model[j].
id==i)
return(j);
225 if(i>=
modelNr())
return((
char*)NULL);
226 return(tpc_model[i].desc);
240 if(s==NULL || *s==
'\0')
return(0);
242 while(tpc_model[i].code[0]!=
'\0') {
243 if(!strcasecmp(tpc_model[i].code, s))
return(i);
257 const unsigned int code
259 if(code<1 || code>=
modelNr())
return(0);
260 return(tpc_model[code].parNr);
char * modelCode(const unsigned int i)
char * modelDesc(const unsigned int i)
unsigned int modelParNr(const unsigned int code)
unsigned int modelOldId(const unsigned int i)
unsigned int modelOld2New(const unsigned int i)
unsigned int modelCodeIndex(const char *s)
Header file for library libtpcextensions.
Header file for libtpcmodels.