|
TPCCLIB
|
Procedures for reading Siemens Inveon images. More...
#include "libtpcimgio.h"Go to the source code of this file.
Functions | |
| int | upetHeaderReadParameter (FILE *fp, char *parameter, char *value) |
| int | upetIsHeader (char *hdrfile) |
| int | upetExists (const char *upetname, char *hdrfile, char *imgfile, int verbose) |
| int | upetGetImageDimensions (FILE *fp, int *z, int *x, int *y, int *f) |
| int | upetScanStart (FILE *fp, time_t *scant) |
| int | upetReadImagedata (FILE *fp, IFT *ift, int frame, float *data) |
Variables | |
| int | MICROPET_TEST |
Procedures for reading Siemens Inveon images.
Definition in file micropet.c.
| int upetExists | ( | const char * | upetname, |
| char * | hdrfile, | ||
| char * | imgfile, | ||
| int | verbose ) |
Check if specified image filename is a Concorde/microPET file
| upetname | Filename, either header file, image file, or base name without extensions. |
| hdrfile | If upetname is a Concorde/microPET file, then header filename will be written in this char pointer (space needs to allocated by caller); NULL if not needed. |
| imgfile | If upetname is a Concorde/microPET file, then image filename will be written in this char pointer (space needs to allocated by caller); NULL if not needed. |
| verbose | Verbose level; if <=0, then nothing is printed into stdout |
Definition at line 86 of file micropet.c.
Referenced by imgFormatDetermine(), imgMicropetToEcat7(), imgRead(), imgReadMicropetFrame(), and imgReadMicropetHeader().
| int upetGetImageDimensions | ( | FILE * | fp, |
| int * | z, | ||
| int * | x, | ||
| int * | y, | ||
| int * | f ) |
Read image dimensions from header.
| fp | File pointer to MicroPET image header |
| z | Pointers to dimensions: planes |
| x | Pointers to dimensions: columns |
| y | Pointers to dimensions: rows |
| f | Pointers to dimensions: frames; if not existent (CT), enter NULL |
Definition at line 154 of file micropet.c.
Referenced by imgMicropetCTToEcat7(), and imgMicropetPETToEcat7().
| int upetHeaderReadParameter | ( | FILE * | fp, |
| char * | parameter, | ||
| char * | value ) |
Read specified parameter value from Concorde/MicroPET header.
| fp | File pointer to Concorde/MicroPET header; parameter is read starting from file pointer forward, therefore rewind file pointer before calling this routine if you want to search parameter from beginning. |
| parameter | Pointer to string which contains the header parameter name. |
| value | Pointer to allocated string where parameter value will be written; memory for at least MAX_MICROPET_LINE_LEN chars must be allocated; NULL if not needed. |
Definition at line 16 of file micropet.c.
Referenced by imgGetMicropetFrameHeader(), imgGetMicropetMainHeader(), imgGetMicropetSIF(), imgMicropetCTToEcat7(), imgMicropetToEcat7(), upetGetImageDimensions(), upetIsHeader(), and upetScanStart().
| int upetIsHeader | ( | char * | hdrfile | ) |
Verify that given file is a valid Concorde/microPET file header file.
| hdrfile | Concorde/microPET file header filename, with correct extension |
Definition at line 55 of file micropet.c.
Referenced by upetExists().
| int upetReadImagedata | ( | FILE * | fp, |
| IFT * | ift, | ||
| int | frame, | ||
| float * | data ) |
Reads microPET image data, scaling values to floats if necessary.
Reads only one frame at a time!
| fp | file opened previously in binary mode |
| ift | microPET header in IFT struct |
| frame | frame number to read [1..number of frames] |
| data | pointer to image float data allocated previously |
Definition at line 243 of file micropet.c.
Referenced by imgReadMicropetFrame().
| int upetScanStart | ( | FILE * | fp, |
| time_t * | scant ) |
Read scan start time from Concorde/MicroPET header.
| fp | File pointer to Concorde/MicroPET header |
| scant | Pointer to time_t where time and date will be saved |
Definition at line 194 of file micropet.c.
Referenced by imgGetMicropetSIF(), imgMicropetCTToEcat7(), and imgMicropetPETToEcat7().
| int MICROPET_TEST |
Verbose prints from microPET functions
Definition at line 6 of file micropet.c.
Referenced by imgGetMicropetHeader(), upetHeaderReadParameter(), upetIsHeader(), and upetReadImagedata().