12#include "tpcclibConfig.h"
225 const char *rname,
char *name1,
char *name2,
char *name3,
unsigned int max_name_len
309 TAC *d1,
TAC *d2,
const int i,
const double test_abs,
const double test_rel,
313 TAC *d1,
TAC *d2,
const double test_abs,
const double test_rel,
317 TAC *d1,
TAC *d2,
const double test_abs,
const double test_rel,
340extern int tacXRange(
TAC *d,
double *xmin,
double *xmax);
362 TAC *d,
int i,
double *ymin,
double *ymax,
363 int *smin,
int *smax,
int *imin,
int *imax
366 TAC *d,
int i,
const double xmin,
const double xmax,
367 double *ymin,
double *ymax,
int *smin,
int *smax,
int *imin,
int *imax
380 TAC *tac,
const double minprop,
const int doZeroes,
const int doNaNs,
TPCSTATUS *status
char name[MAX_TACNAME_LEN+1]
IFT h
Optional (but often useful) header information.
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)
tactype
TAC content types.
Header file for library libtpcift.
Header file for library libtpcisotope.
int tacSortByTime(TAC *d, TPCSTATUS *status)
int tacReadScanditronics(TAC *tac, IFT *hdr, TPCSTATUS *status)
int tacReadInveonCSV(TAC *tac, CSV *csv, TPCSTATUS *status)
int tacYUnitConvert(TAC *d, const int u, TPCSTATUS *status)
int tacYUnitMass2Volume(TAC *tac, const double density, TPCSTATUS *status)
int mtacAllocateMore(MTAC *mtac, int nr)
int tacExtract(TAC *d1, TAC *d2, const int i)
Extract the specified TAC from existing TAC structure into a new TAC.
int tacWriteSIF(TAC *tac, FILE *fp, int extra, TPCSTATUS *status)
int tacReadCSV(TAC *tac, CSV *csv, IFT *hdr, TPCSTATUS *status)
int tacGetHeaderUnit(TAC *tac, TPCSTATUS *status)
int tacWriteDFT(TAC *tac, FILE *fp, int extra, TPCSTATUS *status)
decaycorrection tacGetHeaderDecayCorrection(IFT *h)
int tacFormatDetermine(const char *fname, TPCSTATUS *status)
void tacFreeExceptHeader(TAC *tac)
int tacSetWeights(TAC *tac, weights weightMethod, int weightNr, TPCSTATUS *status)
int tacWriteXML(TAC *tac, FILE *fp, TPCSTATUS *status)
int tacReadGEMS(TAC *tac, IFT *hdr, TPCSTATUS *status)
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...
int tacWMove(TAC *tac, int ow, TPCSTATUS *status)
int tacReadQView(TAC *tac, CSV *csv, const int grouponly, TPCSTATUS *status)
int tacSetHeaderDecayCorrection(IFT *h, decaycorrection dc)
int tacReadHRPLUSHC(TAC *tac, CSV *csv, TPCSTATUS *status)
int tacFormatWriteSupported(tacformat format)
int tacReadMat(TAC *tac, CSV *csv, TPCSTATUS *status)
int tacReadDFT(TAC *tac, CSV *csv, IFT *hdr, TPCSTATUS *status)
int sifWeight(TAC *sif, isotope isot, TPCSTATUS *status)
int tacSampleXRange(TAC *d, double *xmin, double *xmax)
Get the range of x values (times) in TAC structure.
void taccFree(TACC *tacc)
int tacYNaNs(TAC *tac, const int i)
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.
void tacEnsureNames(TAC *tac)
int tacSelectedTACs(TAC *d)
int tacSortByConc(TAC *d, const int i, TPCSTATUS *status)
int tacDuplicate(TAC *tac1, TAC *tac2)
Make a duplicate of TAC structure.
int tacSetHeaderScanstarttime(IFT *h, const char *s)
int tacIsWeighted(TAC *tac)
int tacGetHeaderTimeunit(TAC *tac, TPCSTATUS *status)
int tacGetIsotope(TAC *tac)
int tacSortByAUC(TAC *d, TPCSTATUS *status)
int tacGetHeaderScanstarttime(IFT *h, char *s, TPCSTATUS *status)
int tacNthSample(TAC *tac, const int sn, const int i)
int tacDeleteMissingSamples(TAC *d)
Delete those samples (time frames) from TAC structure, which contain only missing y values,...
int tacReadAllogg(TAC *tac, IFT *hdr, TPCSTATUS *status)
int tacDecayCorrection(TAC *tac, int isotope, int mode, TPCSTATUS *status)
int tacSelectTACs(TAC *d, const char *region_name, int reset, TPCSTATUS *status)
int tacWeightModerate(TAC *tac, const double minprop, const int doZeroes, const int doNaNs, TPCSTATUS *status)
int tacWeightNorm(TAC *tac, TPCSTATUS *status)
int tacIsXContiguous(TAC *d)
Check that PET TAC frame times are contiguous, without even tiny overlap or gaps in between.
int tacFirstSelected(TAC *d)
char * tacDefaultExtension(tacformat c)
int tacAllocate(TAC *tac, int sampleNr, int tacNr)
int tacIndividualNames(TAC *tac)
int mtacAllocate(MTAC *mtac, int nr)
int tacReadOldAllogg(TAC *tac, IFT *hdr, TPCSTATUS *status)
int tacReadPMOD(TAC *tac, CSV *csv, IFT *hdr, TPCSTATUS *status)
int tacSortByName(TAC *d, TPCSTATUS *status)
int tacGetHeaderStudynr(IFT *h, char *s, TPCSTATUS *status)
int tacGetHeaderInjectiontime(IFT *h, char *s, TPCSTATUS *status)
int tacCompareWeights(TAC *d1, TAC *d2, const double test_abs, const double test_rel, TPCSTATUS *status)
int tacMinX(TAC *d)
Get the minimum x value in TAC structure.
int tacRead(TAC *d, const char *fname, TPCSTATUS *status)
int tacCompareNames(TAC *d1, TAC *d2, const int i, TPCSTATUS *status)
int tacXUnitConvert(TAC *d, const int u, TPCSTATUS *status)
int tacNotNaNs(TAC *tac, const int i)
int tacCopyTaccdata(TACC *d1, TACC *d2, int sampleNr)
int tacCorrectFrameOverlap(TAC *d, TPCSTATUS *status)
Correct PET frame start and end times if frames are slightly overlapping or have small gaps in betwee...
int tacFramesToSteps(TAC *inp, TAC *out, TPCSTATUS *status)
Transform TAC with frames into TAC with frames represented with stepwise changing dot-to-dot data.
void tacSetIsotope(TAC *tac, int isotope)
int tacAllocateMoreSamples(TAC *tac, int addNr)
Allocate memory for more samples in TAC data.
int tacAddZeroSample(TAC *d, TPCSTATUS *status)
Add an initial sample to TAC(s) with zero time and concentration.
int tacReadSimple(TAC *tac, CSV *csv, IFT *hdr, TPCSTATUS *status)
int tacExtractSamples(TAC *d1, TAC *d2, int si, int ei)
Extract the specified sample range from TAC structure.
int tacToBars(TAC *tac1, TAC *tac2)
Transform TAC data with frame start and end times into suitable form for plotting with frames as bars...
int tacDeleteSample(TAC *d, int i)
Delete a certain sample (time frame) from TAC structure.
int tacWriteSimple(TAC *tac, FILE *fp, int extra, TPCSTATUS *status)
int tacGetSampleInterval(TAC *d, double ilimit, double *minfdur, double *maxfdur)
Get the shortest and longest sampling intervals or frame lengths in TAC structure.
int tacRead4DM(TAC *tac, CSV *csv, TPCSTATUS *status)
int tacDeleteTACC(TAC *d, int i)
int tacXCopy(TAC *tac1, TAC *tac2, int i1, int i2)
@ TAC_FORMAT_IF
Hammersmith input file format.
@ TAC_FORMAT_IFT
Interfile-type data (supported for writing)
@ TAC_FORMAT_4DM
4DM TAC format (reading supported)
@ TAC_FORMAT_CPT
CPT format.
@ TAC_FORMAT_UNKNOWN
Unknown format.
@ TAC_FORMAT_CSV_INT
International CSV.
@ TAC_FORMAT_ABSS_ALLOGG
ALLOGG ABSS data; reading supported.
@ TAC_FORMAT_MAT
Matlab matrix TAC format (reading supported)
@ TAC_FORMAT_ABSS_GEMS
GEMS ABSS data; reading supported.
@ TAC_FORMAT_HTML
HTML table format (supported for writing)
@ TAC_FORMAT_TSV_UK
UK TSV (point as decimal separator)
@ TAC_FORMAT_TSV_INT
International TSV (comma as decimal separator)
@ TAC_FORMAT_IDWC
Hammersmith tissue file format.
@ TAC_FORMAT_XML
XML format (supported for writing)
@ TAC_FORMAT_PMOD
PMOD TAC format.
@ TAC_FORMAT_QVIEW
QView CSV TAC format (reading supported)
@ TAC_FORMAT_SIMPLE
x and y's with space delimiters
@ TAC_FORMAT_ABSS_ALLOGG_OLD
ALLOGG ABSS data (old format); reading supported.
@ TAC_FORMAT_CARIMAS_TXT
Carimas txt format (reading supported)
@ TAC_FORMAT_HRPLUS_HC
HR+ head curve format (reading supported)
@ TAC_FORMAT_DFT
Data format of Turku PET Centre.
@ TAC_FORMAT_AMIDE
Amide format (reading supported)
@ TAC_FORMAT_HRRT_HC
HRRT head curve format (reading supported)
@ TAC_FORMAT_ABSS_SCANDITRONICS
Scanditronics ABSS data; reading supported.
@ TAC_FORMAT_CSV_UK
UK CSV.
@ TAC_FORMAT_BINARY
Binary format (currently not supported)
@ TAC_FORMAT_SIF
Scan information file.
@ TAC_FORMAT_XELERIS
Xeleris format (reading supported)
@ TAC_FORMAT_INVEON
Inveon format (reading supported)
@ TAC_FORMAT_NCI
Old Turku PET Centre format.
int tacWriteCSV(TAC *tac, FILE *fp, int extra, tacformat format, TPCSTATUS *status)
int tacSetHeaderTimeunit(IFT *h, int u)
int tacFormatIdentify(const char *s)
int tacExtractRange(TAC *d1, TAC *d2, double startT, double endT)
Extract the specified time (x) range from TAC structure.
int tacSetHeaderIsotope(IFT *h, const char *s)
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.
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.
int tacAllocateMore(TAC *tac, int tacNr)
int tacVerifyTimeOrder(TAC *d, TPCSTATUS *status)
int tacGetHeaderIsotope(IFT *h, char *s, TPCSTATUS *status)
char * tacFormattxt(tacformat c)
int tacSwapTACCs(TAC *d, int i1, int i2)
int tacIsX(TAC *d)
Verify if TAC structure contains reasonable x values (times).
unsigned int tacWSampleNr(TAC *tac)
int tacSetXContiguous(TAC *d)
Set PET TAC frame times contiguous, without even tiny overlap or gaps in between.
int tacReadHRRTHC(TAC *tac, CSV *csv, TPCSTATUS *status)
int tacNameSplit(const char *rname, char *name1, char *name2, char *name3, unsigned int max_name_len)
int tacSetHeaderStudynr(IFT *h, const char *s)
int tacCopyTacc(TACC *d1, TACC *d2, int sampleNr)
int tacSelectBestReference(TAC *d)
int tacReadSIF(TAC *tac, CSV *csv, IFT *hdr, TPCSTATUS *status)
int tacWCopy(TAC *tac1, TAC *tac2, int i1, int i2)
int tacCopyTacchdr(TACC *d1, TACC *d2)
int mtacAddTAC(MTAC *mtac, TAC *tac)
int tacCompareTimes(TAC *d1, TAC *d2, const double test_abs, const double test_rel, TPCSTATUS *status)
int tacXRange(TAC *d, double *xmin, double *xmax)
Get the range of x values (times) in TAC structure.
void mtacFree(MTAC *mtac)
int tacCopyHdr(TAC *tac1, TAC *tac2)
Copy TAC header data from tac1 to tac2.
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...
int tacWritePMOD(TAC *tac, FILE *fp, int extra, TPCSTATUS *status)
int tacSetHeaderInjectiontime(IFT *h, const char *s)
void taccInit(TACC *tacc)
int tacSetHeaderUnit(IFT *h, int u)
int tacCompareConc(TAC *d1, TAC *d2, const int i, const double test_abs, const double test_rel, TPCSTATUS *status)
int tacWrite(TAC *tac, FILE *fp, tacformat format, int extra, TPCSTATUS *status)
int tacReadCarimasTxt(TAC *tac, CSV *csv, TPCSTATUS *status)
void mtacInit(MTAC *mtac)
int tacYUnitVolume2Mass(TAC *tac, const double density, TPCSTATUS *status)
int tacCompareUnit(TAC *d1, TAC *d2, TPCSTATUS *status)
int tacWByFreq(TAC *tac, isotope isot, TPCSTATUS *status)
int tacMoveTACC(TAC *d, int from, int to)
int tacCheckX1X2X(TAC *d)
Check that sample (time frame) x, x1, and x2 values are reasonably set when compared to each other in...