TPCCLIB
|
TAC structure processing. More...
#include "tpcclibConfig.h"
#include "tpcift.h"
#include "tpcisotope.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <string.h>
#include "tpctac.h"
Go to the source code of this file.
Functions | |
void | tacInit (TAC *tac) |
void | taccInit (TACC *tacc) |
void | taccFree (TACC *tacc) |
void | tacFreeExceptHeader (TAC *tac) |
void | tacFree (TAC *tac) |
int | tacAllocate (TAC *tac, int sampleNr, int tacNr) |
int | tacAllocateMore (TAC *tac, int tacNr) |
int | tacCopyTacc (TACC *d1, TACC *d2, int sampleNr) |
int | tacCopyTaccdata (TACC *d1, TACC *d2, int sampleNr) |
int | tacCopyTacchdr (TACC *d1, TACC *d2) |
int | tacCopyHdr (TAC *tac1, TAC *tac2) |
Copy TAC header data from tac1 to tac2. | |
int | tacIsSize (TAC *d) |
int | tacDuplicate (TAC *tac1, TAC *tac2) |
Make a duplicate of TAC structure. | |
int | tacExtract (TAC *d1, TAC *d2, const int i) |
Extract the specified TAC from existing TAC structure into a new TAC. | |
int | tacAllocateMoreSamples (TAC *tac, int addNr) |
Allocate memory for more samples in TAC data. | |
int tacAllocate | ( | TAC * | tac, |
int | sampleNr, | ||
int | tacNr ) |
Allocate memory for TAC data (and set data pointers inside the structure). Any previous contents are deleted. Contents are set to NaN.
tac | Pointer to initiated TAC structure data; any old contents are deleted. tacNr and sampleNr inside the structure are set to or kept at zero. |
sampleNr | Nr of samples to allocate. |
tacNr | Nr of concentration arrays (regional TACs) to allocate. |
Definition at line 130 of file tac.c.
Referenced by bfm1TCM(), bfmSRTM(), imgToSIF(), tacAllocateMoreSamples(), tacAllocateWithPAR(), tacDuplicate(), tacExtract(), tacExtractRange(), tacExtractSamples(), tacInterpolate(), tacInterpolateToEqualLengthFrames(), tacMultipleSamples(), tacRead4DM(), tacReadAllogg(), tacReadCarimasTxt(), tacReadCSV(), tacReadDFT(), tacReadGEMS(), tacReadHRPLUSHC(), tacReadHRRTHC(), tacReadInveonCSV(), tacReadMat(), tacReadOldAllogg(), tacReadPMOD(), tacReadQView(), tacReadScanditronics(), tacReadSIF(), tacReadSimple(), and tacSetWeights().
int tacAllocateMore | ( | TAC * | tac, |
int | tacNr ) |
Allocate memory for more TACs in TAC data (and set data pointers inside the structure).
Previous contents are not changed. New contents are set to NaN.
tac | Pointer to initiated and previously allocated TAC structure data; any old contents are preserved, including tacNr. |
tacNr | Nr of additional concentration arrays (regional TACs) to allocate; if structure contains unused space for requested TACs already, then nothing is done. |
Definition at line 178 of file tac.c.
Referenced by imgToSIF(), tacInterpolateInto(), tacReadReference(), and tacSetX().
int tacAllocateMoreSamples | ( | TAC * | tac, |
int | addNr ) |
Allocate memory for more samples in TAC data.
Previous contents are not changed. _sampleNr is increased by nr_to_add, but sampleNr is not changed, and the contents of the new last frame(s) are empty (NaN).
tac | Pointer to initiated and previously allocated TAC structure data; any old contents are preserved, including tacNr and sampleNr. |
addNr | Nr of samples to add; if TAC structure contains unused space for requested samples already, then nothing is done. |
Definition at line 435 of file tac.c.
Referenced by imgToSIF(), tacAddZeroSample(), tacFramesToSteps(), tacInput2sim(), tacSetXContiguous(), and tacToBars().
void taccFree | ( | TACC * | tacc | ) |
Free memory allocated for TACC data. All contents are destroyed.
tacc | Pointer to TACC |
Definition at line 68 of file tac.c.
Referenced by tacFree(), and tacFreeExceptHeader().
void taccInit | ( | TACC * | tacc | ) |
Initiate the TACC structure before any use.
tacc | Pointer to TACC |
Definition at line 48 of file tac.c.
Referenced by tacAllocate(), tacAllocateMore(), and taccFree().
Copy TAC header data from tac1 to tac2.
Information regarding data size or weighting is not copied. IFT contents are copied if available. Previous IFT contents are deleted.
Definition at line 310 of file tac.c.
Referenced by tacAllocateMoreSamples(), tacDuplicate(), tacExtract(), tacExtractRange(), tacExtractSamples(), tacInterpolate(), tacInterpolateToEqualLengthFrames(), and tacMultipleSamples().
Copy TACC contents (y data and its header) from tacc1 to tacc2.
These may be inside different TAC structures, therefore sampleNr is needed.
d1 | Pointer to source TACC structure. |
d2 | Pointer to target TACC structure. |
sampleNr | Sample (frame) number. |
Definition at line 233 of file tac.c.
Referenced by tacAllocateMoreSamples(), tacDuplicate(), tacExtract(), and tacReadReference().
Copy TACC y data from tacc1 to tacc2.
These may be inside different TAC structures, therefore sampleNr is needed.
d1 | Pointer to source TACC structure. |
d2 | Pointer to target TACC structure. |
sampleNr | Sample (frame) nr. |
Definition at line 260 of file tac.c.
Referenced by tacCopyTacc().
Copy TACC header data from tacc1 to tacc2.
d1 | Pointer to source TACVOI structure. |
d2 | Pointer to target TACVOI structure. |
Definition at line 282 of file tac.c.
Referenced by tacCopyTacc(), tacExtractRange(), tacExtractSamples(), tacInterpolate(), tacInterpolateInto(), tacInterpolateToEqualLengthFrames(), and tacMultipleSamples().
Make a duplicate of TAC structure.
In the duplicate, space is allocated only for the tacNr and sampleNr specified in the original TAC.
tac1 | Pointer to the source TAC. |
tac2 | Pointer to the target TAC; must be initiated; any old contents are deleted. |
Definition at line 356 of file tac.c.
Referenced by mtacAddTAC(), tacAllocateMoreSamples(), tacExtractRange(), tacExtractSamples(), tacFramesToSteps(), tacInput2sim(), tacIntegrate(), tacMultipleSamples(), tacReadReference(), tacSetX(), tacSetXContiguous(), and tacToBars().
Extract the specified TAC from existing TAC structure into a new TAC.
d1 | Pointer to the source TAC structure. Not modified. |
d2 | Pointer to the target TAC structure; any previous contents are deleted. |
i | Index of the TAC to extract [0..tacNr-1]. |
void tacFree | ( | TAC * | tac | ) |
Free memory allocated for TAC data. All contents are destroyed, including any header data.
tac | Pointer to TAC |
Definition at line 106 of file tac.c.
Referenced by bfm1TCM(), bfmSRTM(), imgReadNifti(), imgWriteNifti(), mtacFree(), tacAllocate(), tacAllocateMoreSamples(), tacAUC(), tacDelay(), tacDuplicate(), tacExtract(), tacExtractRange(), tacExtractSamples(), tacFramesToSteps(), tacInput2sim(), tacIntegrate(), tacInterpolate(), tacInterpolateToEqualLengthFrames(), tacMultipleSamples(), tacRead(), tacRead4DM(), tacReadAllogg(), tacReadCarimasTxt(), tacReadCSV(), tacReadDFT(), tacReadGEMS(), tacReadHRPLUSHC(), tacReadHRRTHC(), tacReadInveonCSV(), tacReadMat(), tacReadModelingData(), tacReadModelingInput(), tacReadOldAllogg(), tacReadPMOD(), tacReadQView(), tacReadReference(), tacReadScanditronics(), tacReadSIF(), tacReadSimple(), tacSetWeights(), tacSetX(), tacSetXContiguous(), and tacToBars().
void tacFreeExceptHeader | ( | TAC * | tac | ) |
Free memory allocated for TAC data. All contents are destroyed, except the header data in IFT structure.
tac | Pointer to TAC |
void tacInit | ( | TAC * | tac | ) |
Initiate the TAC structure before any use.
tac | Pointer to TAC |
Definition at line 24 of file tac.c.
Referenced by bfm1TCM(), imgReadNifti(), imgWriteNifti(), mtacAllocate(), mtacAllocateMore(), tacAllocateMoreSamples(), tacAUC(), tacDelay(), tacExtractRange(), tacFree(), tacFreeExceptHeader(), tacInput2sim(), tacMultipleSamples(), tacReadModelingData(), tacReadModelingInput(), tacReadReference(), tacSetWeights(), tacSetX(), and tacSetXContiguous().
int tacIsSize | ( | TAC * | d | ) |
Check if any of TAC sets has VOI size (volume).
d | Pointer to TAC structure. |
Definition at line 335 of file tac.c.
Referenced by tacWriteCSV().