8 #ifndef OIMAGEDIMENSIONSANDQUANTIFICATION_HH 9 #define OIMAGEDIMENSIONSANDQUANTIFICATION_HH 1 11 #include "gVariables.hh" 12 #include "sOutputManager.hh" 13 #include "gOptions.hh" 14 #include "oDynamicDataManager.hh" 15 #include "oArterialInputCurve.hh" 29 #define DYN_RECO_FRAMING 1 31 #define DYN_RECO_GATING 2 33 #define DYN_RECO_MCGATING 3 35 #define DYN_RECO_IPMC 4 184 int a_respMotionCorrectionFlag,
int a_cardMotionCorrectionFlag,
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
uint32_t GetFrameTimeStartInMs(int a_bed, int a_frame)
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
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.
int SetSPECTIsotope(int a_bed, const string &a_isotope)
int SetPETIsotope(int a_bed, const string &a_isotope)
FLTNB GetListPMotionWeightInFrameForLMS(int a_fr, int a_pmsset)
void SetNbCardGates(int a_nbCardGates)
oImageDimensionsAndQuantification()
The constructor of oImageDimensionsAndQuantification.
void SetRespMotionFlagOn()
set the respiratory motion flag to 'true'
oDynamicDataManager * mp_DynamicDataManager
int GetPMotionFirstIndexForFrame(int a_fr)
int GetNbCardBasisFunctions()
Get the number of cardiac basis functions.
bool IsCardMotionEnabled()
FLTNB GetFrameDurationInSec(int a_bed, int a_frame)
void SetCardMotionFlagOn()
set the cardiac motion flag to 'true'
FLTNB GetBedPosition(int a_bedIndex)
bool GetIgnoreBratCorrectionFlag()
Get the boolean that says if the branching ratio correction is ignored or not.
int GetCurrentPMotionIndex(int a_th)
FLTNB GetVoxSizeX()
Get the voxel's size along the X axis, in mm.
FLTNB ** m2p_respBasisFunctions
FLTNB GetTimeBasisCoefficient(int a_timeBasisFunction, int a_timeFrame)
This class gathers the information about the dynamic splitting of the data.
bool m_ignoreNormCorrectionFlag
bool m_ignoreRandCorrectionFlag
FLTNB GetFOVOutPercent()
Get the percentage of transaxial unmasked FOV.
int GetCurrentCardGate(int a_th)
void ResetCurrentDynamicIndices()
Reset to 0 the multithreaded dynamic arrays gathering the indices of current frame, gates and involuntary motion.
bool m_ignoreAttnCorrectionFlag
FLTNB *** m3p_quantificationFactors
void SetFOVSizeX(FLTNB a_fovSizeX)
uint32_t ** m2p_frameDurationsInMs
FLTNB GetVoxSizeZ()
Get the voxel's size along the Z axis, in mm.
int GetCurrentCardImage(int a_th)
void SetVoxSizeY(FLTNB a_voxSizeY)
void SetnbFramesToSkip(int a_FramesToSkip)
int SetCalibrationFactor(int a_bed, FLTNB a_calibrationFactor)
void CheckNumberOfProjectionThreadsConsistencyWithDataFileSize(vDataFile **a2p_DataFile)
void SetOffsetZ(FLTNB a_offsetZ)
FLTNB GetFOVSizeZ()
Get the size of the field-of-view along the Z axis, in mm.
bool GetIgnoreAttnCorrectionFlag()
Get the boolean that says if the attenuation correction is ignored or not.
int DealWithBedPositions(vDataFile **a2p_DataFile)
int GetCurrentCardImage(int a_th)
void SetVoxSizeX(FLTNB a_voxSizeX)
int m_nbCardBasisFunctions
int GetPMotionLastIndexForFrame(int a_fr)
bool IsInitialized()
Returns true if the object has been initialized.
void SetNbRespGates(int a_nbRespGates)
int GetNbMultiModalImages()
Get the number of additional multimodal images.
void SetNbVoxY(INTNB a_nbVoxY)
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
void SetTimeBasisFunctions(FLTNB **a_m2pTimeBasisFunctions)
int GetPMotionLastIndexForFrame(int a_fr)
int m_nbThreadsForImageComputation
int m_nbThreadsForProjection
FLTNB GetFrameTimeStartInSec(int a_bed, int a_frame)
int DynamicSwitch(int64_t a_currentEventIndex, uint32_t a_currentTime, int a_bed, int a_th)
FLTNB GetFinalTimeStopInSec(int a_bed)
void SetNbRespBasisFunctions(int a_nbRespBasisFunctions)
FLTNB ** m2p_cardBasisFunctions
FLTNB GetFOVSizeX()
Get the size of the field-of-view along the X axis, in mm.
int SetNbThreads(const string &a_nbThreads)
void SetTimeStaticFlag(bool a_flag)
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.
FLTNB ** m2p_timeBasisFunctions
bool GetIgnoreRandCorrectionFlag()
Get the boolean that says if the random correction is ignored or not.
void SetFOVSizeY(FLTNB a_fovSizeY)
int DynamicSwitch(int64_t a_index, uint32_t a_time, int a_bed, int a_th)
FLTNB GetListPMotionWeightInFrameForLMS(int a_fr, int a_pmsset)
void SetRespBasisFunctions(FLTNB **a_m2pRespBasisFunctions)
void SetNbVoxZ(INTNB a_nbVoxZ)
int GetNb2ndMotImgsForLMS()
return the number of secundary motion (typically cardiac) images to be used in the ImageSpace matrice...
uint32_t GetFrameDurationInMs(int a_bed, int a_frame)
void SetOffsetY(FLTNB a_offsetY)
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.
FLTNB GetFrameTimeStopInSec(int a_bed, int a_frame)
FLTNB GetVoxSizeY()
Get the voxel's size along the Y axis, in mm.
int GetCurrentRespImage(int a_th)
void SetCardStaticFlag(bool a_flag)
uint32_t * GetFramesTimeStopArray(int a_bed)
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...
bool IsCardMotionEnabled()
int GetNbIPatMotionSubsets()
call the eponym function from the oDynamicDataManager object
FLTNB GetRespBasisCoefficient(int a_respBasisFunction, int a_respGate)
void SetCardBasisFunctions(FLTNB **a_m2pCardBasisFunctions)
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.
int m_nbRespBasisFunctions
string m_ignoredCorrectionsList
void SetNbCardBasisFunctions(int a_nbCardBasisFunctions)
bool GateDurationProvided()
int GetNbBeds()
Get the number of bed positions.
void SetFOVSizeZ(FLTNB a_fovSizeZ)
int GetNbThreadsMax()
Get the maximum between the number of threads used for projections and image operations.
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.
void ResetCurrentDynamicIndices()
Call the eponym function from the oDynamicDataManager class using the member object.
bool GateDurationProvided()
FLTNB GetCardBasisCoefficient(int a_cardBasisFunction, int a_cardGate)
uint32_t ** m2p_frameTimeStartInMs
uint32_t * GetFramesTimeDurationsArray(int a_bed)
bool m_ignoreBratCorrectionFlag
FLTNB GetQuantificationFactor(int a_bed, int a_frame, int a_respGate, int a_cardGate)
INTNB GetNbVoxXY()
Get the number of voxels in a slice.
bool m_ignoreScatCorrectionFlag
int GetCurrentCardGate(int a_th)
bool IsRespMotionEnabled()
int InitDynamicData(string a_pathTo4DDataSplittingFile, int a_respMotionCorrectionFlag, int a_cardMotionCorrectionFlag, int a_invMotionCorrectionFlag, int a_nbRespGates, int a_nbCardGates)
bool IsRespMotionEnabled()
bool GetTimeStaticFlag()
Get the time static flag that says if the reconstruction has only one frame or not.
int GetCurrentRespImage(int a_th)
void SetIgnoredCorrections(const string &a_ignoredCorrectionsList)
void SetRespStaticFlag(bool a_flag)
void SetFOVOutMasking(FLTNB a_fovOutPercent, INTNB a_nbSliceOutMask)
FLTNB GetOffsetY()
Get the image offset along the Y axis, in mm.
void SetNbBeds(int a_nbBeds)
bool GetFlipOutX()
Get the boolean saying if the output image must be flipped along the X axis.
int GetNb1stMotImgsForLMS(int a_fr)
uint32_t ** m2p_frameTimeStopInMs
uint32_t * GetFramesTimeStartsArray(int a_bed)
bool GetFlipOutY()
Get the boolean saying if the output image must be flipped along the Y axis.
void SetVoxSizeZ(FLTNB a_voxSizeZ)
int ProcessAndSetMask(FLTNB *ap_maskImage)
uint32_t GetFinalTimeStopInMs(int a_bed)
int m_nbTimeBasisFunctions
INTNB GetNbVoxDiagonal()
Get an estimation of the number of voxels along the image diagonal.
HPFLTNB GetdurationPerGate(int a_fr, int a_respGate)
int CheckDynamicParameters(int64_t a_nbEvents)
int GetNbCardGates()
Get the number of cardiac gates.
FLTNB GetOffsetZ()
Get the image offset along the Z axis, in mm.
bool HasMask()
Returns true if has an image mask.
void SetCardBasisFunctionsFile(const string &a_cardBasisFunctionsFile)
int GetNbThreadsForImageComputation()
Get the number of threads used for image operations.
int GetNbTimeFrames()
Get the number of time frames.
INTNB GetNbVoxXYZ()
Get the total number of voxels.
int GetNb2ndMotImgsForLMS()
call the eponym function from the oDynamicDataManager object
void SetNbVoxX(INTNB a_nbVoxX)
void SetOffsetX(FLTNB a_offsetX)
This class is designed to manage all dimensions and quantification related stuff. ...
int GetNbThreadsForProjection()
Get the number of threads used for projections.
uint32_t GetFrameTimeStopInMs(int a_bed, int a_frame)
bool GetIgnoreScatCorrectionFlag()
Get the boolean that says if the scatter correction is ignored or not.
HPFLTNB GetDurationPerGate(int a_fr, int a_respGate)
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 GetCurrentRespGate(int a_th)
int GetNbRespGates()
Get the number of respiratory gates.
void SetFrames(const string &a_frameList)
void SetNbTimeBasisFunctions(int a_nbTimeBasisFunctions)
void SetNbMultiModalImages(int a_nbMultiModalImages)
int GetCurrentTimeFrame(int a_th)
void SetDefault()
A function used to set number of threads and MPI instances to 1 and bypass the CheckParameters() func...
void SetVerbose(int a_verbose)
bool m_ignoreDecaCorrectionFlag
bool GetFlipOutZ()
Get the boolean saying if the output image must be flipped along the Z axis.
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)
void SetMPIRankAndSize(int a_mpiRank, int a_mpiSize)
int GetNbRespBasisFunctions()
Get the number of respiratory basis functions.
void SetRespBasisFunctionsFile(const string &a_respBasisFunctionsFile)
int GetPMotionFirstIndexForFrame(int a_fr)
bool m_providedBedPosition
int GetMPIRank()
Get the MPI instance number (the rank)
int GetNb1stMotImgsForLMS(int a_fr)
INTNB GetNbSliceOutMask()
Get the number of extrem slices that will be masked at each side.
INTNB GetNbVoxY()
Get the number of voxels along the Y axis.
int SetFlipOut(const string &a_flipOut)
void SetPMotionFlagOn()
set the involuntary patient motion flag to 'true'
int GetCurrentPMotionIndex(int a_th)
int SetDynamicSpecificQuantificationFactors(const string &a_quantificationFile)