|
TPCCLIB
|
Contains I/O functions for DFT files. More...
Go to the source code of this file.
Functions | |
| int | dftRead (char *filename, DFT *data) |
| int | dftFormat (char *fname) |
| int | dftType (FILE *fp) |
| void | dftPrint (DFT *data) |
| int | dftWrite (DFT *data, char *filename) |
| int | dftWriteHTML (DFT *dft, char *fname, int orientation) |
| int | dftWriteXHTML11_doctype (FILE *fp) |
| int | dftWriteXHTML11_head (FILE *fp, char *author_name) |
| int | dft_fill_hdr_from_IFT (DFT *dft, IFT *ift) |
| int | dftGetPmodTitle (DFT *dft, char *title_line) |
Variables | |
| int | DFT_NR_OF_DECIMALS = 3 |
Contains I/O functions for DFT files.
Definition in file dftio.c.
Read certain keys from IFT and set DFT fields accordingly.
| dft | Pointer to allocated DFT struct where information will be written |
| ift | Pointer to IFT struct from where information is retrieved |
Definition at line 971 of file dftio.c.
Referenced by dft_fill_hdr_from_IFT(), and dftRead().
| int dftFormat | ( | char * | fname | ) |
Determine the type of DFT file. This will replace dftType().
Note that only some of formats are currently identified, and identification does not mean that dftRead() supports the format.
| fname | Pointer to file name; this string is not modified. |
Definition at line 422 of file dftio.c.
Referenced by dftFormat(), dftRead(), dftReadinput(), and dftReadReference().
| int dftGetPmodTitle | ( | DFT * | dft, |
| char * | title_line ) |
Read single title line from PMOD files and set DFT fields accordingly. Alternatively, reads the number of regions in PMOD title line.
| dft | Pointer to allocated DFT struct where information will be written; Enter NULL, if only the nr of regions is to be returned. |
| title_line | Pointer to string containing the title line; string is not modified |
Definition at line 1109 of file dftio.c.
Referenced by dftGetPmodTitle(), and dftRead().
| void dftPrint | ( | DFT * | data | ) |
Prints to stdout the contents of DFT data structure. Mainly for testing purposes.
Definition at line 538 of file dftio.c.
Referenced by csv2dft(), dftPrint(), dftRead(), img_k1_using_ki(), img_logan(), and img_patlak().
| int dftRead | ( | char * | filename, |
| DFT * | data ) |
Read TAC file contents into specified DFT data structure. Reads standard DFT files, plain DFT files, and some other formats.
| filename | Name of file to be read. |
| data | Pointer to initiated DFT struct where data will be written; any old content is deleted. |
Definition at line 22 of file dftio.c.
Referenced by dftRead(), dftReadinput(), dftReadModelingData(), dftReadReference(), and imgReadModelingData().
| int dftType | ( | FILE * | fp | ) |
Determine the type of DFT file.
Definition at line 503 of file dftio.c.
Referenced by dftType().
| int dftWrite | ( | DFT * | data, |
| char * | filename ) |
Write DFT data, usually containing regional time-activity curves (TACs) into specified file.
The file format specified in data is applied. Number of decimals can be determined by changing global variable DFT_NR_OF_DECIMALS.
| data | Pointer to DFT structure which contents are to be written. |
| filename | File name where DFT contents are written. If file exists, original file is renamed to a backup file. |
Definition at line 594 of file dftio.c.
Referenced by dftWrite(), and plotdata_as_dft().
| int dftWriteHTML | ( | DFT * | dft, |
| char * | fname, | ||
| int | orientation ) |
Write DFT contents in HTML table format If file exists, a backup file (+BACKUP_EXTENSION) is written also. If "stdout" is given as filename, output is directed to stdout In case of an error, description is written in dfterrmsg.
| dft | Input DFT |
| fname | HTML filename |
| orientation | Table orientation: 1=original, 2=transposed |
Definition at line 757 of file dftio.c.
Referenced by dftWrite(), and dftWriteHTML().
| int dftWriteXHTML11_doctype | ( | FILE * | fp | ) |
Write XHTML 1.1 doctype into an opened file pointer.
Definition at line 908 of file dftio.c.
Referenced by dftWriteHTML(), and dftWriteXHTML11_doctype().
| int dftWriteXHTML11_head | ( | FILE * | fp, |
| char * | author_name ) |
Write XHTML 1.1 head for DFT file into an opened file pointer.
| fp | File pointer where to write |
| author_name | Author name, for example software name |
Definition at line 926 of file dftio.c.
Referenced by dftWriteHTML(), and dftWriteXHTML11_head().
| int DFT_NR_OF_DECIMALS = 3 |
Nr of decimals for concentration values
Nr of decimals for concentration values.
Definition at line 13 of file dftio.c.
Referenced by dftRead(), and dftWrite().