|
TPCCLIB
|
Concentration and time unit functions. More...
#include "tpcclibConfig.h"#include "tpcextensions.h"#include <stdio.h>#include <stdlib.h>#include <string.h>#include <strings.h>#include <ctype.h>#include <math.h>#include <time.h>Go to the source code of this file.
Functions | |
| char * | unitName (int unit_code) |
| int | unitIdentify (const char *s) |
| int | unitIdentifyFilename (const char *s) |
| int | unitIsDistance (int u) |
| int | unitIsTime (int u) |
| int | unitIsVolume (int u) |
| int | unitIsMass (int u) |
| int | unitIsMole (int u) |
| int | unitIsRadioactivity (int u) |
| int | unitIsCombinatorial (int u) |
| double | unitConversionFactor (const int u1, const int u2) |
| int | unitInverse (int u) |
| int | unitDividerHasVolume (int u) |
| int | unitDividerHasMass (int u) |
| int | unitDividendHasRadioactivity (int u) |
| int | unitIsRAConc (int u) |
| int | unitCombination (const int u1, const int u2, const int v1, const int v2) |
| int | unitDividerMassVolumeConversion (int u) |
| int | unitMultiply (int ua, int ub) |
Concentration and time unit functions.
Definition in file units.c.
| int unitCombination | ( | const int | u1, |
| const int | u2, | ||
| const int | v1, | ||
| const int | v2 ) |
Check whether the combination of units is an identifiable combinatorial unit.
| u1 | Unit #1 of dividend |
| u2 | Unit #2 of dividend |
| v1 | Unit #1 of divider |
| v2 | Unit #2 of divider |
Definition at line 745 of file units.c.
Referenced by unitDividerMassVolumeConversion(), and unitMultiply().
| double unitConversionFactor | ( | const int | u1, |
| const int | u2 ) |
Calculates conversion factor between specified two units, if possible.
Multiply value with factor to get the value in unit2.
| u1 | Enum unit 1. |
| u2 | Enum unit 2. |
Definition at line 487 of file units.c.
Referenced by imgXUnitConvert(), parReadCSV(), tacDecayCorrection(), tacFittime(), tacXMatch(), tacXUnitConvert(), tacYUnitConvert(), and unitConversionFactor().
| int unitDividendHasRadioactivity | ( | int | u | ) |
Check whether the unit has radioactivity in the dividend.
| u | Enum unit |
Definition at line 710 of file units.c.
Referenced by unitIsRAConc().
| int unitDividerHasMass | ( | int | u | ) |
Check whether the unit has mass in divider.
| u | Enum unit |
Definition at line 694 of file units.c.
Referenced by tacYUnitMass2Volume(), unitDividerMassVolumeConversion(), and unitIsRAConc().
| int unitDividerHasVolume | ( | int | u | ) |
Check whether the unit has volume in divider.
| u | Enum unit |
Definition at line 678 of file units.c.
Referenced by tacYUnitVolume2Mass(), unitDividerMassVolumeConversion(), and unitIsRAConc().
| int unitDividerMassVolumeConversion | ( | int | u | ) |
Convert unit that has either volume or mass unit in divider to corresponding unit (assuming density of 1 g/mL) with either mass or volume in divider.
| u | Unit (enum) |
Definition at line 775 of file units.c.
Referenced by tacYUnitMass2Volume(), and tacYUnitVolume2Mass().
| int unitIdentify | ( | const char * | s | ) |
Identify the unit based on string representation s of the unit.
| s | Unit as a string. |
Definition at line 162 of file units.c.
Referenced by doubleGetWithUnit(), floatGetWithUnit(), iftGetDoubleWithUnit(), imgGetNiftiHeader(), imgReadDICOM(), mfCreateTAC(), parFromIFT(), parReadCSV(), parReadFIT(), parReadRES(), parWriteCSV(), tacAllocateWithPAR(), tacGetHeaderTimeunit(), tacGetHeaderUnit(), tacRead4DM(), tacReadCarimasTxt(), tacReadCSV(), tacReadDFT(), tacReadHRRTHC(), tacReadInveonCSV(), and tacReadPMOD().
| int unitIdentifyFilename | ( | const char * | s | ) |
Identify calibration unit based on file name.
| s | File name. |
Definition at line 311 of file units.c.
Referenced by tacRead().
| int unitInverse | ( | int | u | ) |
| int unitIsCombinatorial | ( | int | u | ) |
Check whether the unit is a combinatorial unit.
| u | Enum unit |
Definition at line 468 of file units.c.
Referenced by unitConversionFactor(), unitDividendHasRadioactivity(), unitDividerHasMass(), unitDividerHasVolume(), and unitIsRAConc().
| int unitIsDistance | ( | int | u | ) |
Check whether the unit is a unit of distance.
| u | Enum unit. |
Definition at line 339 of file units.c.
Referenced by tacWriteDFT(), and unitConversionFactor().
| int unitIsMass | ( | int | u | ) |
Check whether the unit is a unit of mass.
| u | Enum unit. |
Definition at line 402 of file units.c.
Referenced by unitConversionFactor(), unitDividerHasMass(), unitDividerMassVolumeConversion(), and unitIsRAConc().
| int unitIsMole | ( | int | u | ) |
Check whether the unit is a unit of chemical mass.
| u | Enum unit. |
Definition at line 423 of file units.c.
Referenced by unitConversionFactor().
| int unitIsRAConc | ( | int | u | ) |
Check whether the unit is a known unit of radioactivity per mass or volume.
| u | Enum unit |
Definition at line 726 of file units.c.
Referenced by tacSetWeights().
| int unitIsRadioactivity | ( | int | u | ) |
Check whether the unit is a unit of radioactivity.
| u | Enum unit |
Definition at line 444 of file units.c.
Referenced by tacSetWeights(), unitConversionFactor(), unitDividendHasRadioactivity(), and unitIsRAConc().
| int unitIsTime | ( | int | u | ) |
Check whether the unit is a unit of time.
| u | Enum unit. |
Definition at line 359 of file units.c.
Referenced by bfm1TCM(), parWriteCSV(), tacDecayCorrection(), tacPlotFitSVG(), tacPlotLineSVG(), tacSetWeights(), and unitConversionFactor().
| int unitIsVolume | ( | int | u | ) |
Check whether the unit is a unit of volume.
| u | Enum unit. |
Definition at line 382 of file units.c.
Referenced by unitConversionFactor(), unitDividerHasVolume(), unitDividerMassVolumeConversion(), and unitIsRAConc().
| int unitMultiply | ( | int | ua, |
| int | ub ) |
Multiply two units.
| ua | Unit A |
| ub | Unit B |
Definition at line 809 of file units.c.
| char * unitName | ( | int | unit_code | ) |
Get the string representation of the unit specified with its unit_code.
| unit_code | unit_code as enum or the index of unit in the table. |
Definition at line 143 of file units.c.
Referenced by imgCompareUnit(), imgContents(), imgFillOHeader(), imgReadDICOM(), imgSetNiftiHeader(), parAllocateWithTAC(), parCompareParameterUnits(), parExamplePerfectBolus(), parExampleRadiowaterBolus(), parExampleTTACs(), parToIFT(), parWriteCSV(), parWriteRES(), parWriteXML(), tacCompareUnit(), tacPlotFitSVG(), tacPlotLineSVG(), tacRead(), tacRead4DM(), tacSetHeaderTimeunit(), tacSetHeaderUnit(), tacWriteCSV(), tacWriteDFT(), tacWritePMOD(), tacWriteSheetIntoXML(), tacWriteSimple(), tacWriteXML(), tacXUnitConvert(), tacYUnitConvert(), and unitMultiply().