31 #ifndef OIMAGEDIMENSIONSANDQUANTIFICATION_HH
32 #define OIMAGEDIMENSIONSANDQUANTIFICATION_HH 1
184 int a_respMotionCorrectionFlag,
int a_cardMotionCorrectionFlag,
int a_doubleMotionCorrectionFlag,
int a_invMotionCorrectionFlag,
185 int a_nbRespGates,
int a_nbCardGates );
202 inline int DynamicSwitch( int64_t a_currentEventIndex, uint32_t a_currentTime,
int a_bed,
int a_th )
string m_cardBasisFunctionsFile
void SetCardMotionFlagOn()
Call the eponym function from the oDynamicDataManager class using the member object.
int InitializeFramingAndQuantification()
A function used to initialize the framing and quantification tables.
string m_respBasisFunctionsFile
void SetRespBasisFunctionsFile(const string &a_respBasisFunctionsFile)
Set the file name containing the respiratory basis functions coefficients.
int GetCurrentRespGate(int a_th)
Return the index indicating the current respiratory gate for this thread.
This class is designed to be a mother virtual class for DataFile.
This header file is mainly used to declare some macro definitions and all includes needed from the st...
int SetSPECTIsotope(int a_bed, const string &a_isotope)
Set the SPECT isotope for the provided bed.
int SetPETIsotope(int a_bed, const string &a_isotope)
Set the PET isotope for the provided bed.
int GetCurrentCardImage(int a_th)
call the eponym function from the oDynamicDataManager object
int GetCurrentCardGate(int a_th)
call the eponym function from the oDynamicDataManager object
int InitDynamicData(string a_pathTo4DDataSplittingFile, int a_respMotionCorrectionFlag, int a_cardMotionCorrectionFlag, int a_doubleMotionCorrectionFlag, int a_invMotionCorrectionFlag, int a_nbRespGates, int a_nbCardGates)
Call the eponym function from the oDynamicDataManager object in order to initialize its data...
oImageDimensionsAndQuantification()
The constructor of oImageDimensionsAndQuantification.
FLTNB ** m2p_cardBasisFunctions
FLTNB GetFrameTimeStartInSec(int a_bed, int a_frame)
Get the frame time start for the given bed, in seconds as a FLTNB.
void SetFOVSizeZ(FLTNB a_fovSizeZ)
Set the FOV's size along the Z axis, in mm.
void SetRespMotionFlagOn()
set the respiratory motion flag to 'true'
int GetNbCardBasisFunctions()
Get the number of cardiac basis functions.
void SetIgnoredCorrections(const string &a_ignoredCorrectionsList)
Set the string specifying the corrections that will be ignored.
void SetCardMotionFlagOn()
set the cardiac motion flag to 'true'
bool GetIgnoreBratCorrectionFlag()
Get the boolean that says if the branching ratio correction is ignored or not.
oDynamicDataManager * mp_DynamicDataManager
int GetCurrentPMotionIndex(int a_th)
call the eponym function from the oDynamicDataManager object
FLTNB GetVoxSizeX()
Get the voxel's size along the X axis, in mm.
int GetCurrentCardImage(int a_th)
return the number of the current cardiac gated image, to be used in the ImageSpace matrices for the r...
This class gathers the information about the dynamic splitting of the data.
FLTNB ** m2p_timeBasisFunctions
bool m_ignoreNormCorrectionFlag
void SetFOVSizeY(FLTNB a_fovSizeY)
Set the FOV's size along the Y axis, in mm.
void SetNbVoxZ(INTNB a_nbVoxZ)
Set the number of voxels along the Z axis.
bool m_ignoreRandCorrectionFlag
void SetNbTimeBasisFunctions(int a_nbTimeBasisFunctions)
Set the number of time basis functions.
FLTNB GetFOVOutPercent()
Get the percentage of transaxial unmasked FOV.
FLTNB GetBedPosition(int a_bedIndex)
Get the bed position associated to a bed index.
void ResetCurrentDynamicIndices()
Reset to 0 the multithreaded dynamic arrays gathering the indices of current frame, gates and involuntary motion.
int GetNb1stMotImgsForLMS(int a_fr)
call the eponym function from the oDynamicDataManager object
bool m_ignoreAttnCorrectionFlag
FLTNB GetVoxSizeZ()
Get the voxel's size along the Z axis, in mm.
FLTNB GetRespBasisCoefficient(int a_respBasisFunction, int a_respGate)
Get the respiratory basis coefficients for the provided respiratory gate and basis function...
void SetNbRespGates(int a_nbRespGates)
Set the number of respiratory gates.
int DynamicSwitch(int64_t a_currentEventIndex, uint32_t a_currentTime, int a_bed, int a_th)
Call the eponym function from the oDynamicDataManager class using the member object.
int GetCurrentCardGate(int a_th)
Return the index indicating the current cardiac gate for this thread.
int GetPMotionFirstIndexForLMS(int a_fr)
int SetCalibrationFactor(int a_bed, FLTNB a_calibrationFactor)
Set the calibration factor for the provided bed.
uint32_t GetFrameTimeStartInMs(int a_bed, int a_frame)
Get the frame time start for the given bed, in milliseconds as a uint32_t.
void SetOffsetY(FLTNB a_offsetY)
Set the image offset along the Y axis, in mm.
void CheckNumberOfProjectionThreadsConsistencyWithDataFileSize(vDataFile **a2p_DataFile)
FLTNB GetFOVSizeZ()
Get the size of the field-of-view along the Z axis, in mm.
void SetFOVOutMasking(FLTNB a_fovOutPercent, INTNB a_nbSliceOutMask)
Set the output FOV masking settings: transaxial unmasked FOV percent and number of extrem slices to r...
bool GetIgnoreAttnCorrectionFlag()
Get the boolean that says if the attenuation correction is ignored or not.
int DealWithBedPositions(vDataFile **a2p_DataFile)
Deal with provided or default bed relative positions.
int GetNb1stMotImgsForLMS(int a_fr)
return the number of first motion (either respiratory or involuntary patient motion) images to be use...
int m_nbCardBasisFunctions
bool IsInitialized()
Returns true if the object has been initialized.
int GetNbMultiModalImages()
Get the number of additional multimodal images.
int GetNbIPatMotionSubsets()
return the number of involuntary patient motion transformations
bool m_ignoreFdurCorrectionFlag
int GetNbTimeBasisFunctions()
Get the number of time basis functions.
FLTNB GetFOVSizeY()
Get the size of the field-of-view along the Y axis, in mm.
bool m_ignoreCaliCorrectionFlag
int GetCurrentRespGate(int a_th)
call the eponym function from the oDynamicDataManager object
int m_nbThreadsForImageComputation
int m_nbThreadsForProjection
int GetCurrentRespImage(int a_th)
return the number of the current respiratory gated image, to be used in the ImageSpace matrices for t...
void SetOffsetZ(FLTNB a_offsetZ)
Set the image offset along the Z axis, in mm.
FLTNB GetFOVSizeX()
Get the size of the field-of-view along the X axis, in mm.
void SetNbVoxX(INTNB a_nbVoxX)
Set the number of voxels along the X axis.
int SetNbThreads(const string &a_nbThreads)
Set the number of threads.
bool GetProvidedBedPositionFlag()
Say if the bed relative position was provided from the datafile or not.
~oImageDimensionsAndQuantification()
The destructor of oImageDimensionsAndQuantification.
bool GetRespStaticFlag()
Get the respiratory static flag that says if the reconstruction has only one respiratory gate or not...
bool GetIgnoreNormCorrectionFlag()
Get the boolean that says if the normalization correction is ignored or not.
void SetPMotionFlagOn()
Call the eponym function from the oDynamicDataManager class using the member object.
bool GetIgnoreRandCorrectionFlag()
Get the boolean that says if the random correction is ignored or not.
int DynamicSwitch(int64_t a_index, uint32_t a_time, int a_bed, int a_th)
This function is called in the reconstruction event loop. It is used to check if the current event be...
void SetNbVoxY(INTNB a_nbVoxY)
Set the number of voxels along the Y axis.
void SetNbRespBasisFunctions(int a_nbRespBasisFunctions)
Set the number of respiratory basis functions.
int GetNb2ndMotImgsForLMS()
return the number of secundary motion (typically cardiac) images to be used in the ImageSpace matrice...
bool GetIgnoreCaliCorrectionFlag()
Get the boolean that says if the calibration correction is ignored or not.
bool GetIgnoreFdurCorrectionFlag()
Get the boolean that says if the frame duration correction is ignored or not.
int CheckParameters()
A function used to check the parameters settings.
void SetNbCardGates(int a_nbCardGates)
Set the number of cardiac gates.
FLTNB GetVoxSizeY()
Get the voxel's size along the Y axis, in mm.
void SetRespMotionFlagOn()
Call the eponym function from the oDynamicDataManager class using the member object.
bool GetCardStaticFlag()
Get the cardiac static flag that says if the reconstruction has only one cardiac gate or not...
int GetNbIPatMotionSubsets()
call the eponym function from the oDynamicDataManager object
int Initialize()
A function used to initialize all that is needed.
bool GetIgnoreDecaCorrectionFlag()
Get the boolean that says if the decay correction is ignored or not.
void SetMPIRankAndSize(int a_mpiRank, int a_mpiSize)
Set the MPI rank of the MPI instance, and the MPI size (the number of instances)
int m_nbRespBasisFunctions
string m_ignoredCorrectionsList
string m_timeBasisFunctionsFile
void SetFrames(const string &a_frameList)
Set the frame list (a string that will be parsed by the InitializeFramingAndQuantification function) ...
void SetFOVSizeX(FLTNB a_fovSizeX)
Set the FOV's size along the X axis, in mm.
uint32_t ** m2p_frameDurationsInMs
int GetNbBeds()
Get the number of bed positions.
Declaration of class oDynamicDataManager.
int GetNbThreadsMax()
Get the maximum between the number of threads used for projections and image operations.
int InitializeTimeBasisFunctions()
A function used to initialize the time basis functions.
int GetMPISize()
Get the MPI size (the number of MPI instances)
int GetCurrentTimeFrame(int a_th)
Return the index indicating the current time frame for this thread.
FLTNB GetFinalTimeStopInSec(int a_bed)
Get the last frame time stop for the given bed, in seconds as a FLTNB.
void ResetCurrentDynamicIndices()
Call the eponym function from the oDynamicDataManager class using the member object.
void SetVoxSizeY(FLTNB a_voxSizeY)
Set the voxel's size along the Y axis, in mm.
bool m_ignoreBratCorrectionFlag
FLTNB GetQuantificationFactor(int a_bed, int a_frame, int a_respGate, int a_cardGate)
Get the quantification factor corresponding to the provided bed, frame, respiratory and cardiac gates...
INTNB GetNbVoxXY()
Get the number of voxels in a slice.
void SetOffsetX(FLTNB a_offsetX)
Set the image offset along the X axis, in mm.
bool m_ignoreScatCorrectionFlag
void SetVoxSizeX(FLTNB a_voxSizeX)
Set the voxel's size along the X axis, in mm.
FLTNB GetTimeBasisCoefficient(int a_timeBasisFunction, int a_timeFrame)
Get the time basis coefficients for the provided frame and basis function.
void SetTimeBasisFunctionsFile(const string &a_timeBasisFunctionsFile)
Set the file name containing the time basis functions coefficients.
bool GetTimeStaticFlag()
Get the time static flag that says if the reconstruction has only one frame or not.
FLTNB GetOffsetY()
Get the image offset along the Y axis, in mm.
int GetPMotionFirstIndexForLMS(int a_fr)
void SetNbMultiModalImages(int a_nbMultiModalImages)
Set the number of additional multimodal images.
bool GetFlipOutX()
Get the boolean saying if the output image must be flipped along the X axis.
void SetVerbose(int a_verbose)
Set the member m_verboseLevel to the provided value.
bool GetFlipOutY()
Get the boolean saying if the output image must be flipped along the Y axis.
int m_nbTimeBasisFunctions
uint32_t ** m2p_frameTimeStopInMs
INTNB GetNbVoxDiagonal()
Get an estimation of the number of voxels along the image diagonal.
void SetVoxSizeZ(FLTNB a_voxSizeZ)
Set the voxel's size along the Z axis, in mm.
int CheckDynamicParameters(int64_t a_nbEvents)
Call the eponym function from the oDynamicDataManager object in order to check its parameters...
int GetNbCardGates()
Get the number of cardiac gates.
int InitializeRespBasisFunctions()
A function used to initialize the respiratory basis functions.
FLTNB GetOffsetZ()
Get the image offset along the Z axis, in mm.
Declaration of class sOutputManager.
FLTNB GetFrameTimeStopInSec(int a_bed, int a_frame)
Get the frame time stop for the given bed, in seconds as a FLTNB.
int GetNbThreadsForImageComputation()
Get the number of threads used for image operations.
int GetNbTimeFrames()
Get the number of time frames.
int GetCurrentPMotionIndex(int a_th)
return the number of the current involuntary patient motion image to be used in the ImageSpace matric...
INTNB GetNbVoxXYZ()
Get the total number of voxels.
int GetNb2ndMotImgsForLMS()
call the eponym function from the oDynamicDataManager object
int SetAcquisitionTime(int a_bed, FLTNB a_timeStartInSec, FLTNB a_durationInSec)
Set the acquisition time if not already set by the SetTimeFrames()
This class is designed to manage all dimensions and quantification related stuff. ...
int GetNbThreadsForProjection()
Get the number of threads used for projections.
void SetNbBeds(int a_nbBeds)
Set the number of bed positions and allocate the bed positions if not already done.
uint32_t GetFrameDurationInMs(int a_bed, int a_frame)
Get the frame duration for the given bed, in milliseconds as a uint32_t.
bool GetIgnoreScatCorrectionFlag()
Get the boolean that says if the scatter correction is ignored or not.
void SetNbCardBasisFunctions(int a_nbCardBasisFunctions)
Set the number of cardiac basis functions.
This file is used for all kind of different functions designed for options parsing and ASCII file rea...
uint32_t GetFinalTimeStopInMs(int a_bed)
Get the last frame time stop for the given bed, in milliseconds as a uint32_t.
FLTNB GetOffsetX()
Get the image offset along the X axis, in mm.
INTNB GetNbVoxX()
Get the number of voxels along the X axis.
INTNB GetNbVoxZ()
Get the number of voxels along the Z axis.
int GetNbRespGates()
Get the number of respiratory gates.
void SetCardBasisFunctionsFile(const string &a_cardBasisFunctionsFile)
Set the file name containing the cardiac basis functions coefficients.
int InitializeCardBasisFunctions()
A function used to initialize the cardiac basis functions.
FLTNB GetFrameDurationInSec(int a_bed, int a_frame)
Get the frame duration for the given bed, in seconds as a FLTNB.
void SetDefault()
A function used to set number of threads and MPI instances to 1 and bypass the CheckParameters() func...
bool m_ignoreDecaCorrectionFlag
bool GetFlipOutZ()
Get the boolean saying if the output image must be flipped along the Z axis.
uint32_t ** m2p_frameTimeStartInMs
int GetCurrentRespImage(int a_th)
call the eponym function from the oDynamicDataManager object
int InitializeIgnoredCorrections()
A function used to initialize the ignored corrections.
int GetNbRespBasisFunctions()
Get the number of respiratory basis functions.
bool m_providedBedPosition
int GetMPIRank()
Get the MPI instance number (the rank)
INTNB GetNbSliceOutMask()
Get the number of extrem slices that will be masked at each side.
int GetCurrentTimeFrame(int a_th)
call the eponym function from the oDynamicDataManager object
INTNB GetNbVoxY()
Get the number of voxels along the Y axis.
int SetFlipOut(const string &a_flipOut)
Set the output flip options, the parameter being a string potentially containing the letters x...
void SetPMotionFlagOn()
set the involuntary patient motion flag to 'true'
int SetDynamicSpecificQuantificationFactors(const string &a_quantificationFile)
Apply specific quantification factors manually provided as an option.
FLTNB GetCardBasisCoefficient(int a_cardBasisFunction, int a_cardGate)
Get the cardiac basis coefficients for the provided cardiac gate and basis function.
uint32_t GetFrameTimeStopInMs(int a_bed, int a_frame)
Get the frame time stop for the given bed, in milliseconds as a uint32_t.
FLTNB *** m3p_quantificationFactors
FLTNB ** m2p_respBasisFunctions