API CPP
|
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <string>
Go to the source code of this file.
Functions | |
void | DPE_Construct () |
Construct DPE at the beginning of processing. | |
void | DPE_Destruct () |
Destruc DPE at the end of processing. | |
int | DPE_LoadParamFile (std::string FileParam_Path="./", std::string FileParam_Name="ParamFile.txt") |
int | DPE_SetClusterVarOrder (std::vector< std::string > ClusterVarNames={}) |
int | DPE_Init () |
int | DPE_Reset () |
int | DPE_ResetCurrDataStorage () |
int | DPE_ProcessClusters (std::vector< std::vector< double > > Clusters) |
int | DPE_ProcessFile (std::string FileIn_Path="", std::string FileIn_Name="", std::string FileIn_NameEnd="") |
int | DPE_RadFieldRecognition (std::string &Name, double &Prob) |
int | DPE_GetComCamTestProjection (std::vector< double > &Projection) |
int | DPE_GetComCamProjection (std::vector< double > &Projection) |
int | DPE_GetCurrentEnergyDep (double &EnergyDep) |
int | DPE_GetCurrentDose (double &Dose) |
int | DPE_GetCurrentDoseRate (double &DoseRate, double Time=0) |
int | DPE_GetCurrentCountParticle (double &CountParticle) |
int | DPE_GetCurrentCountRate (double &CountRate, double Time=0) |
int | DPE_GetCurrentFluence (double &Fluence) |
int | DPE_GetCurrentFlux (double &Flux, double Time=0) |
int | DPE_GetCurrentEnergyDepClass (std::vector< double > &EnergyDepClass) |
int | DPE_GetCurrentDoseClass (std::vector< double > &DoseClass) |
int | DPE_GetCurrentDoseRateClass (std::vector< double > &DoseRateClass, double Time=0) |
int | DPE_GetCurrentCountParticleClass (std::vector< double > &CountParticleClass) |
int | DPE_GetCurrentCountRateClass (std::vector< double > &CountRateClass, double Time=0) |
int | DPE_GetCurrentFluenceClass (std::vector< double > &FluenceClass) |
int | DPE_GetCurrentFluxClass (std::vector< double > &FluxClass, double Time=0) |
int | DPE_GetEnergyDep (double &EnergyDep) |
int | DPE_GetDose (double &Dose) |
int | DPE_GetDoseRate (double &DoseRate) |
int | DPE_GetCountParticle (double &CountParticle) |
int | DPE_GetCountRate (double &CountRate) |
int | DPE_GetFluence (double &Fluence) |
int | DPE_GetFlux (double &Flux) |
int | DPE_GetEnergyDepTime (std::vector< double > &EnergyDepTime) |
int | DPE_GetDoseTime (std::vector< double > &DoseTime) |
int | DPE_GetDoseRateTime (std::vector< double > &DoseRateTime) |
int | DPE_GetCountParticleTime (std::vector< double > &CountParticleTime) |
int | DPE_GetCountRateTime (std::vector< double > &CountRateTime) |
int | DPE_GetFluenceTime (std::vector< double > &FluenceTime) |
int | DPE_GetFluxTime (std::vector< double > &FluxTime) |
int | DPE_GetEnergyDepTimeClass (std::vector< std::vector< double > > &EnergyDepTimeClass) |
int | DPE_GetDoseTimeClass (std::vector< std::vector< double > > &DoseTimeClass) |
int | DPE_GetDoseRateTimeClass (std::vector< std::vector< double > > &DoseRateTimeClass) |
int | DPE_GetCountParticleTimeClass (std::vector< std::vector< double > > &CountParticleTimeClass) |
int | DPE_GetCountRateTimeClass (std::vector< std::vector< double > > &CountRateTimeClass) |
int | DPE_GetFluenceTimeClass (std::vector< std::vector< double > > &FluenceTimeClass) |
int | DPE_GetFluxTimeClass (std::vector< std::vector< double > > &FluxTimeClass) |
int | DPE_GetComCamProjectionNBins (int &ComCamProjNBinX, int &ComCamProjNBinY) |
int | DPE_GetComCamProjectionMaxVal (double &MaxVal) |
int | DPE_SetTimeSampling (double TimeSampling) |
int | DPE_SetTimeAcquisition (double TimeAcquisition) |
int | DPE_SetComCamProjectionDist (double ProjectionDist) |
API c++ for DPE (Data Processing Engine). Copyright (C) 2022 Lukas Marek
int DPE_GetComCamProjection | ( | std::vector< double > & | Projection | ) |
Retrieves projection results from Compton camera directional analysis.
Projection | is an image defined in config file of Compton cam. It includes back projection of Compton cones. |
int DPE_GetComCamProjectionMaxVal | ( | double & | MaxVal | ) |
Gets Compton camera maximum value in its projection.
ComCamProjNBinX | maximum value. |
int DPE_GetComCamProjectionNBins | ( | int & | ComCamProjNBinX, |
int & | ComCamProjNBinY | ||
) |
Gets Compton camera count of bins on X and Y axis for its projection.
ComCamProjNBinX | is count of bins on X axis. |
ComCamProjNBinY | is count of bins on Y axis. |
int DPE_GetComCamTestProjection | ( | std::vector< double > & | Projection | ) |
Retrieves test projection results from Compton camera directional analysis.
Projection | is an image defined in config file of Compton cam. It includes back projection of Compton cones. |
int DPE_GetCountParticle | ( | double & | CountParticle | ) |
Gets count of particles.
CountParticle | sum of count of particles is stored there. |
int DPE_GetCountParticleTime | ( | std::vector< double > & | CountParticleTime | ) |
Gets count of particles for time sample.
CountParticleTime | vector is over time samples (based on time sapling and elapsed time). Example: {TimeSample1, TimeSample2,...} |
int DPE_GetCountParticleTimeClass | ( | std::vector< std::vector< double > > & | CountParticleTimeClass | ) |
Gets count of particles for time sample and class.
CountParticleTimeClass | inner vector is over particle classes and the outer is over time samples (based on time sapling and elapsed time). Example: {TimeSample1={Class1, Class2, ...}, TimeSample2={Class1, Class2, ...},...} |
int DPE_GetCountRate | ( | double & | CountRate | ) |
Gets count of rate of particles for time sample.
CountRate | mean of count rate is stored there. |
int DPE_GetCountRateTime | ( | std::vector< double > & | CountRateTime | ) |
Gets count of rate of particles for time sample.
CountRateTime | vector is over time samples (based on time sapling and elapsed time). Example: {TimeSample1, TimeSample2,...} |
int DPE_GetCountRateTimeClass | ( | std::vector< std::vector< double > > & | CountRateTimeClass | ) |
Gets count of rate of particles for time sample and class.
CountRateTimeClass | inner vector is over particle classes and the outer is over time samples (based on time sapling and elapsed time). Example: {TimeSample1={Class1, Class2, ...}, TimeSample2={Class1, Class2, ...},...} |
int DPE_GetCurrentCountParticle | ( | double & | CountParticle | ) |
Gets current count of particles.
CountParticle | sum of count of particles is stored there. |
int DPE_GetCurrentCountParticleClass | ( | std::vector< double > & | CountParticleClass | ) |
Gets current count of particles for individual particle classes.
CountParticleClass | sum of count of particles for individual particle classes is stored there. |
int DPE_GetCurrentCountRate | ( | double & | CountRate, |
double | Time = 0 |
||
) |
Gets current count of rate of particles for time sample.
CountRate | mean of count rate is stored there. |
Time | used for calculation. |
int DPE_GetCurrentCountRateClass | ( | std::vector< double > & | CountRateClass, |
double | Time = 0 |
||
) |
Gets current count of rate of particles for time sample.
CountRateClass | mean of count rate for individual particle classes is stored there. |
Time | used for calculation for individual particle classes. |
int DPE_GetCurrentDose | ( | double & | Dose | ) |
Gets current dose.
Dose | sum of dose is stored there. |
int DPE_GetCurrentDoseClass | ( | std::vector< double > & | DoseClass | ) |
Gets current dose for individual particle classes.
DoseClass | sum of dose for individual particle classes is stored there. |
int DPE_GetCurrentDoseRate | ( | double & | DoseRate, |
double | Time = 0 |
||
) |
Gets current dose rate.
DoseRate | mean of dose rate is stored there. |
Time | used for calculation. |
int DPE_GetCurrentDoseRateClass | ( | std::vector< double > & | DoseRateClass, |
double | Time = 0 |
||
) |
Gets current dose rate for individual particle classes.
DoseRateClass | mean of dose rate for individual particle classes is stored there. |
Time | used for calculation. |
int DPE_GetCurrentEnergyDep | ( | double & | EnergyDep | ) |
Gets current deposited energy.
EnergyDep | sum of deposited energy is stored there. |
int DPE_GetCurrentEnergyDepClass | ( | std::vector< double > & | EnergyDepClass | ) |
Gets current deposited energy for individual particle classes.
EnergyDepClass | sum of deposited energy for individual particle classes is stored there. |
int DPE_GetCurrentFluence | ( | double & | Fluence | ) |
Gets current fluence.
Fluence | sum of fluence is stored there. |
int DPE_GetCurrentFluenceClass | ( | std::vector< double > & | FluenceClass | ) |
Gets current fluence for individual particle classes.
FluenceClass | sum of fluence for individual particle classes is stored there. |
int DPE_GetCurrentFlux | ( | double & | Flux, |
double | Time = 0 |
||
) |
Gets current flux.
Flux | sum of flux is stored there. |
Time | used for calculation. |
int DPE_GetCurrentFluxClass | ( | std::vector< double > & | FluxClass, |
double | Time = 0 |
||
) |
Gets current flux for individual particle classes.
FluxClass | sum of flux for individual particle classes is stored there. |
Time | used for calculation. |
int DPE_GetDose | ( | double & | Dose | ) |
Gets dose.
Dose | sum of dose is stored there. |
int DPE_GetDoseRate | ( | double & | DoseRate | ) |
Gets dose rate.
DoseRate | mean of dose rate is stored there. |
int DPE_GetDoseRateTime | ( | std::vector< double > & | DoseRateTime | ) |
Gets dose rate for time sample.
DoseRateTime | vector is over time samples (based on time sapling and elapsed time). Example: {TimeSample1, TimeSample2,...} |
int DPE_GetDoseRateTimeClass | ( | std::vector< std::vector< double > > & | DoseRateTimeClass | ) |
Gets dose rate for time sample and class.
DoseRateTimeClass | inner vector is over particle classes and the outer is over time samples (based on time sapling and elapsed time). Example: {TimeSample1={Class1, Class2, ...}, TimeSample2={Class1, Class2, ...},...} |
int DPE_GetDoseTime | ( | std::vector< double > & | DoseTime | ) |
Gets dose for time sample.
DoseTime | vector is over time samples (based on time sapling and elapsed time). Example: {TimeSample1, TimeSample2,...} |
int DPE_GetDoseTimeClass | ( | std::vector< std::vector< double > > & | DoseTimeClass | ) |
Gets dose for time sample and class.
DoseTimeClass | inner vector is over particle classes and the outer is over time samples (based on time sapling and elapsed time). Example: {TimeSample1={Class1, Class2, ...}, TimeSample2={Class1, Class2, ...},...} |
int DPE_GetEnergyDep | ( | double & | EnergyDep | ) |
Gets deposited energy.
EnergyDep | sum of deposited energy is stored there. |
int DPE_GetEnergyDepTime | ( | std::vector< double > & | EnergyDepTime | ) |
Gets deposited energy for time sample.
EnergyDepTime | vector is over time samples (based on time sapling and elapsed time). Example: {TimeSample1, TimeSample2,...} |
int DPE_GetEnergyDepTimeClass | ( | std::vector< std::vector< double > > & | EnergyDepTimeClass | ) |
Gets deposited energy for time sample and class.
EnergyDepTimeClass | inner vector is over particle classes and the outer is over time samples (based on time sapling and elapsed time). Example: {TimeSample1={Class1, Class2, ...}, TimeSample2={Class1, Class2, ...},...} |
int DPE_GetFluence | ( | double & | Fluence | ) |
Gets fluence.
Fluence | sum of fluence is stored there. |
int DPE_GetFluenceTime | ( | std::vector< double > & | FluenceTime | ) |
Gets fluence of particles for time sample.
FluenceTime | vector is over time samples (based on time sapling and elapsed time). Example: {TimeSample1, TimeSample2,...} |
int DPE_GetFluenceTimeClass | ( | std::vector< std::vector< double > > & | FluenceTimeClass | ) |
Gets fluence of particles for time sample and class.
FluenceTimeClass | inner vector is over particle classes and the outer is over time samples (based on time sapling and elapsed time). Example: {TimeSample1={Class1, Class2, ...}, TimeSample2={Class1, Class2, ...},...} |
int DPE_GetFlux | ( | double & | Flux | ) |
Gets flux.
Flux | vector sum of flux is stored there. |
int DPE_GetFluxTime | ( | std::vector< double > & | FluxTime | ) |
Gets flux for time sample.
FluxTime | vector is over time samples (based on time sapling and elapsed time). Example: {TimeSample1, TimeSample2,...} |
int DPE_GetFluxTimeClass | ( | std::vector< std::vector< double > > & | FluxTimeClass | ) |
Gets flux for time sample and class.
FluxTimeClass | inner vector is over particle classes and the outer is over time samples (based on time sapling and elapsed time). Example: {TimeSample1={Class1, Class2, ...}, TimeSample2={Class1, Class2, ...},...} |
int DPE_Init | ( | ) |
Init DPE after setting its parameters. It is mainly for modules initialization and propagation of parameters into them. Export directories are also created (if needed).
int DPE_LoadParamFile | ( | std::string | FileParam_Path = "./" , |
std::string | FileParam_Name = "ParamFile.txt" |
||
) |
Load file with parameters of DPE.
FileParam_Path | full path to file with parameters. |
FileParam_Name | name of file with parameters. |
int DPE_ProcessClusters | ( | std::vector< std::vector< double > > | Clusters | ) |
Process given clustersDPE_AddClusters. This includes also calculation of physical products as dose, flux etc. Clusters are after processing deleted from DPE to avoid several processing of the same data.
Clusters | vector of vectors with cluster variables which should be processed. Inner vectors include variables of clusters in order given by function DPE_SetClusterVarOrder. |
int DPE_ProcessFile | ( | std::string | FileIn_Path = "" , |
std::string | FileIn_Name = "" , |
||
std::string | FileIn_NameEnd = "" |
||
) |
Process data file. If input parameters are not set then the function uses values given in the parameters file (if loaded).
FileIn_Path | full path to the data file. |
FileIn_Name | name of the data file.d |
FileIn_NameEnd | name end (e.g. extension ".txt") of the data file. |
int DPE_RadFieldRecognition | ( | std::string & | Name, |
double & | Prob | ||
) |
Recognition of radiation field with distance comparator and significant vectors.
Name | of the recognized radiation field (e.g. Cs137). |
Prob | probability of recognition success. |
int DPE_Reset | ( | ) |
Reset DPE data storage and physical products (includes mainly reset of modules). Settings remains the same as set with the parameters file or individual sets.
int DPE_ResetCurrDataStorage | ( | ) |
Reset DPE current data storage (sets them to 0). The total and other storage are not influenced. If the storage should be reset between cluster processing then this function should be called between them (DPE_ProcessClusters(); DPE_ResetCurrDataStorage(); ;DPE_ProcessClusters();)
int DPE_SetClusterVarOrder | ( | std::vector< std::string > | ClusterVarNames = {} | ) |
Set order of cluster variable names as they will be given in the cluster add. It has to be used before init as part of DPE general setting or load of param. file.
ClusterVarNames | names of cluster variables in intended order for cluster add function. Names of cluster variables should be taken from macros (CLVAR_...) Example: ClusterVarNames = {CLVAR_DETECTOR_ID, CLVAR_EVENT_ID, CLVAR_SIZE}. If not used before init or empty vector given, default order is used as listed: CLVAR_DETECTOR_ID, CLVAR_EVENT_ID, CLVAR_X, CLVAR_Y, CLVAR_TIME, CLVAR_FLAGS, CLVAR_SIZE, CLVAR_ENERGY, CLVAR_HEIGHT, CLVAR_BORDER_PIX_N, CLVAR_ROUND, CLVAR_LIN, CLVAR_ANGLE, CLVAR_LENGHT, CLVAR_WIDTH. |
int DPE_SetComCamProjectionDist | ( | double | ProjectionDist | ) |
Sets Compton camera distance for projection.
ProjectionDist | in which projection is calculated. It is in mm. |
int DPE_SetTimeAcquisition | ( | double | TimeAcquisition | ) |
Sets time acquisition.
TimeAcquisition | acquisition time which is used for calculation of physical products. Default is set during processing based on given data. |
int DPE_SetTimeSampling | ( | double | TimeSampling | ) |
Sets time sampling.
TimeSampling | sampling time which defines a sample evaluation. Its unit is in seconds. Defaults value is 1 second. |