TPCCLIB
Loading...
Searching...
No Matches
tpctac.h
Go to the documentation of this file.
1
7#ifndef _TPCTAC_H_
8#define _TPCTAC_H_
9/*****************************************************************************/
10
11/*****************************************************************************/
12#include "tpcclibConfig.h"
13/*****************************************************************************/
14#include <stdio.h>
15#include <stdlib.h>
16#include <string.h>
17#include <math.h>
18/*****************************************************************************/
19//#include "tpcextensions.h"
20#include "tpccsv.h"
21#include "tpcift.h"
22#include "tpcisotope.h"
23/*****************************************************************************/
24
25/*****************************************************************************/
60/*****************************************************************************/
61
62/*****************************************************************************/
66typedef struct TACC {
71 double size;
75 double *y;
77 char sw;
79 char sw2;
82} TACC;
83/*****************************************************************************/
87typedef struct TAC {
91 int tacNr;
97 double *x;
99 double *x1;
101 double *x2;
105 int cunit;
109 int tunit;
111 double *w;
126 double *_data;
142} TAC;
143/*****************************************************************************/
144
145/*****************************************************************************/
149typedef struct MTAC {
153 int nr;
155 int _nr;
156} MTAC;
157/*****************************************************************************/
158
159/*****************************************************************************/
160/* tac */
161extern void tacInit(TAC *tac);
162extern void taccInit(TACC *tacc);
163extern void tacFree(TAC *tac);
164extern void tacFreeExceptHeader(TAC *tac);
165extern void taccFree(TACC *tacc);
166extern int tacAllocate(TAC *tac, int sampleNr, int tacNr);
167extern int tacAllocateMore(TAC *tac, int tacNr);
168extern int tacCopyTacc(TACC *d1, TACC *d2, int sampleNr);
169extern int tacCopyTaccdata(TACC *d1, TACC *d2, int sampleNr);
170extern int tacCopyTacchdr(TACC *d1, TACC *d2);
171extern int tacCopyHdr(TAC *tac1, TAC *tac2);
172extern int tacIsSize(TAC *d);
173extern int tacDuplicate(TAC *tac1, TAC *tac2);
174extern int tacExtract(TAC *d1, TAC *d2, const int i);
175extern int tacAllocateMoreSamples(TAC *tac, int addNr);
176/*****************************************************************************/
177
178/*****************************************************************************/
179/* mtac */
180extern void mtacInit(MTAC *mtac);
181extern void mtacFree(MTAC *mtac);
182extern int mtacAllocate(MTAC *mtac, int nr);
183extern int mtacAllocateMore(MTAC *mtac, int nr);
184extern int mtacAddTAC(MTAC *mtac, TAC *tac);
185/*****************************************************************************/
186
187/*****************************************************************************/
188/* tacio */
189extern char *tacFormattxt(tacformat c);
190extern int tacFormatIdentify(const char *s);
191extern char *tacDefaultExtension(tacformat c);
192extern int tacFormatDetermine(const char *fname, TPCSTATUS *status);
193extern int tacFormatWriteSupported(tacformat format);
194extern int tacWrite(TAC *tac, FILE *fp, tacformat format, int extra, TPCSTATUS *status);
195extern int tacRead(TAC *d, const char *fname, TPCSTATUS *status);
196/*****************************************************************************/
197
198/*****************************************************************************/
199/* tacift */
200extern int tacGetHeaderStudynr(IFT *h, char *s, TPCSTATUS *status);
201extern int tacSetHeaderStudynr(IFT *h, const char *s);
202extern int tacGetHeaderUnit(TAC *tac, TPCSTATUS *status);
203extern int tacSetHeaderUnit(IFT *h, int u);
204extern int tacGetHeaderTimeunit(TAC *tac, TPCSTATUS *status);
205extern int tacSetHeaderTimeunit(IFT *h, int u);
206extern int tacGetHeaderIsotope(IFT *h, char *s, TPCSTATUS *status);
207extern int tacSetHeaderIsotope(IFT *h, const char *s);
208extern int tacGetHeaderScanstarttime(IFT *h, char *s, TPCSTATUS *status);
209extern int tacSetHeaderScanstarttime(IFT *h, const char *s);
210extern int tacGetHeaderInjectiontime(IFT *h, char *s, TPCSTATUS *status);
211extern int tacSetHeaderInjectiontime(IFT *h, const char *s);
214/*****************************************************************************/
215
216/*****************************************************************************/
217/* simpleio */
218extern int tacWriteSimple(TAC *tac, FILE *fp, int extra, TPCSTATUS *status);
219extern int tacReadSimple(TAC *tac, CSV *csv, IFT *hdr, TPCSTATUS *status);
220/*****************************************************************************/
221
222/*****************************************************************************/
223/* dftio */
224extern int tacNameSplit(
225 const char *rname, char *name1, char *name2, char *name3, unsigned int max_name_len
226);
227extern int tacWriteDFT(TAC *tac, FILE *fp, int extra, TPCSTATUS *status);
228extern int tacReadDFT(TAC *tac, CSV *csv, IFT *hdr, TPCSTATUS *status);
229/*****************************************************************************/
230
231/*****************************************************************************/
232/* sifio */
233extern int tacWriteSIF(TAC *tac, FILE *fp, int extra, TPCSTATUS *status);
234extern int tacReadSIF(TAC *tac, CSV *csv, IFT *hdr, TPCSTATUS *status);
235/*****************************************************************************/
236
237/*****************************************************************************/
238/* pmodio */
239extern int tacWritePMOD(TAC *tac, FILE *fp, int extra, TPCSTATUS *status);
240extern int tacReadPMOD(TAC *tac, CSV *csv, IFT *hdr, TPCSTATUS *status);
241/*****************************************************************************/
242
243/*****************************************************************************/
244/* qviewio */
245extern int tacReadQView(TAC *tac, CSV *csv, const int grouponly, TPCSTATUS *status);
246/*****************************************************************************/
247
248/*****************************************************************************/
249/* 4dmio */
250extern int tacRead4DM(TAC *tac, CSV *csv, TPCSTATUS *status);
251/*****************************************************************************/
252
253/*****************************************************************************/
254/* matio */
255extern int tacReadMat(TAC *tac, CSV *csv, TPCSTATUS *status);
256/*****************************************************************************/
257
258/*****************************************************************************/
259/* taccsv */
260extern int tacWriteCSV(TAC *tac, FILE *fp, int extra, tacformat format, TPCSTATUS *status);
261extern int tacReadCSV(TAC *tac, CSV *csv, IFT *hdr, TPCSTATUS *status);
262extern int tacReadInveonCSV(TAC *tac, CSV *csv, TPCSTATUS *status);
263extern int tacReadCarimasTxt(TAC *tac, CSV *csv, TPCSTATUS *status);
264/*****************************************************************************/
265
266/*****************************************************************************/
267/* hcio */
268extern int tacReadHRRTHC(TAC *tac, CSV *csv, TPCSTATUS *status);
269extern int tacReadHRPLUSHC(TAC *tac, CSV *csv, TPCSTATUS *status);
270/*****************************************************************************/
271
272/*****************************************************************************/
273/* tacnan */
274extern int tacXNaNs(TAC *tac);
275extern int tacYNaNs(TAC *tac, const int i);
276extern int tacNaNs(TAC *tac);
277extern int tacNotNaNs(TAC *tac, const int i);
278extern int tacFixNaNs(TAC *tac);
279extern int tacNthSample(TAC *tac, const int sn, const int i);
280/*****************************************************************************/
281
282/*****************************************************************************/
283/* tacselect */
284extern int tacSelectTACs(TAC *d, const char *region_name, int reset, TPCSTATUS *status);
285extern int tacSelectedTACs(TAC *d);
286extern int tacFirstSelected(TAC *d);
287extern int tacSelectBestReference(TAC *d);
288//int tacNameMatch(const char *tacname, const char *test_str, TPCSTATUS *status);
289/*****************************************************************************/
290
291/*****************************************************************************/
292/* tacorder */
293extern int tacVerifyTimeOrder(TAC *d, TPCSTATUS *status);
294extern int tacSortByTime(TAC *d, TPCSTATUS *status);
295extern int tacSortByConc(TAC *d, const int i, TPCSTATUS *status);
296extern int tacSortByName(TAC *d, TPCSTATUS *status);
297extern int tacSortByAUC(TAC *d, TPCSTATUS *status);
298extern int tacMoveTACC(TAC *d, int from, int to);
299extern int tacSwapTACCs(TAC *d, int i1, int i2);
300extern int tacDeleteTACC(TAC *d, int i);
301extern int tacMultipleSamples(TAC *d1, const int fixMode, TAC *d2, const int verbose);
302/*****************************************************************************/
303
304/*****************************************************************************/
305/* taccomp */
306extern int tacCompareUnit(TAC *d1, TAC *d2, TPCSTATUS *status);
307extern int tacCompareNames(TAC *d1, TAC *d2, const int i, TPCSTATUS *status);
308extern int tacCompareConc(
309 TAC *d1, TAC *d2, const int i, const double test_abs, const double test_rel,
310 TPCSTATUS *status
311);
312extern int tacCompareTimes(
313 TAC *d1, TAC *d2, const double test_abs, const double test_rel,
314 TPCSTATUS *status
315);
316extern int tacCompareWeights(
317 TAC *d1, TAC *d2, const double test_abs, const double test_rel,
318 TPCSTATUS *status
319);
320/*****************************************************************************/
321
322/*****************************************************************************/
323/* tacunits */
324extern int tacXUnitConvert(TAC *d, const int u, TPCSTATUS *status);
325extern int tacYUnitConvert(TAC *d, const int u, TPCSTATUS *status);
326extern int tacYUnitMass2Volume(TAC *tac, const double density, TPCSTATUS *status);
327extern int tacYUnitVolume2Mass(TAC *tac, const double density, TPCSTATUS *status);
328/*****************************************************************************/
329
330/*****************************************************************************/
331/* tacname */
332extern int tacIndividualNames(TAC *tac);
333extern void tacEnsureNames(TAC *tac);
334/*****************************************************************************/
335
336/*****************************************************************************/
337/* tacx */
338extern int tacXCopy(TAC *tac1, TAC *tac2, int i1, int i2);
339extern int tacCorrectFrameOverlap(TAC *d, TPCSTATUS *status);
340extern int tacXRange(TAC *d, double *xmin, double *xmax);
341extern int tacSampleXRange(TAC *d, double *xmin, double *xmax);
342extern int tacMinX(TAC *d);
343extern int tacIsX(TAC *d);
344extern int tacXMatch(TAC *d1, TAC *d2, const int verbose);
345extern int tacAddZeroSample(TAC *d, TPCSTATUS *status);
346extern int tacDeleteSample(TAC *d, int i);
347extern int tacDeleteMissingSamples(TAC *d);
348extern int tacExtractRange(TAC *d1, TAC *d2, double startT, double endT);
349extern int tacExtractSamples(TAC *d1, TAC *d2, int si, int ei);
350extern int tacCheckX1X2X(TAC *d);
351extern int tacSetX(TAC *d, TPCSTATUS *status);
352extern int tacGetSampleInterval(TAC *d, double ilimit, double *minfdur, double *maxfdur);
353extern int tacToBars(TAC *tac1, TAC *tac2);
354extern int tacFramesToSteps(TAC *inp, TAC *out, TPCSTATUS *status);
355extern int tacIsXContiguous(TAC *d);
356extern int tacSetXContiguous(TAC *d);
357/*****************************************************************************/
358
359/*****************************************************************************/
360/* tacy */
361extern int tacYRange(
362 TAC *d, int i, double *ymin, double *ymax,
363 int *smin, int *smax, int *imin, int *imax
364);
365extern int tacYRangeInXRange(
366 TAC *d, int i, const double xmin, const double xmax,
367 double *ymin, double *ymax, int *smin, int *smax, int *imin, int *imax
368);
369/*****************************************************************************/
370
371/*****************************************************************************/
372/* tacw */
373extern int tacIsWeighted(TAC *tac);
374extern int tacWCopy(TAC *tac1, TAC *tac2, int i1, int i2);
375extern int tacWMove(TAC *tac, int ow, TPCSTATUS *status);
376extern int tacWByFreq(TAC *tac, isotope isot, TPCSTATUS *status);
377extern unsigned int tacWSampleNr(TAC *tac);
378extern int tacWeightNorm(TAC *tac, TPCSTATUS *status);
379extern int tacWeightModerate(
380 TAC *tac, const double minprop, const int doZeroes, const int doNaNs, TPCSTATUS *status
381);
382extern int sifWeight(TAC *sif, isotope isot, TPCSTATUS *status);
383extern int tacSetWeights(TAC *tac, weights weightMethod, int weightNr, TPCSTATUS *status);
384/*****************************************************************************/
385
386/*****************************************************************************/
387/* tacdc */
388extern int tacGetIsotope(TAC *tac);
389extern void tacSetIsotope(TAC *tac, int isotope);
390extern int tacDecayCorrection(TAC *tac, int isotope, int mode, TPCSTATUS *status);
391/*****************************************************************************/
392
393/*****************************************************************************/
394/* tacabss */
395extern int tacReadAllogg(TAC *tac, IFT *hdr, TPCSTATUS *status);
396extern int tacReadOldAllogg(TAC *tac, IFT *hdr, TPCSTATUS *status);
397extern int tacReadScanditronics(TAC *tac, IFT *hdr, TPCSTATUS *status);
398extern int tacReadGEMS(TAC *tac, IFT *hdr, TPCSTATUS *status);
399/*****************************************************************************/
400
401/*****************************************************************************/
402/* tacxmlio */
403extern int tacWriteXML(TAC *tac, FILE *fp, TPCSTATUS *status);
404/*****************************************************************************/
405
406/*****************************************************************************/
407#endif /* TPCTAC */
Definition tpccsv.h:36
Definition tpcift.h:43
Definition tpctac.h:149
TAC * tac
Definition tpctac.h:151
int _nr
Definition tpctac.h:155
int nr
Definition tpctac.h:153
Definition tpctac.h:66
tactype type
Definition tpctac.h:69
char sw
Definition tpctac.h:77
char name[MAX_TACNAME_LEN+1]
Definition tpctac.h:81
unit sunit
Definition tpctac.h:73
double * y
Definition tpctac.h:75
char sw2
Definition tpctac.h:79
double size
Definition tpctac.h:71
Definition tpctac.h:87
double * x
Definition tpctac.h:97
tacformat format
Definition tpctac.h:93
int _sampleNr
Definition tpctac.h:121
double * _data
Definition tpctac.h:126
int sampleNr
Definition tpctac.h:89
IFT h
Optional (but often useful) header information.
Definition tpctac.h:141
double * w
Definition tpctac.h:111
int cunit
Definition tpctac.h:105
int isframe
Definition tpctac.h:95
TACC * c
Definition tpctac.h:117
weights weighting
Definition tpctac.h:115
int tunit
Definition tpctac.h:109
double * x2
Definition tpctac.h:101
int _tacNr
Definition tpctac.h:119
double * x1
Definition tpctac.h:99
int tacNr
Definition tpctac.h:91
Header file for library libtpccsv.
weights
Is data weighted, or are weight factors available with data?
#define MAX_TACNAME_LEN
Max length of TAC ID name (not including trailing zero)
unit
tactype
TAC content types.
Header file for library libtpcift.
Header file for library libtpcisotope.
decaycorrection
Definition tpcisotope.h:78
isotope
Definition tpcisotope.h:50
int tacSortByTime(TAC *d, TPCSTATUS *status)
Definition tacorder.c:74
int tacReadScanditronics(TAC *tac, IFT *hdr, TPCSTATUS *status)
Definition tacabss.c:326
int tacReadInveonCSV(TAC *tac, CSV *csv, TPCSTATUS *status)
Definition taccsv.c:405
int tacYUnitConvert(TAC *d, const int u, TPCSTATUS *status)
Definition tacunits.c:72
int tacYUnitMass2Volume(TAC *tac, const double density, TPCSTATUS *status)
Definition tacunits.c:169
int mtacAllocateMore(MTAC *mtac, int nr)
Definition mtac.c:83
int tacExtract(TAC *d1, TAC *d2, const int i)
Extract the specified TAC from existing TAC structure into a new TAC.
Definition tac.c:396
int tacNaNs(TAC *tac)
Definition tacnan.c:71
int tacWriteSIF(TAC *tac, FILE *fp, int extra, TPCSTATUS *status)
Definition sifio.c:26
int tacReadCSV(TAC *tac, CSV *csv, IFT *hdr, TPCSTATUS *status)
Definition taccsv.c:212
int tacGetHeaderUnit(TAC *tac, TPCSTATUS *status)
Definition tacift.c:145
int tacWriteDFT(TAC *tac, FILE *fp, int extra, TPCSTATUS *status)
Definition dftio.c:119
decaycorrection tacGetHeaderDecayCorrection(IFT *h)
Definition tacift.c:548
int tacFormatDetermine(const char *fname, TPCSTATUS *status)
Definition tacio.c:161
void tacFreeExceptHeader(TAC *tac)
Definition tac.c:84
int tacSetWeights(TAC *tac, weights weightMethod, int weightNr, TPCSTATUS *status)
Definition tacw.c:462
int tacWriteXML(TAC *tac, FILE *fp, TPCSTATUS *status)
Definition tacxmlio.c:26
int tacReadGEMS(TAC *tac, IFT *hdr, TPCSTATUS *status)
Definition tacabss.c:516
int tacYRangeInXRange(TAC *d, int i, const double xmin, const double xmax, double *ymin, double *ymax, int *smin, int *smax, int *imin, int *imax)
Get the range of y values (concentrations) in TAC struct, including only samples with x (times) insid...
Definition tacy.c:99
int tacWMove(TAC *tac, int ow, TPCSTATUS *status)
Definition tacw.c:75
int tacReadQView(TAC *tac, CSV *csv, const int grouponly, TPCSTATUS *status)
Definition qviewio.c:27
int tacSetHeaderDecayCorrection(IFT *h, decaycorrection dc)
Definition tacift.c:578
int tacReadHRPLUSHC(TAC *tac, CSV *csv, TPCSTATUS *status)
Definition hcio.c:114
void tacFree(TAC *tac)
Definition tac.c:106
int tacFormatWriteSupported(tacformat format)
Definition tacio.c:291
int tacReadMat(TAC *tac, CSV *csv, TPCSTATUS *status)
Definition matio.c:25
int tacReadDFT(TAC *tac, CSV *csv, IFT *hdr, TPCSTATUS *status)
Definition dftio.c:300
int sifWeight(TAC *sif, isotope isot, TPCSTATUS *status)
Definition tacw.c:363
int tacSampleXRange(TAC *d, double *xmin, double *xmax)
Get the range of x values (times) in TAC structure.
Definition tacx.c:162
void taccFree(TACC *tacc)
Definition tac.c:68
int tacYNaNs(TAC *tac, const int i)
Definition tacnan.c:47
int tacXMatch(TAC *d1, TAC *d2, const int verbose)
Check whether sample (frame) times are the same (or very close to) in two TAC structures.
Definition tacx.c:249
void tacEnsureNames(TAC *tac)
Definition tacname.c:50
int tacSelectedTACs(TAC *d)
Definition tacselect.c:103
int tacSortByConc(TAC *d, const int i, TPCSTATUS *status)
Definition tacorder.c:122
int tacDuplicate(TAC *tac1, TAC *tac2)
Make a duplicate of TAC structure.
Definition tac.c:356
int tacSetHeaderScanstarttime(IFT *h, const char *s)
Definition tacift.c:427
int tacIsWeighted(TAC *tac)
Definition tacw.c:24
int tacGetHeaderTimeunit(TAC *tac, TPCSTATUS *status)
Definition tacift.c:234
int tacGetIsotope(TAC *tac)
Definition tacdc.c:25
int tacSortByAUC(TAC *d, TPCSTATUS *status)
Definition tacorder.c:205
int tacGetHeaderScanstarttime(IFT *h, char *s, TPCSTATUS *status)
Definition tacift.c:372
int tacNthSample(TAC *tac, const int sn, const int i)
Definition tacnan.c:173
int tacDeleteMissingSamples(TAC *d)
Delete those samples (time frames) from TAC structure, which contain only missing y values,...
Definition tacx.c:450
int tacIsSize(TAC *d)
Definition tac.c:335
int tacReadAllogg(TAC *tac, IFT *hdr, TPCSTATUS *status)
Definition tacabss.c:26
int tacDecayCorrection(TAC *tac, int isotope, int mode, TPCSTATUS *status)
Definition tacdc.c:59
int tacSelectTACs(TAC *d, const char *region_name, int reset, TPCSTATUS *status)
Definition tacselect.c:24
int tacWeightModerate(TAC *tac, const double minprop, const int doZeroes, const int doNaNs, TPCSTATUS *status)
Definition tacw.c:277
int tacWeightNorm(TAC *tac, TPCSTATUS *status)
Definition tacw.c:237
int tacIsXContiguous(TAC *d)
Check that PET TAC frame times are contiguous, without even tiny overlap or gaps in between.
Definition tacx.c:1130
int tacFirstSelected(TAC *d)
Definition tacselect.c:122
char * tacDefaultExtension(tacformat c)
Definition tacio.c:144
int tacAllocate(TAC *tac, int sampleNr, int tacNr)
Definition tac.c:130
int tacIndividualNames(TAC *tac)
Definition tacname.c:24
int mtacAllocate(MTAC *mtac, int nr)
Definition mtac.c:56
int tacReadOldAllogg(TAC *tac, IFT *hdr, TPCSTATUS *status)
Definition tacabss.c:173
void tacInit(TAC *tac)
Definition tac.c:24
int tacReadPMOD(TAC *tac, CSV *csv, IFT *hdr, TPCSTATUS *status)
Definition pmodio.c:146
int tacSortByName(TAC *d, TPCSTATUS *status)
Definition tacorder.c:178
int tacGetHeaderStudynr(IFT *h, char *s, TPCSTATUS *status)
Definition tacift.c:26
int tacGetHeaderInjectiontime(IFT *h, char *s, TPCSTATUS *status)
Definition tacift.c:462
int tacCompareWeights(TAC *d1, TAC *d2, const double test_abs, const double test_rel, TPCSTATUS *status)
Definition taccomp.c:289
int tacMinX(TAC *d)
Get the minimum x value in TAC structure.
Definition tacx.c:201
int tacRead(TAC *d, const char *fname, TPCSTATUS *status)
Definition tacio.c:413
int tacCompareNames(TAC *d1, TAC *d2, const int i, TPCSTATUS *status)
Definition taccomp.c:67
int tacXUnitConvert(TAC *d, const int u, TPCSTATUS *status)
Definition tacunits.c:23
int tacNotNaNs(TAC *tac, const int i)
Definition tacnan.c:84
int tacXNaNs(TAC *tac)
Definition tacnan.c:23
int tacCopyTaccdata(TACC *d1, TACC *d2, int sampleNr)
Definition tac.c:260
int tacCorrectFrameOverlap(TAC *d, TPCSTATUS *status)
Correct PET frame start and end times if frames are slightly overlapping or have small gaps in betwee...
Definition tacx.c:65
int tacFramesToSteps(TAC *inp, TAC *out, TPCSTATUS *status)
Transform TAC with frames into TAC with frames represented with stepwise changing dot-to-dot data.
Definition tacx.c:942
void tacSetIsotope(TAC *tac, int isotope)
Definition tacdc.c:41
int tacAllocateMoreSamples(TAC *tac, int addNr)
Allocate memory for more samples in TAC data.
Definition tac.c:435
int tacAddZeroSample(TAC *d, TPCSTATUS *status)
Add an initial sample to TAC(s) with zero time and concentration.
Definition tacx.c:366
int tacReadSimple(TAC *tac, CSV *csv, IFT *hdr, TPCSTATUS *status)
Definition simpleio.c:97
int tacExtractSamples(TAC *d1, TAC *d2, int si, int ei)
Extract the specified sample range from TAC structure.
Definition tacx.c:568
int tacToBars(TAC *tac1, TAC *tac2)
Transform TAC data with frame start and end times into suitable form for plotting with frames as bars...
Definition tacx.c:888
int tacDeleteSample(TAC *d, int i)
Delete a certain sample (time frame) from TAC structure.
Definition tacx.c:426
int tacWriteSimple(TAC *tac, FILE *fp, int extra, TPCSTATUS *status)
Definition simpleio.c:26
int tacGetSampleInterval(TAC *d, double ilimit, double *minfdur, double *maxfdur)
Get the shortest and longest sampling intervals or frame lengths in TAC structure.
Definition tacx.c:832
int tacRead4DM(TAC *tac, CSV *csv, TPCSTATUS *status)
Definition 4dmio.c:26
int tacDeleteTACC(TAC *d, int i)
Definition tacorder.c:310
int tacXCopy(TAC *tac1, TAC *tac2, int i1, int i2)
Definition tacx.c:24
tacformat
Definition tpctac.h:27
@ TAC_FORMAT_IF
Hammersmith input file format.
Definition tpctac.h:40
@ TAC_FORMAT_IFT
Interfile-type data (supported for writing)
Definition tpctac.h:31
@ TAC_FORMAT_4DM
4DM TAC format (reading supported)
Definition tpctac.h:50
@ TAC_FORMAT_CPT
CPT format.
Definition tpctac.h:38
@ TAC_FORMAT_UNKNOWN
Unknown format.
Definition tpctac.h:28
@ TAC_FORMAT_CSV_INT
International CSV.
Definition tpctac.h:34
@ TAC_FORMAT_ABSS_ALLOGG
ALLOGG ABSS data; reading supported.
Definition tpctac.h:56
@ TAC_FORMAT_MAT
Matlab matrix TAC format (reading supported)
Definition tpctac.h:49
@ TAC_FORMAT_ABSS_GEMS
GEMS ABSS data; reading supported.
Definition tpctac.h:54
@ TAC_FORMAT_HTML
HTML table format (supported for writing)
Definition tpctac.h:42
@ TAC_FORMAT_TSV_UK
UK TSV (point as decimal separator)
Definition tpctac.h:37
@ TAC_FORMAT_TSV_INT
International TSV (comma as decimal separator)
Definition tpctac.h:36
@ TAC_FORMAT_IDWC
Hammersmith tissue file format.
Definition tpctac.h:39
@ TAC_FORMAT_XML
XML format (supported for writing)
Definition tpctac.h:41
@ TAC_FORMAT_PMOD
PMOD TAC format.
Definition tpctac.h:33
@ TAC_FORMAT_QVIEW
QView CSV TAC format (reading supported)
Definition tpctac.h:48
@ TAC_FORMAT_SIMPLE
x and y's with space delimiters
Definition tpctac.h:29
@ TAC_FORMAT_ABSS_ALLOGG_OLD
ALLOGG ABSS data (old format); reading supported.
Definition tpctac.h:55
@ TAC_FORMAT_CARIMAS_TXT
Carimas txt format (reading supported)
Definition tpctac.h:47
@ TAC_FORMAT_HRPLUS_HC
HR+ head curve format (reading supported)
Definition tpctac.h:52
@ TAC_FORMAT_DFT
Data format of Turku PET Centre.
Definition tpctac.h:30
@ TAC_FORMAT_AMIDE
Amide format (reading supported)
Definition tpctac.h:46
@ TAC_FORMAT_HRRT_HC
HRRT head curve format (reading supported)
Definition tpctac.h:51
@ TAC_FORMAT_ABSS_SCANDITRONICS
Scanditronics ABSS data; reading supported.
Definition tpctac.h:53
@ TAC_FORMAT_CSV_UK
UK CSV.
Definition tpctac.h:35
@ TAC_FORMAT_BINARY
Binary format (currently not supported)
Definition tpctac.h:57
@ TAC_FORMAT_SIF
Scan information file.
Definition tpctac.h:43
@ TAC_FORMAT_XELERIS
Xeleris format (reading supported)
Definition tpctac.h:44
@ TAC_FORMAT_INVEON
Inveon format (reading supported)
Definition tpctac.h:45
@ TAC_FORMAT_NCI
Old Turku PET Centre format.
Definition tpctac.h:32
int tacWriteCSV(TAC *tac, FILE *fp, int extra, tacformat format, TPCSTATUS *status)
Definition taccsv.c:26
int tacSetHeaderTimeunit(IFT *h, int u)
Definition tacift.c:201
int tacFixNaNs(TAC *tac)
Definition tacnan.c:121
int tacFormatIdentify(const char *s)
Definition tacio.c:113
int tacExtractRange(TAC *d1, TAC *d2, double startT, double endT)
Extract the specified time (x) range from TAC structure.
Definition tacx.c:486
int tacSetHeaderIsotope(IFT *h, const char *s)
Definition tacift.c:341
int tacYRange(TAC *d, int i, double *ymin, double *ymax, int *smin, int *smax, int *imin, int *imax)
Get the range of y values (concentrations) in TAC struct.
Definition tacy.c:26
int tacSetX(TAC *d, TPCSTATUS *status)
Set TAC x values based on x1 and x2 values, or guess x1 and x2 values based on x values.
Definition tacx.c:653
int tacAllocateMore(TAC *tac, int tacNr)
Definition tac.c:178
int tacVerifyTimeOrder(TAC *d, TPCSTATUS *status)
Definition tacorder.c:25
int tacGetHeaderIsotope(IFT *h, char *s, TPCSTATUS *status)
Definition tacift.c:290
char * tacFormattxt(tacformat c)
Definition tacio.c:98
int tacSwapTACCs(TAC *d, int i1, int i2)
Definition tacorder.c:282
int tacIsX(TAC *d)
Verify if TAC structure contains reasonable x values (times).
Definition tacx.c:226
unsigned int tacWSampleNr(TAC *tac)
Definition tacw.c:219
int tacSetXContiguous(TAC *d)
Set PET TAC frame times contiguous, without even tiny overlap or gaps in between.
Definition tacx.c:1166
int tacReadHRRTHC(TAC *tac, CSV *csv, TPCSTATUS *status)
Definition hcio.c:25
int tacNameSplit(const char *rname, char *name1, char *name2, char *name3, unsigned int max_name_len)
Definition dftio.c:26
int tacSetHeaderStudynr(IFT *h, const char *s)
Definition tacift.c:79
int tacCopyTacc(TACC *d1, TACC *d2, int sampleNr)
Definition tac.c:233
int tacSelectBestReference(TAC *d)
Definition tacselect.c:139
int tacReadSIF(TAC *tac, CSV *csv, IFT *hdr, TPCSTATUS *status)
Definition sifio.c:129
int tacWCopy(TAC *tac1, TAC *tac2, int i1, int i2)
Definition tacw.c:41
int tacCopyTacchdr(TACC *d1, TACC *d2)
Definition tac.c:282
int mtacAddTAC(MTAC *mtac, TAC *tac)
Definition mtac.c:121
int tacCompareTimes(TAC *d1, TAC *d2, const double test_abs, const double test_rel, TPCSTATUS *status)
Definition taccomp.c:201
int tacXRange(TAC *d, double *xmin, double *xmax)
Get the range of x values (times) in TAC structure.
Definition tacx.c:124
void mtacFree(MTAC *mtac)
Definition mtac.c:38
int tacCopyHdr(TAC *tac1, TAC *tac2)
Copy TAC header data from tac1 to tac2.
Definition tac.c:310
int tacMultipleSamples(TAC *d1, const int fixMode, TAC *d2, const int verbose)
Check TAC data for multiple samples with the same sample time. Optionally replace the multiple sample...
Definition tacorder.c:336
int tacWritePMOD(TAC *tac, FILE *fp, int extra, TPCSTATUS *status)
Definition pmodio.c:26
int tacSetHeaderInjectiontime(IFT *h, const char *s)
Definition tacift.c:515
void taccInit(TACC *tacc)
Definition tac.c:48
int tacSetHeaderUnit(IFT *h, int u)
Definition tacift.c:112
int tacCompareConc(TAC *d1, TAC *d2, const int i, const double test_abs, const double test_rel, TPCSTATUS *status)
Definition taccomp.c:122
int tacWrite(TAC *tac, FILE *fp, tacformat format, int extra, TPCSTATUS *status)
Definition tacio.c:332
int tacReadCarimasTxt(TAC *tac, CSV *csv, TPCSTATUS *status)
Definition taccsv.c:631
void mtacInit(MTAC *mtac)
Definition mtac.c:23
int tacYUnitVolume2Mass(TAC *tac, const double density, TPCSTATUS *status)
Definition tacunits.c:121
int tacCompareUnit(TAC *d1, TAC *d2, TPCSTATUS *status)
Definition taccomp.c:27
int tacWByFreq(TAC *tac, isotope isot, TPCSTATUS *status)
Definition tacw.c:134
int tacMoveTACC(TAC *d, int from, int to)
Definition tacorder.c:250
int tacCheckX1X2X(TAC *d)
Check that sample (time frame) x, x1, and x2 values are reasonably set when compared to each other in...
Definition tacx.c:621