|
TPCCLIB
|
Header file for libtpcmodels. More...
#include "tpcclibConfig.h"#include <stdio.h>#include <stdlib.h>#include <string.h>#include <math.h>#include "tpcextensions.h"Go to the source code of this file.
Enumerations | |
| enum | mf { MF_UNKNOWN =0 , MF_LEVEL =100 , MF_LINE =101 , MF_POL2 , MF_POL3 , MF_POL4 , MF_POL5 , MF_POL6 , MF_POL7 , MF_POL8 , MF_POL9 , MF_RATF11 =211 , MF_RATF21 =221 , MF_RATF22 =222 , MF_RATF32 =232 , MF_RATF33 =233 , MF_EXP1 =301 , MF_EXP2 =302 , MF_EXP3 , MF_EXP4 , MF_EXP5 , MF_LUNDQVIST =321 , MF_LUNDQVIST2 , MF_LUNDQVIST3 , MF_EXPBOLUSINF =331 , MF_EXPBOLUSINF_RW =332 , MF_EXPBOLUSINF_AZ =334 , MF_PK11195 =351 , MF_HILL =841 , MF_1MHILL =842 , MF_1MHILL_ADE =843 , MF_HILL_B =844 , MF_AMHILL =845 , MF_EHILL_PAR =846 , MF_EHILL_MET =847 , MF_MAMEDE =851 , MF_1MMAMEDE , MF_MAYER_PAR =861 , MF_MAYER_MET , MF_EMAYER_PAR , MF_EMAYER_MET , MF_HILL3M_PAR =871 , MF_HILL3M_M1 , MF_HILL3M_M2 , MF_HILL3M_M3 , MF_PF3M_PAR =881 , MF_PF3M_M1 , MF_PF3M_M2 , MF_PF3M_M3 , MF_STEP =1010 , MF_RATF33D =1232 , MF_FENGM2S =1312 , MF_FENGM2 =1313 , MF_FENGM2E =1314 , MF_GAMMAV =1401 , MF_GAMMAVB =1402 , MF_WEIBULLCDF_D =1421 , MF_WEIBULLCDF_DD =1423 , MF_SURGE =1431 , MF_SURGE_TRAD =1432 , MF_SURGE_RECIRC =1433 , MF_P2B_SRC =1434 , MF_SURGE_FDG =1435 , MF_HILL_D =1801 , MF_HILL_DD =1811 , MF_HILL_SDD =1821 , MF_IMGPROFILE =2111 , MF_P2B_RF =2233 , MF_P2B_FM2 =2313 , MF_P2B_HILL =2841 , MF_GRAHAM_INP =9501 , MF_GRAHAM_EINP , MF_GRAHAM_INPM , MF_HUANG_MET =9601 , MF_CARSON_EMET , MF_NEW_MET , MF_MLMCM =9701 , MF_LAST } |
| Deprecated identification codes of mathematical functions fitted to PET data. More... | |
| enum | optimality_criterion { OPTCRIT_UNKNOWN , OPTCRIT_OLS , OPTCRIT_LMS , OPTCRIT_LAD , OPTCRIT_MAD , OPTCRIT_ODR , OPTCRIT_LAST } |
| Optimality Criterion for statistical optimizations. More... | |
Functions | |
| double | aicSS (double ss, const unsigned int n, const unsigned int k) |
| Calculate corrected AIC. | |
| unsigned int | parFreeNr (const unsigned int n, double *pLower, double *pUpper) |
| Calculate the number of free parameters. | |
| unsigned int | modelNr () |
| char * | modelCode (const unsigned int i) |
| unsigned int | modelOldId (const unsigned int i) |
| unsigned int | modelOld2New (const unsigned int i) |
| char * | modelDesc (const unsigned int i) |
| unsigned int | modelCodeIndex (const char *s) |
| unsigned int | modelParNr (const unsigned int code) |
| unsigned int | optcritNr () |
| char * | optcritCode (optimality_criterion id) |
| char * | optcritDesc (optimality_criterion id) |
| optimality_criterion | optcritId (const char *s) |
Header file for libtpcmodels.
Header file for model description library.
Definition in file tpcmodels.h.
| enum mf |
Deprecated identification codes of mathematical functions fitted to PET data.
Definition at line 27 of file tpcmodels.h.
| enum optimality_criterion |
Optimality Criterion for statistical optimizations.
Definition at line 66 of file tpcmodels.h.
|
extern |
Calculate corrected AIC.
Calculate AICc in the special case of sum-of-squares optimization from the SS, number of fitted samples, and number of fitted parameters.
If variance is different between the data points, weighted SS must be given.
| ss | Sum-of-Squares of the fit (weighted, if necessary). |
| n | Sample size, i.e. number of fitted samples; do not include samples with zero weight. |
| k | Number of fitted model parameters; do not include fixed parameters; AICc calculation is valid only when (n-k)>1. |
Definition at line 29 of file aic.c.
|
extern |
Get string representation of a model code.
| i | model list index. |
Definition at line 175 of file modell.c.
Referenced by mfCreateTAC(), parWriteCSV(), and parWriteXML().
|
extern |
Get model index for the string representation of model code.
| s | model code as a string; code is case-insensitive, but otherwise exact match is required. |
Definition at line 236 of file modell.c.
Referenced by parExamplePerfectBolus(), parExampleRadiowaterBolus(), parExampleTTACs(), and parReadCSV().
|
extern |
|
extern |
Number of listed models.
Definition at line 161 of file modell.c.
Referenced by modelCode(), modelDesc(), modelOld2New(), and modelParNr().
|
extern |
Convert the deprecated function id to the model list index.
| i | Deprecated function id. |
Definition at line 204 of file modell.c.
Referenced by parReadFIT().
|
extern |
Get the deprecated function id for working with older file formats.
| i | model list index. |
Definition at line 190 of file modell.c.
Referenced by parWriteFIT().
|
extern |
Get model parameter number.
| code | model code; can be retrieved using modelCodeIndex(). |
Definition at line 255 of file modell.c.
Referenced by mfCreateTAC(), parExamplePerfectBolus(), parExampleRadiowaterBolus(), and parExampleTTACs().
|
extern |
Get string representation of an optimality criterion.
| id | Optimality criterion. |
Definition at line 60 of file optcrit.c.
|
extern |
Get description of an optimality criterion.
| id | Optimality criterion. |
Definition at line 74 of file optcrit.c.
|
extern |
Get the Id for the string representation of optimality criterion code string.
| s | Optimality criterion code string; code is case-insensitive, but otherwise exact match is required. |
Definition at line 88 of file optcrit.c.
|
extern |
Number of optimality criteria.
Definition at line 47 of file optcrit.c.
Referenced by optcritCode(), optcritDesc(), and optcritId().
|
extern |
Calculate the number of free parameters.
Model parameters can be fixed by setting lower and upper limit to equal values. This function simply checks the limits for each parameter.
| n | Nr of parameters |
| pLower | Lower limits (array of length n) |
| pUpper | Upper limits (array of length n) |
Definition at line 60 of file aic.c.