#include <stdio.h>#include <stdlib.h>#include <string.h>#include <math.h>#include <time.h>#include "include/libtpcmodext.h"Go to the source code of this file.
Functions | |
| int | dftInterpolateForIMG (DFT *input, IMG *img, int frame_nr, DFT *output, double *ti1, double *ti2, int verbose, char *status) |
| int | imgTimeIntegral (IMG *img, float t1, float t2, IMG *iimg, int calc_mode, char *status) |
| int dftInterpolateForIMG | ( | DFT * | input, |
| IMG * | img, | ||
| int | frame_nr, | ||
| DFT * | output, | ||
| double * | ti1, | ||
| double * | ti2, | ||
| int | verbose, | ||
| char * | status | ||
| ) |
Interpolate (and integrate) TAC data to sample times that are given with IMG data. Input frame lengths are taken into account if they are available in DFT or if the framing is the same as in IMG data.
| input | Data which is interpolated |
| img | Data to which (sample times) the interpolation is done |
| frame_nr | Number of IMG frames that are needed; can be set to 0 if all frames can be included |
| output | Pointer to initiated DFT into which interpolated values and integrals will be written at input sample times and units |
| ti1 | First time of input data before interpolation (in input time units); use this to check that required time range was measured; NULL if not needed |
| ti2 | Last time of input data before interpolation (in input time units); use this to check that required time range was measured; NULL if not needed |
| verbose | Verbose level; set to zero to not to print any comments |
| status | Pointer to a string (allocated for at least 64 chars) where error message or other execution status will be written; enter NULL, if not needed |
Definition at line 110 of file misc.c.
References check_times_dft_vs_dft(), copy_times_from_img_to_dft(), and dftInterpolateCheckStart().
| int imgTimeIntegral | ( | IMG * | img, |
| float | t1, | ||
| float | t2, | ||
| IMG * | iimg, | ||
| int | calc_mode, | ||
| char * | status | ||
| ) |
Integration of dynamic image from time1 to time2, storing integrals in iimg, which is allocated here. Frames do not have to be continuous in time. Time unit in integral is sec. Raw data (sinogram) must be divided by frame durations before calling this. You may want to test the time range before applyin this routine, because this function accepts relatively large extrapolation large.
| img | IMG data; preferrably dynamic, if static, then the specified time range must match with the frame time |
| t1 | Time where to start integration (sec) |
| t2 | Time to stop integration (sec); must be higher than t1 |
| iimg | Pointer to initiated but empty AUC IMG data |
| calc_mode | Calculate integral or average: 0=integral, 1=average |
| status | Pointer to a string (allocated for at least 128 chars) where error message or other execution status will be written; enter NULL, if not needed |
1.8.0