#include <stdio.h>#include <stdlib.h>#include <math.h>#include <time.h>#include <string.h>#include <ctype.h>#include "halflife.h"#include "branch.h"#include "include/img.h"#include "include/imgdecay.h"Go to the source code of this file.
Functions | |
| int | imgDecayCorrection (IMG *image, int mode) |
| char * | imgIsotope (IMG *img) |
| int | imgSetDecayCorrFactors (IMG *image, int mode) |
| int | imgBranchingCorrection (IMG *image, int mode, int verbose, char *status) |
| int imgBranchingCorrection | ( | IMG * | image, |
| int | mode, | ||
| int | verbose, | ||
| char * | status | ||
| ) |
Corrects image data for branching fraction (mode=1) or removes correction (mode=0). Removal is primarily based on branching factor stored in IMG struct, secondarily on isotope; after removal, branching factor is set to 1, and pixel values and calibration factor are multiplied with it. Correction is based on branching fractions in branch.h; pixel values and calibration factor are divided by it, and its value is stored in IMG struct. Note that this function can not know if branching fraction correction is included in the data (as it usually is) or not.
| image | Pointer to IMG data |
| mode | Branching fraction correction (1) or removal of correction (0) |
| verbose | Verbose level; if zero, then nothing is printed into stdout or stderr |
| status | Pointer to allocated string where error message will be written; NULL, if not needed. |
Definition at line 178 of file imgdecay.c.
References IMG::branchingFraction, IMG::calibrationFactor, IMG::dimt, IMG::dimx, IMG::dimy, IMG::dimz, IMG_STATUS_OCCUPIED, IMG::isotopeHalflife, IMG::m, and IMG::status.
| int imgDecayCorrection | ( | IMG * | image, |
| int | mode | ||
| ) |
Corrects (mode=1) or removes correction (mode=0) for physical decay. Removal is based on existing decay correction factors, when possible.
| image | pointer to IMG data |
| mode | 0=Remove decay correction; 1=Correct for decay |
Definition at line 64 of file imgdecay.c.
References IMG::decayCorrection, IMG::decayCorrFactor, IMG::dimt, IMG::dimx, IMG::dimy, IMG::dimz, IMG::end, IMG_DC_CORRECTED, IMG_DC_NONCORRECTED, IMG_STATUS_OCCUPIED, IMG_TEST, IMG::isotopeHalflife, IMG::m, IMG::start, and IMG::status.
| char* imgIsotope | ( | IMG * | img | ) |
Returns pointer to string describing the isotope in image data
| img | image stucture |
Definition at line 119 of file imgdecay.c.
References IMG::isotopeHalflife.
Referenced by ecat63AddImg(), ecat63WriteAllImg(), img2sif(), imgSetEcat63MHeader(), and imgSetEcat7MHeader().
| int imgSetDecayCorrFactors | ( | IMG * | image, |
| int | mode | ||
| ) |
Sets (mode=1) or removes (mode=0) decay correction factors in IMG. IMG pixel data is not changed.
| image | pointer to IMG data |
| mode | factors are calculated for decay correction (1) or for removing decay correction (0) |
Definition at line 135 of file imgdecay.c.
References IMG::decayCorrection, IMG::decayCorrFactor, IMG::dimt, IMG::end, IMG_DC_CORRECTED, IMG_DC_NONCORRECTED, IMG_STATUS_OCCUPIED, IMG::isotopeHalflife, IMG::start, and IMG::status.
Referenced by test_create_img().
1.8.3.1