6#include "tpcclibConfig.h"
35 int verbose=0;
if(status!=NULL) verbose=status->
verbose;
41 if(verbose>0) printf(
"%s()\n", __func__);
92 if(i<0) i=
iftFindKey(h,
"study_number", start);
93 if(i<0) i=
iftFindKey(h,
"study number", start);
102 return (
iftPut(h,
"studynr", s, (
char)1, NULL));
124 if(i<0) i=
iftFindKey(h,
"calibration_unit", start);
125 if(i<0) i=
iftFindKey(h,
"activity_units", start);
126 if(i<0) i=
iftFindKey(h,
"activity units", start);
151 int verbose=0;
if(status!=NULL) verbose=status->
verbose;
156 if(verbose>0) printf(
"%s()\n", __func__);
162 if(i<0) i=
iftFindKey(&tac->
h,
"calibration_unit", 0);
163 if(i<0) i=
iftFindKey(&tac->
h,
"activity_units", 0);
164 if(i<0) i=
iftFindKey(&tac->
h,
"activity units", 0);
240 int verbose=0;
if(status!=NULL) verbose=status->
verbose;
245 if(verbose>0) printf(
"%s()\n", __func__);
299 int verbose=0;
if(status!=NULL) verbose=status->
verbose;
305 if(verbose>0) printf(
"%s()\n", __func__);
362 return (
iftPut(h,
"isotope", s, (
char)1, NULL));
381 int verbose=0;
if(status!=NULL) verbose=status->
verbose;
387 if(verbose>0) printf(
"%s()\n", __func__);
392 if(i<0) i=
iftFindKey(h,
"scan start time", 0);
440 if(i<0) i=
iftFindKey(h,
"scan start time", start);
452 return (
iftPut(h,
"scan_start_time", s, (
char)1, NULL));
471 int verbose=0;
if(status!=NULL) verbose=status->
verbose;
477 if(verbose>0) printf(
"%s()\n", __func__);
528 if(i<0) i=
iftFindKey(h,
"injection time", start);
529 if(i<0) i=
iftFindKey(h,
"injectiontime", start);
538 return (
iftPut(h,
"injection_time", s, (
char)1, NULL));
557 if(i<0) i=
iftFindKey(h,
"decay correction", 0);
590 if(i<0) i=
iftFindKey(h,
"decay correction", start);
597 return (
iftPut(h,
"decay_correction",
"yes", (
char)1, NULL));
599 return (
iftPut(h,
"decay_correction",
"no", (
char)1, NULL));
int iftPut(IFT *ift, const char *key, const char *value, char comment, TPCSTATUS *status)
int iftDelete(IFT *ift, int index)
int iftFindKey(IFT *ift, const char *key, int start_index)
void statusSet(TPCSTATUS *s, const char *func, const char *srcfile, int srcline, tpcerror error)
size_t strlcpy(char *dst, const char *src, size_t dstsize)
IFT h
Optional (but often useful) header information.
int verbose
Verbose level, used by statusPrint() etc.
int tacGetHeaderUnit(TAC *tac, TPCSTATUS *status)
decaycorrection tacGetHeaderDecayCorrection(IFT *h)
int tacSetHeaderDecayCorrection(IFT *h, decaycorrection dc)
int tacSetHeaderScanstarttime(IFT *h, const char *s)
int tacGetHeaderTimeunit(TAC *tac, TPCSTATUS *status)
int tacGetHeaderScanstarttime(IFT *h, char *s, TPCSTATUS *status)
int tacGetHeaderStudynr(IFT *h, char *s, TPCSTATUS *status)
int tacGetHeaderInjectiontime(IFT *h, char *s, TPCSTATUS *status)
int tacSetHeaderTimeunit(IFT *h, int u)
int tacSetHeaderIsotope(IFT *h, const char *s)
int tacGetHeaderIsotope(IFT *h, char *s, TPCSTATUS *status)
int tacSetHeaderStudynr(IFT *h, const char *s)
int tacSetHeaderInjectiontime(IFT *h, const char *s)
int tacSetHeaderUnit(IFT *h, int u)
@ UNIT_UNKNOWN
Unknown unit.
@ TPCERROR_INVALID_VALUE
Invalid value.
@ TPCERROR_NO_VALUE
Value not found.
@ TPCERROR_FAIL
General error.
@ TPCERROR_NO_KEY
Key not found.
@ TPCERROR_NO_DATA
File contains no data.
int unitIdentify(const char *s)
char * unitName(int unit_code)
#define MAX_STUDYNR_LEN
Define max study number length.
Header file for library libtpcift.
Header file for library libtpcisotope.
#define MAX_ISOTOPE_LEN
Max string length for PET isotope.
@ DECAY_UNKNOWN
Not known; usually assumed that data is corrected.
@ DECAY_NOTCORRECTED
Data is not corrected for physical decay.
@ DECAY_CORRECTED
Data is corrected for physical decay.
Header file for library libtpctac.