|
TPCCLIB
|
Search functions for IFT contents. More...
#include "libtpcmisc.h"Go to the source code of this file.
Functions | |
| int | iftGet (IFT *ift, char *key, int verbose) |
| int | iftGetNth (IFT *ift, char *key, int n, int verbose) |
| int | iftFindNthKey (IFT *ift, char *str, int n, int verbose) |
| int | iftFindNthValue (IFT *ift, char *str, int n, int verbose) |
| int | iftGetFrom (IFT *ift, int si, const char *key, int verbose) |
| int | iftGetFullmatchFrom (IFT *ift, int si, const char *key, const char *value, int verbose) |
| int | iftGetFloatValue (IFT *ift, int si, const char *key, float *value, int verbose) |
| int | iftGetDoubleValue (IFT *ift, int si, const char *key, double *value, int verbose) |
| int | iftGetIntValue (IFT *ift, int si, const char *key, int *value, int verbose) |
| int | iftGetKeyNr (IFT *ift, const char *key, int verbose) |
| int iftFindNthKey | ( | IFT * | ift, |
| char * | str, | ||
| int | n, | ||
| int | verbose ) |
Find the Nth item of IFT where the specified string is found in the key. Comparison is case sensitive.
| ift | Pointer to IFT structure. |
| str | Pointer to the case-sensitive (partial) key string. |
| n | Nth (1..keyNr-1) incidence of value is searched. |
| verbose | Verbose level; if zero, then only warnings are printed into stderr |
Definition at line 84 of file iftsrch.c.
Referenced by cptReadOne().
| int iftFindNthValue | ( | IFT * | ift, |
| char * | str, | ||
| int | n, | ||
| int | verbose ) |
Find the Nth item of IFT where the specified string is found in the value. Comparison is case sensitive.
| ift | Pointer to IFT structure. |
| str | Pointer to the case-sensitive (partial) value string. |
| n | Nth (1..keyNr-1) incidence of value is searched.. |
| verbose | Verbose level; if zero, then only warnings are printed into stderr. |
Definition at line 120 of file iftsrch.c.
Referenced by cptReadOne(), and xelRead().
| int iftGet | ( | IFT * | ift, |
| char * | key, | ||
| int | verbose ) |
Find the key in the IFT and return the index [0..keyNr-1]. Key is case insensitive.
| ift | Pointer to IFT structure. |
| key | Pointer to the key string; contents are replaced by the correct key string. |
| verbose | Verbose level; if zero, then only warnings are printed into stderr |
Definition at line 15 of file iftsrch.c.
Referenced by cptReadOne(), dft_fill_hdr_from_IFT(), ecat7CopyHeadersNoQuant(), imgGetMicropetHeader(), irdRead(), niftiHeaderFromIFT(), tsvRead(), vrdRead(), and xelRead().
| int iftGetDoubleValue | ( | IFT * | ift, |
| int | si, | ||
| const char * | key, | ||
| double * | value, | ||
| int | verbose ) |
Finds the specified key string from IFT structure, and reads the corresponding value as double.
| ift | Pointer to existing IFT. |
| si | Index [0..keyNr-1] from which the search is started. |
| key | Pointer to the key string; search is case-insensitive. |
| value | Pointer to double variable where value is written; NaN is written in case of an error. |
| verbose | Verbose level; if zero, then only warnings are printed into stderr. |
Definition at line 268 of file iftsrch.c.
Referenced by hrrtMakeCalHdr().
| int iftGetFloatValue | ( | IFT * | ift, |
| int | si, | ||
| const char * | key, | ||
| float * | value, | ||
| int | verbose ) |
Finds the specified key string from IFT structure, and reads the corresponding value as float.
| ift | Pointer to existing IFT. |
| si | Index [0..keyNr-1] from which the search is started. |
| key | Pointer to the key string; search is case-insensitive. |
| value | Pointer to float variable where value is written; NaN is written in case of an error. |
| verbose | Verbose level; if zero, then only warnings are printed into stderr. |
Definition at line 228 of file iftsrch.c.
Referenced by imgGetMicropetHeader(), imgReadMicropetFrame(), niftiHeaderFromIFT(), and upetReadImagedata().
| int iftGetFrom | ( | IFT * | ift, |
| int | si, | ||
| const char * | key, | ||
| int | verbose ) |
Finds the specified key in the IFT, starting from specified index. Key is case insensitive.
| ift | Pointer to existing IFT. |
| si | Index [0..keyNr-1] from which the search is started. |
| key | Pointer to the key string; search is case-insensitive. |
| verbose | Verbose level; if zero, then only warnings are printed into stderr. |
Definition at line 156 of file iftsrch.c.
Referenced by hrrtMakeCalHdr(), and interfileIsHeader().
| int iftGetFullmatchFrom | ( | IFT * | ift, |
| int | si, | ||
| const char * | key, | ||
| const char * | value, | ||
| int | verbose ) |
Finds the index with specified key and value in the IFT, starting from specified index. Key and value are case insensitive.
| ift | Pointer to existing IFT. |
| si | Index [0..keyNr-1] from which the search is started. |
| key | Pointer to the key string; search is case-insensitive. |
| value | Pointer to the value string; search is case-insensitive. |
| verbose | Verbose level; if zero, then only warnings are printed into stderr. |
Definition at line 191 of file iftsrch.c.
Referenced by imgReadMicropetFrame(), and upetReadImagedata().
| int iftGetIntValue | ( | IFT * | ift, |
| int | si, | ||
| const char * | key, | ||
| int * | value, | ||
| int | verbose ) |
Finds the specified key string from IFT structure, and reads the corresponding value as int.
| ift | Pointer to existing IFT. |
| si | Index [0..keyNr-1] from which the search is started. |
| key | Pointer to the key string; search is case-insensitive. |
| value | Pointer to int variable where value is written; -9999 is written in case of an error. |
| verbose | Verbose level; if zero, then only warnings are printed into stderr. |
Definition at line 309 of file iftsrch.c.
Referenced by hrrtMakeCalHdr(), imgGetMicropetHeader(), niftiHeaderFromIFT(), and upetReadImagedata().
| int iftGetKeyNr | ( | IFT * | ift, |
| const char * | key, | ||
| int | verbose ) |
Find the nr of occurrences of the specified key in the IFT. Key is case insensitive.
| ift | Pointer to existing IFT |
| key | Pointer to the key string |
| verbose | Verbose level; if zero, then only warnings are printed into stderr |
Definition at line 350 of file iftsrch.c.
| int iftGetNth | ( | IFT * | ift, |
| char * | key, | ||
| int | n, | ||
| int | verbose ) |
Find the Nth key with similar name in the IFT and return the index [0..keyNr-1]. Key is case insensitive.
| ift | pointer to IFT structure. |
| key | Pointer to the key string; contents are replaced by the correct key string. |
| n | Nth (1..) incidence of key is searched. |
| verbose | Verbose level; if zero, then only warnings are printed into stderr. |
Definition at line 48 of file iftsrch.c.
Referenced by dft_fill_hdr_from_IFT(), and tsvRead().