TPCCLIB
|
Weights for PET data modelling. More...
#include "libtpcmodext.h"
Go to the source code of this file.
Functions | |
int | dftWeightByFreq (DFT *dft) |
int | imgSetWeights (IMG *img, int wmet, int verbose) |
int | dftWSampleNr (DFT *tac) |
Weights for PET data modelling.
Definition in file weight_model.c.
int dftWeightByFreq | ( | DFT * | dft | ) |
Add weights based on sample frequency or frame length.
Existing weights are overwritten.
dft | Samples/frames must be sorted by sample time, but duplicate samples are allowed |
Definition at line 20 of file weight_model.c.
int dftWSampleNr | ( | DFT * | tac | ) |
Get the number of samples in DFT that have weight > 0. Missing (NaN) sample values are included as long as weight is not missing. If weights are not set, then nr of all samples is returned.
tac | Pointer to the DFT struct. |
Definition at line 147 of file weight_model.c.
int imgSetWeights | ( | IMG * | img, |
int | wmet, | ||
int | verbose ) |
Add weights based on average voxel values and frame lengths, just frame lengths, or set all weights to 1 (no weighting).
Existing weights are overwritten. Decay correction is not considered in calculation of weights.
img | Pointer to IMG struct; image data is used to calculate relational frame weights, which are also written into IMG struct. |
wmet | Weighting method: 0=based on mean voxel values times frame lengths; 1=based on frame lengths, 2=set weights to 1 (no weighting). |
verbose | Verbose level; if zero, then only warnings are printed into stderr |
Definition at line 85 of file weight_model.c.