TPCCLIB
|
Functions for basic processing of IFT data structure. More...
#include "libtpcmisc.h"
Go to the source code of this file.
Functions | |
void | iftSetStatus (IFT *ift, int status) |
void | iftInit (IFT *ift) |
void | iftEmpty (IFT *ift) |
int | iftPut (IFT *ift, char *key, char *value, char *cmt_type, int verbose) |
int | iftPutDouble (IFT *ift, char *key, double value, char *cmt_type, int verbose) |
int | iftDeleteItem (IFT *ift, int item, int verbose) |
int | iftReplaceNthValue (IFT *ift, int item, char *value, int verbose) |
int | iftdup (IFT *ift1, IFT *ift2, int verbose) |
int iftDeleteItem | ( | IFT * | ift, |
int | item, | ||
int | verbose ) |
Remove the specified item from IFT.
ift | Pointer to IFT structure. |
item | Index [0..keyNr-1] of key and value to delete. |
verbose | Verbose level; if zero, then only warnings are printed into stderr |
Definition at line 169 of file ift.c.
Referenced by ecat7CopyHeadersNoQuant().
Make a copy (duplicate) of IFT structure.
ift1 | Pointer to IFT structure to be copied. |
ift2 | Pointer to initiated IFT structure; any previous contents are deleted. |
verbose | Verbose level; if zero, then only warnings are printed into stderr |
Definition at line 235 of file ift.c.
Referenced by imgCopyhdr().
void iftEmpty | ( | IFT * | ift | ) |
Free memory allocated for IFT. All contents are destroyed.
ift | Pointer to target IFT structure. |
Definition at line 60 of file ift.c.
Referenced by cptReadOne(), defRead(), dftRead(), ehdrEmpty(), ematEmpty(), hrrtMakeCalHdr(), iftdup(), iftRead(), iftReadValue(), imgEmpty(), imgReadMicropetFrame(), imgReadMicropetHeader(), interfileIsHeader(), irdRead(), niftiHeaderToIFT(), readEcat931Calibrationfile(), res2ift(), tsvRead(), vrdRead(), and xelRead().
void iftInit | ( | IFT * | ift | ) |
Initiate IFT structure. This should be called once before first use.
ift | Pointer to target IFT structure. |
Definition at line 45 of file ift.c.
Referenced by cptReadOne(), dftRead(), ehdrInitiate(), ematInitiate(), hrrtMakeCalHdr(), iftReadValue(), imgInit(), interfileIsHeader(), irdRead(), readEcat931Calibrationfile(), tsvRead(), vrdRead(), and xelRead().
int iftPut | ( | IFT * | ift, |
char * | key, | ||
char * | value, | ||
char * | cmt_type, | ||
int | verbose ) |
Add specified key and its value to the IFT.
Also comment type (first character pointed to) can be added. Either key or value can be empty, but not both of them.
ift | Pointer to initiated IFT; previous contents are not changed |
key | Key string; can be empty ("" or NULL) |
value | Value string; can be empty ("" or NULL) |
cmt_type | Pointer to comment character, e.g. '#' or ';' or '!'; can be empty ("" or NULL) |
verbose | Verbose level; if zero, then only warnings are printed into stderr |
Definition at line 82 of file ift.c.
Referenced by defRead(), ecat7ImageheaderToIFT(), ecat7MHeaderToIFT(), ecat7ScanheaderToIFT(), hrrtMakeCalHdr(), iftdup(), iftPutDouble(), iftRead(), niftiHeaderToIFT(), and res2ift().
int iftPutDouble | ( | IFT * | ift, |
char * | key, | ||
double | value, | ||
char * | cmt_type, | ||
int | verbose ) |
Add specified key and its floating point (double) value to the IFT.
Also comment type (first character pointed to) can be added. Key can be empty.
ift | Pointer to initiated IFT; previous contents are not changed |
key | Key string; can be empty ("" or NULL) |
value | Value as double |
cmt_type | Pointer to comment character, e.g. '#' or ';' or '!'; can be empty ("" or NULL) |
verbose | Verbose level; if zero, then only warnings are printed into stderr |
Definition at line 145 of file ift.c.
Referenced by hrrtMakeCalHdr().
int iftReplaceNthValue | ( | IFT * | ift, |
int | item, | ||
char * | value, | ||
int | verbose ) |
Replaces specified value in IFT with a new value.
ift | Pointer to IFT structure. |
item | Index [0..keyNr-1] of key and value. |
value | Value string; can be empty ("" or NULL). |
verbose | Verbose level; if zero, then only warnings are printed into stderr |
Definition at line 206 of file ift.c.
void iftSetStatus | ( | IFT * | ift, |
int | status ) |
Sets IFT status
ift | Pointer to target IFT structure. |
status | New status value. |
Definition at line 29 of file ift.c.
Referenced by defRead(), iftDeleteItem(), iftFindNthKey(), iftFindNthValue(), iftGet(), iftGetDoubleValue(), iftGetFloatValue(), iftGetFrom(), iftGetFullmatchFrom(), iftGetIntValue(), iftGetKeyNr(), iftGetNth(), iftPut(), iftRead(), iftReplaceNthValue(), iftWrite(), and iftWriteItem().