8 #include "oImageDimensionsAndQuantification.hh" 9 #include "vDataFile.hh" 113 for (
int bed=0; bed<
m_nbBeds; bed++)
146 if (a_flipOut==
"x" || a_flipOut==
"X")
152 else if (a_flipOut==
"y" || a_flipOut==
"Y")
158 else if (a_flipOut==
"z" || a_flipOut==
"Z")
164 else if (a_flipOut==
"xy" || a_flipOut==
"yx" || a_flipOut==
"XY" || a_flipOut==
"YX")
170 else if (a_flipOut==
"zy" || a_flipOut==
"yz" || a_flipOut==
"ZY" || a_flipOut==
"YZ")
176 else if (a_flipOut==
"xz" || a_flipOut==
"zx" || a_flipOut==
"XZ" || a_flipOut==
"ZX")
182 else if ( a_flipOut==
"xyz" || a_flipOut==
"xzy" || a_flipOut==
"yxz" || a_flipOut==
"yzx" || a_flipOut==
"zxy" || a_flipOut==
"zyx" ||
183 a_flipOut==
"XYZ" || a_flipOut==
"XZY" || a_flipOut==
"YXZ" || a_flipOut==
"YZX" || a_flipOut==
"ZXY" || a_flipOut==
"ZYX" )
192 Cerr(
"***** oImageDimensionsAndQuantification::SetFlipOut() -> Output flip settings is incorrect !" << endl);
212 size_t first_comma = a_nbThreads.find_first_of(
",");
213 size_t last_comma = a_nbThreads.find_last_of(
",");
214 if (first_comma!=last_comma || first_comma==0 || first_comma==a_nbThreads.length()-1)
216 Cerr(
"***** oImageDimensionsAndQuantification::SetNbThreads() -> Wrong syntax in the thread parameters ! See help." << endl);
221 if (first_comma==string::npos)
236 Cerr(
"***** oImageDimensionsAndQuantification::SetNbThreads() -> Negative number of threads provided for projection computation !" << endl);
239 if (m_nbThreadsForImageComputation<0)
241 Cerr(
"***** oImageDimensionsAndQuantification::SetNbThreads() -> Negative number of threads provided for image computation !" << endl);
248 if (m_nbThreadsForImageComputation==0) m_nbThreadsForImageComputation = omp_get_max_threads();
250 omp_set_num_threads(m_nbThreadsForImageComputation);
266 m_nbThreadsForImageComputation = 1;
285 Cerr(
"***** oImageDimensionsAndQuantification::CheckParameters() -> Should provide a strictly positive number of threads !" << endl);
292 Cerr(
"***** oImageDimensionsAndQuantification::CheckParameters() -> Should provide strictly positive number of voxels !" << endl);
298 Cerr(
"***** oImageDimensionsAndQuantification::CheckParameters() -> Should provide strictly positive voxel or FOV dimensions !" << endl);
304 Cerr(
"***** oImageDimensionsAndQuantification::CheckParameters() -> Both FOV and voxels dimensions provided, should not provide both !" << endl);
310 Cerr(
"***** oImageDimensionsAndQuantification::CheckParameters() -> Output transaxial FOV percentage must be strictly positive !" << endl);
314 if (m_nbSliceOutMask<0 || m_nbSliceOutMask>
m_nbVoxZ/2)
316 Cerr(
"***** oImageDimensionsAndQuantification::CheckParameters() -> Number of output axial slices to be masked is incorrectly set !" << endl);
322 Cerr(
"***** oImageDimensionsAndQuantification::CheckParameters() -> Error : DynamicDataManager object not initialized !" << endl);
341 Cerr(
"***** oImageDimensionsAndQuantification::Initialize() -> Cannot initialize before a call to CheckParameters() !" << endl);
346 if (
m_verbose>=2)
Cout(
"oImageDimensionsAndQuantification::Initialize() -> Initialize image dimensions, basis functions and quantification" << endl);
370 Cerr(
"***** oImageDimensionsAndQuantification::Initialize() -> A problem occurred while initializing framing and quantification tabs !" << endl);
399 Cerr(
"***** oImageDimensionsAndQuantification::Initialize() -> A problem occurred while initializing ignored corrections !" << endl);
426 else Cout(
" --> Number of parallel threads for projection / image computation: [" <<
m_nbThreadsForProjection <<
"/" << m_nbThreadsForImageComputation <<
"]" << endl);
445 for (
int bed=0; bed<
m_nbBeds; bed++)
452 Cerr(
"!!!!! oImageDimensionsAndQuantification::CheckNumberOfProjectionThreadsConsistencyWithDataFileSize() !!!!!" << endl);
453 Cerr(
" --> The number of projection threads was reduced to the provided datafile's number of events: " <<
m_nbThreadsForProjection << endl);
482 if (a2p_DataFile[0]->GetBedPositionFlag())
487 for (
int bed=0; bed<
m_nbBeds; bed++) center += a2p_DataFile[bed]->GetRelativeBedPosition();
488 center /= ((
FLTNB)m_nbBeds);
490 for (
int bed=0; bed<
m_nbBeds; bed++)
mp_bedPositions[bed] = a2p_DataFile[bed]->GetRelativeBedPosition() - center;
503 Cerr(
"***** oImageDimensionsAndQuantification::DealWithBedPositions() -> Bed displacement between two successive bed positions must be strictly positive !" << endl);
507 for (
int bed=0; bed<
m_nbBeds; bed++)
510 FLTNB bed_offset = 0.;
525 Cout(
"oImageDimensionsAndQuantification::DealWithBedPositions() -> Use following relative bed positions:" << endl);
526 for (
int bed=0; bed<
m_nbBeds; bed++)
Cout(
" --> Bed " << bed <<
" | Relative axial position: " <<
mp_bedPositions[bed] <<
" mm" << endl);
545 Cerr(
"***** oImageDimensionsAndQuantification::InitializeFramingAndQuantification() -> Number of beds must be set before setting the framing of the acquisition !" << endl);
555 for (
int bed=0; bed<
m_nbBeds; bed++)
569 for (
int bed=0; bed<
m_nbBeds; bed++)
591 bool frame_start_inMinutes =
false;
592 bool frame_duration_inMinutes =
false;
596 size_t comma_pos = 0;
597 size_t colon_pos = 0;
599 while ((comma_pos=frame_list.find_first_of(
","))!=string::npos)
605 frame_start_inMinutes =
false;
606 frame_duration_inMinutes =
false;
610 for (
int bed=0; bed<
m_nbBeds; bed++)
617 string param = frame_list.substr(0,comma_pos);
621 Cerr(
"***** oImageDimensionsAndQuantification::InitializeFramingAndQuantification() -> Null framing definition detected !" << endl);
625 if ((colon_pos = param.find_first_of(
":")) != string::npos)
628 string param_start = param.substr(0, colon_pos);
630 if ((unit_pos = param_start.find(
"s"))!= string::npos)
633 param_start.erase(unit_pos);
635 else if ((unit_pos = param_start.find(
"m"))!= string::npos)
638 param_start.erase(unit_pos);
639 frame_start_inMinutes =
true;
642 if (param_start.empty())
644 Cerr(
"***** oImageDimensionsAndQuantification::InitializeFramingAndQuantification() -> Null framing definition detected !" << endl);
648 string param_duration = param.substr(colon_pos + 1, comma_pos);
650 if ((unit_pos = param_duration.find(
"s"))!= string::npos)
652 param_duration.erase(unit_pos);
654 else if ((unit_pos = param_duration.find(
"m"))!= string::npos)
656 param_duration.erase(unit_pos);
657 frame_duration_inMinutes =
true;
660 if (param_duration.empty())
662 Cerr(
"***** oImageDimensionsAndQuantification::InitializeFramingAndQuantification() -> Null framing duration detected !" << endl);
666 frame_start = (
HPFLTNB) atof(param_start.c_str());
667 frame_duration = (
HPFLTNB) atof(param_duration.c_str());
669 if (frame_start_inMinutes) frame_start *= (
HPFLTNB)60.;
670 if (frame_duration_inMinutes) frame_duration *= (
HPFLTNB)60.;
672 if (frame_duration<=0.)
674 Cerr(
"***** oImageDimensionsAndQuantification::InitializeFramingAndQuantification() -> Negative or null frame duration detected !" << endl);
680 Cerr(
"***** oImageDimensionsAndQuantification::InitializeFramingAndQuantification() -> Negative or null frame start detected !" << endl);
684 for (
int bed=0; bed<
m_nbBeds; bed++)
694 if ((unit_pos = param.find(
"s"))!= string::npos)
697 param.erase(unit_pos);
699 else if ((unit_pos = param.find(
"m"))!= string::npos)
702 param.erase(unit_pos);
703 frame_start_inMinutes=
true;
708 Cerr(
"***** oImageDimensionsAndQuantification::InitializeFramingAndQuantification() -> Null framing definition detected !" << endl);
712 frame_start = (
HPFLTNB) atof(param.c_str());
714 if (frame_start_inMinutes) frame_start *= (
HPFLTNB)60.;
718 Cerr(
"***** oImageDimensionsAndQuantification::InitializeFramingAndQuantification() -> Negative or null frame start detected !" << endl);
722 for (
int bed=0; bed<
m_nbBeds; bed++)
730 frame_list = frame_list.substr(comma_pos+1);
740 frame_start_inMinutes =
false;
741 frame_duration_inMinutes =
false;
743 string param = frame_list;
744 if ((colon_pos = param.find_first_of(
":")) != string::npos)
749 for (
int bed=0; bed<
m_nbBeds; bed++)
756 string param_start = param.substr(0, colon_pos);
758 if ((unit_pos = param_start.find(
"s"))!= string::npos)
761 param_start.erase(unit_pos);
763 else if ((unit_pos = param_start.find(
"m"))!= string::npos)
766 param_start.erase(unit_pos);
767 frame_start_inMinutes =
true;
770 if (param_start.empty())
772 Cerr(
"***** oImageDimensionsAndQuantification::InitializeFramingAndQuantification() -> Null framing definition detected !" << endl);
776 string param_duration = param.substr(colon_pos + 1, param.size());
778 if ((unit_pos = param_duration.find(
"s"))!= string::npos)
780 param_duration.erase(unit_pos);
782 else if ((unit_pos = param_duration.find(
"m"))!= string::npos)
784 param_duration.erase(unit_pos);
785 frame_duration_inMinutes=
true;
788 if (param_duration.empty())
790 Cerr(
"***** oImageDimensionsAndQuantification::InitializeFramingAndQuantification() -> Null framing duration detected !" << endl);
794 frame_start = (
HPFLTNB) atof(param_start.c_str());
795 frame_duration = (
HPFLTNB) atof(param_duration.c_str());
797 if (frame_start_inMinutes) frame_start *= (
HPFLTNB)60.;
798 if (frame_duration_inMinutes) frame_duration *= (
HPFLTNB)60.;
800 if (frame_duration<=0.)
802 Cerr(
"***** oImageDimensionsAndQuantification::InitializeFramingAndQuantification() -> Found a duration which is negative or null !" << endl);
808 Cerr(
"***** oImageDimensionsAndQuantification::InitializeFramingAndQuantification() -> Negative or null frame start detected !" << endl);
812 for (
int bed=0; bed<
m_nbBeds; bed++)
822 Cerr(
"***** oImageDimensionsAndQuantification::InitializeFramingAndQuantification() -> Last frame duration has not been provided !" << endl);
833 for (
int bed=0; bed<
m_nbBeds; bed++)
844 for (
int bed=0; bed<
m_nbBeds; bed++)
861 Cerr(
"***** oImageDimensionsAndQuantification::InitializeFramingAndQuantification() -> Illegal frame overlap detected between frames: " << frmch+1 <<
" and "<< frm+1 << endl);
869 for (
int bed=0; bed<
m_nbBeds; bed++)
912 string *p_keywords =
new string[nb_keywords];
916 Cerr(
"***** oImageDimensionsAndQuantification::InitializeIgnoredCorrections() -> An error occurred while reading the list of ignored corrections !" << endl);
921 for (
size_t k=0; k<nb_keywords; k++)
934 Cerr(
"***** oImageDimensionsAndQuantification::InitializeIgnoredCorrections() -> Unknown keyword '" << p_keywords[k] <<
"' in the provided ignored corrections list !" << endl);
954 Cerr(
"***** oImageDimensionsAndQuantification::SetAcquisitionTime() -> Object not initialized !" << endl);
971 Cerr(
"***** oImageDimensionsAndQuantification::SetAcquisitionTime() -> Gate durations have been initialized in both the datafile header and the gating configuration file!" << endl);
972 Cerr(
"***** Only one must be used (preferably the gating configuration file) " << endl);
976 if(a_gateListDurationInSec !=
"")
982 "Gate duration (s)"))
984 Cerr(
"***** oImageDimensionsAndQuantification::SetAcquisitionTime() -> Failed to correctly read the following list of gate durations (datafile header): !" << endl);
985 Cerr(
"***** "<<a_gateListDurationInSec << endl);
986 Cerr(
"***** "<<
m_nbRespGates*m_nbCardGates<<
" parameters were expected (1 for each gate)" << endl);
1025 if (
m_verbose>=2 && (a_bed==m_nbBeds-1))
1028 if (m_nbTimeFrames==1 && m_nbBeds==1)
1030 Cout(
"oImageDimensionsAndQuantification::SetAcquisitionTime() -> Static single bed acquisition with duration [ " <<
GetFrameTimeStartInSec(0,0) <<
" : " 1034 else if (m_nbTimeFrames==1 && m_nbBeds>1)
1036 Cout(
"oImageDimensionsAndQuantification::SetAcquisitionTime() -> Static " << m_nbBeds <<
" beds acquisition with following bed durations:" << endl);
1037 for (
int bed=0; bed<
m_nbBeds; bed++)
1041 else if (m_nbTimeFrames>1 && m_nbBeds==1)
1043 Cout(
"oImageDimensionsAndQuantification::SetAcquisitionTime() -> Dynamic single bed acquisition with following " << m_nbTimeFrames <<
" frame durations:" << endl);
1050 Cout(
"oImageDimensionsAndQuantification::SetAcquisitionTime() -> Dynamic " << m_nbBeds <<
" beds acquistion with following " << m_nbTimeFrames <<
" frame durations:" << endl);
1051 for (
int bed=0; bed<
m_nbBeds; bed++)
1053 Cout(
" --> Bed " << bed+1 <<
" as following framing:" << endl);
1060 else Cout(
" --> Correct for frame duration" << endl);
1076 Cerr(
"***** oImageDimensionsAndQuantification::SetCalibrationFactor() -> Object not initialized !" << endl);
1083 if (
m_verbose>=2 && a_bed==m_nbBeds-1)
Cout(
"oImageDimensionsAndQuantification::SetCalibrationFactor() -> Ignore calibration factor correction" << endl);
1088 if (a_calibrationFactor<=0.)
1090 Cerr(
"***** oImageDimensionsAndQuantification::SetCalibrationFactor() -> Provided calibration factor (" << a_calibrationFactor <<
") is negative or null !" << endl);
1102 Cout(
"oImageDimensionsAndQuantification::SetCalibrationFactor() -> Correct for following calibration factor: " << a_calibrationFactor << endl);
1118 for (
int bed=0; bed<
m_nbBeds; bed++)
1134 Cerr(
"***** oImageDimensionsAndQuantification::ResetQuantificationFactors() -> Quantification factor table not fully allocated !" << endl);
1141 Cerr(
"***** oImageDimensionsAndQuantification::ResetQuantificationFactors() -> Quantification factor table not fully allocated !" << endl);
1148 Cerr(
"***** oImageDimensionsAndQuantification::ResetQuantificationFactors() -> Quantification factor table not allocated !" << endl);
1165 Cerr(
"***** oImageDimensionsAndQuantification::SetDynamicSpecificQuantificationFactors() -> Object not initialized !" << endl);
1173 if (a_quantificationFile==
"")
return 0;
1178 Cerr(
"***** oImageDimensionsAndQuantification::SetDynamicSpecificQuantificationFactors() -> Multi-bed gated acquisitions cannot be reconstructed !" << endl);
1183 if (
m_verbose>=2)
Cout(
"oImageDimensionsAndQuantification::SetDynamicSpecificQuantificationFactors()-> Processing quantification file '" << a_quantificationFile <<
"'" << endl);
1199 for (
int bed=0 ; bed<
m_nbBeds ; bed++)
1210 string *bed_name =
new string[m_nbBeds + 1];
1212 for(
int bed=0 ; bed<
m_nbBeds ; bed++)
1214 ostringstream oss( ostringstream::out );
1215 oss <<
"bed" << bed+1;
1216 bed_name[bed] = oss.str();
1221 for (
int bed=0 ; bed<
m_nbBeds ; bed++)
1226 Cerr(
"***** oImageDimensionsAndQuantification::SetDynamicSpecificQuantificationFactors() -> Didn't found quantitative factors in file " << a_quantificationFile <<
" !" << endl);
1229 else if(return_value == 1)
1231 Cerr(
"***** oImageDimensionsAndQuantification::SetDynamicSpecificQuantificationFactors() -> An error occurred while trying to recover specific quantitative factors for frame !" << endl);
1234 else if(return_value == 0)
1236 for(
int bed=0 ; bed<
m_nbBeds ; bed++)
1239 if (pp_dynamic_quantification_factors[bed][fr][g] <= 0)
1241 Cerr(
"***** oImageDimensionsAndQuantification::SetDynamicSpecificQuantificationFactors() -> Provided quantification factor (" << pp_dynamic_quantification_factors[bed][fr][g] <<
") is negative or null !" << endl);
1252 for (
int bed=0; bed<
m_nbBeds; bed++)
1254 for (
int fr=0; fr<
m_nbTimeFrames; fr++)
delete pp_dynamic_quantification_factors[bed][fr];
1255 delete[] pp_dynamic_quantification_factors[bed];
1257 delete[] pp_dynamic_quantification_factors;
1277 if (m_nbCardGates == 1) a_cardGate = 0;
1291 Cerr(
"***** oImageDimensionsAndQuantification::SetSPECTIsotope() -> Object not initialized !" << endl);
1311 Cerr(
"***** oImageDimensionsAndQuantification::SetPETIsotope() -> Object not initialized !" << endl);
1323 Cout(
"oImageDimensionsAndQuantification::SetPETIsotope() -> Ignore isotope dependent corrections" << endl);
1333 if (a_isotope==
"UNKNOWN" || a_isotope==
"Unknown" || a_isotope==
"unknown")
1337 Cout(
"oImageDimensionsAndQuantification::SetPETIsotope() -> Un-specified isotope; no decay nor branching ratio correction" << endl);
1351 string file_name = config_dir +
"/misc/isotopes_pet.txt";
1352 ifstream fin(file_name.c_str());
1356 Cerr(
"***** oImageDimensionsAndQuantification::SetPETIsotope() -> Failed to open PET isotopes data file '" << file_name <<
"' !" << endl);
1361 int line_max_size = 10240;
1362 char *line =
new char[line_max_size];
1363 FLTNB half_life = -1.;
1364 FLTNB branching_ratio = -1.;
1365 bool found_it =
false;
1366 fin.getline(line,line_max_size);
1370 size_t found_position;
1372 string test = (string)line;
1374 if ((found_position=test.find(
"#"))==0)
1377 fin.getline(line,line_max_size);
1381 found_position = test.find(a_isotope);
1382 if (found_position!=string::npos)
1386 test = test.substr(found_position+1+a_isotope.length());
1388 istringstream fstr(test);
1389 fstr >> half_life >> branching_ratio;
1395 fin.getline(line,line_max_size);
1406 if (branching_ratio<=0. || branching_ratio>1.)
1408 Cerr(
"***** oImageDimensionsAndQuantification::SetPETIsotope() -> Branching ratio (" << branching_ratio <<
") is not in the ]0:1] range !" << endl);
1416 Cout(
"oImageDimensionsAndQuantification::SetPETIsotope() -> Isotope " << a_isotope <<
" has infinite half life and " << branching_ratio <<
" branching ratio" << endl);
1418 Cout(
"oImageDimensionsAndQuantification::SetPETIsotope() -> Isotope " << a_isotope <<
" has " << half_life <<
" seconds half life and " << branching_ratio <<
" branching ratio" << endl);
1424 Cerr(
"***** oImageDimensionsAndQuantification::SetPETIsotope() -> Did not find " << a_isotope <<
" isotope in the PET isotope data file, please add it !" << endl);
1442 if (
m_verbose>=2 && a_bed==m_nbBeds-1)
Cout(
" --> Correct for branching ratio" << endl);
1445 else if (
m_verbose>=2 && a_bed==m_nbBeds-1)
Cout(
" --> Ignore branching ratio correction" << endl);
1473 if (
m_verbose>=2 && a_bed==m_nbBeds-1)
Cout(
" --> Correct for half-life" << endl);
1476 else if (
m_verbose>=2 && a_bed==m_nbBeds-1)
Cout(
" --> Ignore half-life correction" << endl);
1489 int a_respMotionCorrectionFlag,
1490 int a_cardMotionCorrectionFlag,
1491 int a_invMotionCorrectionFlag,
1492 int a_nbRespGates,
int a_nbCardGates )
1494 if (
m_verbose>=5)
Cout(
"oImageDimensionsAndQuantification::InitDynamicData()" << endl);
1498 a_respMotionCorrectionFlag, a_cardMotionCorrectionFlag, a_invMotionCorrectionFlag ))
1500 Cerr(
"***** oImageDimensionsAndQuantification::InitDynamicData() -> A problem occurred while initializing the dynamic data from dynamic data manager !" << endl);
1505 if (a_respMotionCorrectionFlag || a_cardMotionCorrectionFlag)
1507 else if (a_nbRespGates>1 || a_nbCardGates>1)
1509 else if (a_invMotionCorrectionFlag)
1511 else if (m_nbTimeFrames>1)
1525 if (
m_verbose>=5)
Cout(
"oImageDimensionsAndQuantification::CheckDynamicParameters()" << endl);
1538 Cerr(
"***** oImageDimensionsAndQuantification::ProcessAndSetMask() -> Mask already initialized !" << endl);
string m_cardBasisFunctionsFile
int InitializeFramingAndQuantification()
A function used to initialize the framing and quantification tables.
string m_respBasisFunctionsFile
int CheckParameters(int64_t a_nbEvents)
This class is designed to be a mother virtual class for DataFile.
int SetSPECTIsotope(int a_bed, const string &a_isotope)
int SetPETIsotope(int a_bed, const string &a_isotope)
static sScannerManager * GetInstance()
Instanciate the singleton object and Initialize member variables if not already done, return a pointer to this object otherwise.
oImageDimensionsAndQuantification()
The constructor of oImageDimensionsAndQuantification.
oDynamicDataManager * mp_DynamicDataManager
int ReadStringOption(const string &a_input, T *ap_return, int a_nbElts, const string &sep, const string &a_option)
Parse the 'a_input' string corresponding to the 'a_option' into 'a_nbElts' elements, using the 'sep' separator. The results are returned in the templated 'ap_return' dynamic templated array. Call "ConvertFromString()" to perform the correct conversion depending on the type of the data to convert.
FLTNB GetFrameDurationInSec(int a_bed, int a_frame)
FLTNB ** m2p_respBasisFunctions
This class gathers the information about the dynamic splitting of the data.
bool m_ignoreNormCorrectionFlag
bool m_ignoreRandCorrectionFlag
bool m_ignoreAttnCorrectionFlag
FLTNB *** m3p_quantificationFactors
uint32_t ** m2p_frameDurationsInMs
void SetVerbose(int a_verboseLevel)
int SetCalibrationFactor(int a_bed, FLTNB a_calibrationFactor)
void CheckNumberOfProjectionThreadsConsistencyWithDataFileSize(vDataFile **a2p_DataFile)
int DealWithBedPositions(vDataFile **a2p_DataFile)
int m_nbCardBasisFunctions
bool m_ignoreFdurCorrectionFlag
bool m_ignoreCaliCorrectionFlag
int m_nbThreadsForImageComputation
static sOutputManager * GetInstance()
Instanciate the singleton object and Initialize member variables if not already done, return a pointer to this object otherwise.
int m_nbThreadsForProjection
FLTNB GetFrameTimeStartInSec(int a_bed, int a_frame)
FLTNB ** m2p_cardBasisFunctions
int SetNbThreads(const string &a_nbThreads)
~oImageDimensionsAndQuantification()
The destructor of oImageDimensionsAndQuantification.
int InitDynamicData(int a_nbRespGates, int a_nbCardGates, const string &a_pathTo4DDataSplittingFile, int a_rmMCorrFlag, int a_cMmCorrFlag, int a_pMotionCorrFlag)
FLTNB ** m2p_timeBasisFunctions
int ResetQuantificationFactors()
If already initialized, set the quantification factors to 1.
int CheckParameters()
A function used to check the parameters settings.
FLTNB GetFrameTimeStopInSec(int a_bed, int a_frame)
int Initialize()
A function used to initialize all that is needed.
Singleton class that manages output writing on disk (images, sinograms, etc). It also manages loggi...
const string & GetPathToConfigDir()
Return the path to the CASTOR config directory.
int m_nbRespBasisFunctions
string m_ignoredCorrectionsList
bool GateDurationProvided()
bool GetBedPositionFlag()
uint32_t ** m2p_frameTimeStartInMs
bool m_ignoreBratCorrectionFlag
FLTNB GetQuantificationFactor(int a_bed, int a_frame, int a_respGate, int a_cardGate)
bool m_ignoreScatCorrectionFlag
vScanner * GetScannerObject()
int SetDynamicSpecificQuantificationFactors(FLTNB **a2p_quantificationFactors)
int InitDynamicData(string a_pathTo4DDataSplittingFile, int a_respMotionCorrectionFlag, int a_cardMotionCorrectionFlag, int a_invMotionCorrectionFlag, int a_nbRespGates, int a_nbCardGates)
#define KEYWORD_MANDATORY
uint32_t ** m2p_frameTimeStopInMs
int ProcessAndSetMask(FLTNB *ap_maskImage)
int m_nbTimeBasisFunctions
int CheckDynamicParameters(int64_t a_nbEvents)
FLTNB GetDefaultBedDisplacementInMm()
FLTNB GetRelativeBedPosition()
void SetImageDimensionsAndQuantification(oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
#define DYN_RECO_MCGATING
void SetDefault()
A function used to set number of threads and MPI instances to 1 and bypass the CheckParameters() func...
int ReadDataASCIIFile(const string &a_file, const string &a_keyword, T *ap_return, int a_nbElts, bool a_mandatoryFlag)
Look for "a_nbElts" elts in the "a_file" file matching the "a_keyword" string passed as parameter a...
bool m_ignoreDecaCorrectionFlag
int SetAcquisitionTime(int a_bed, FLTNB a_timeStartInSec, FLTNB a_durationInSec, string a_GateListDurationsInSec)
int InitializeIgnoredCorrections()
A function used to initialize the ignored corrections.
bool IsVoxelMasked(INTNB a_voxIndex)
bool m_providedBedPosition
Generic class for scanner objects.
int SetFlipOut(const string &a_flipOut)
int SetDynamicSpecificQuantificationFactors(const string &a_quantificationFile)