TPCCLIB
|
Set pixels in dynamic PET image to zero if their TACs seem to contain only noise. More...
Go to the source code of this file.
Functions | |
int | imgBorderAverageTAC (IMG *img, float *tac, float *sd, float *med) |
int | imgNoiseTemplate (IMG *img, int keepNegat, int border, IMG *timg, int verbose, char *status) |
Set pixels in dynamic PET image to zero if their TACs seem to contain only noise.
Definition in file imgbkgrm.c.
int imgBorderAverageTAC | ( | IMG * | img, |
float * | tac, | ||
float * | sd, | ||
float * | med ) |
Calculates an average time-activity curve of all pixels at the x,y-border in the specified IMG data.
Border values can often be assumed to consist of background noise only. Z-borders are not included because imaging target usually extends over z-borders.
img | Pointer to the image data. |
tac | Pointer to an array, allocated for the size of img->dimt, where border pixel mean values will be written; enter NULL if not needed. |
sd | Pointer to an array, allocated for the size of img->dimt, where border pixel s.d. values will be written; enter NULL if not needed. |
med | Pointer to an array, allocated for the size of img->dimt, where border pixel median values will be written; enter NULL if not needed. |
Definition at line 85 of file imgbkgrm.c.
Referenced by imgNoiseTemplate().
int imgNoiseTemplate | ( | IMG * | img, |
int | keepNegat, | ||
int | border, | ||
IMG * | timg, | ||
int | verbose, | ||
char * | status ) |
Creates a mask (template) image based on whether pixel TAC is closer to scaled mean TAC of the image data than to the zero, based on AICs.
Pixel considered as noise will lead to mask value 0, otherwise 1.
img | Original dynamic image; if sinogram data, then divide by frame lengths first. If data does not contain frame times, then equal frame times are assumed. |
keepNegat | Process pixels with AUC<0 normally (1), or consider as noise (0). |
border | Set to 0 to compare pixels TACs to zero, or set to <>0 to compare to background TAC calculated as median of image x,y-border pixels. |
timg | Mask image; if empty, then it will be allocated here; if pre-allocated, then mask pixel value changed to 0 when necessary, but 0 is never changed to 1. |
verbose | Verbose level; if zero, then nothing is printed to stderr or stdout. |
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 137 of file imgbkgrm.c.