CASToR  3.0
Tomographic Reconstruction (PET/SPECT/CT)
oImageDimensionsAndQuantification.hh
Go to the documentation of this file.
1 /*
2 This file is part of CASToR.
3 
4  CASToR is free software: you can redistribute it and/or modify it under the
5  terms of the GNU General Public License as published by the Free Software
6  Foundation, either version 3 of the License, or (at your option) any later
7  version.
8 
9  CASToR is distributed in the hope that it will be useful, but WITHOUT ANY
10  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12  details.
13 
14  You should have received a copy of the GNU General Public License along with
15  CASToR (in file GNU_GPL.TXT). If not, see <http://www.gnu.org/licenses/>.
16 
17 Copyright 2017-2019 all CASToR contributors listed below:
18 
19  --> Didier BENOIT, Claude COMTAT, Marina FILIPOVIC, Thibaut MERLIN, Mael MILLARDET, Simon STUTE, Valentin VIELZEUF
20 
21 This is CASToR version 3.0.
22 */
23 
30 #ifndef OIMAGEDIMENSIONSANDQUANTIFICATION_HH
31 #define OIMAGEDIMENSIONSANDQUANTIFICATION_HH 1
32 
33 #include "gVariables.hh"
34 #include "sOutputManager.hh"
35 #include "gOptions.hh"
36 #include "oDynamicDataManager.hh"
37 #include "oArterialInputCurve.hh"
38 // #include "oDynamicModelManager.hh"
39 
40 
49 #define STATIC_RECO 0
50 
51 #define DYN_RECO_FRAMING 1
52 
53 #define DYN_RECO_GATING 2
54 
55 #define DYN_RECO_MCGATING 3
56 
57 #define DYN_RECO_IPMC 4
58 
70 {
71  // -----------------------------------------------------------------------------------------
72  // Constructor & Destructor
73  public:
88 
89 
90  // -----------------------------------------------------------------------------------------
91  // Public member functions
92  public:
98  void SetDefault();
106  int CheckParameters();
116  int Initialize();
133  int DealWithBedPositions(vDataFile** a2p_DataFile);
134 
135  // -----------------------------------------------------------------------------------------
136  // Private member functions
137  private:
154  // int InitializeTimeBasisFunctions();
163  // int InitializeRespBasisFunctions();
172  // int InitializeCardBasisFunctions();
182 
183 
184  // -----------------------------------------------------------------------------------------
185  // Public dynamic data management functions
186  public:
205  int InitDynamicData( string a_pathTo4DDataSplittingFile,
206  int a_respMotionCorrectionFlag, int a_cardMotionCorrectionFlag, int a_invMotionCorrectionFlag,
207  int a_nbRespGates, int a_nbCardGates );
214  int CheckDynamicParameters(int64_t a_nbEvents);
224  inline int DynamicSwitch( int64_t a_currentEventIndex, uint32_t a_currentTime, int a_bed, int a_th )
225  {return mp_DynamicDataManager->DynamicSwitch(a_currentEventIndex, a_currentTime, a_bed, a_th);}
226 
227 
233  inline bool IsRespMotionEnabled()
240  inline bool IsCardMotionEnabled()
247  inline bool IsPMotionEnabled()
249 
250  // -----------------------------------------------------------------------------------------
251  // Public Get & Set functions related to the dynamic data management
252  public:
257  inline void SetRespMotionFlagOn()
263  inline void SetCardMotionFlagOn()
269  inline void SetPMotionFlagOn()
277  inline int GetCurrentRespGate(int a_th)
285  inline int GetCurrentCardGate(int a_th)
293  inline int GetPMotionFirstIndexForFrame(int a_fr)
295 
302  inline int GetPMotionLastIndexForFrame(int a_fr)
304 
311  inline int GetNb1stMotImgsForLMS(int a_fr)
320 
321 
327  inline FLTNB GetListPMotionWeightInFrameForLMS(int a_fr, int a_pmsset)
329 
330 
331 
338  inline int GetCurrentRespImage(int a_th)
346  inline int GetCurrentCardImage(int a_th)
354  inline int GetCurrentTimeFrame(int a_th)
362  inline int GetCurrentPMotionIndex(int a_th)
364 
372 
377  inline int GetDynRecoType()
378  {return m_DynRecoTypeFlag;}
379 
380 
381  // -----------------------------------------------------------------------------------------
382  // Get & Set functions
383  public:
389  inline void SetVerbose(int a_verbose)
390  {m_verbose = a_verbose;}
397  {return m_nbThreadsForProjection;}
410  inline int GetNbThreadsMax()
412  else return m_nbThreadsForImageComputation; }
421  int SetNbThreads(const string& a_nbThreads);
428  inline void SetMPIRankAndSize(int a_mpiRank, int a_mpiSize)
429  {m_mpiRank = a_mpiRank; m_mpiSize = a_mpiSize;}
435  inline int GetMPISize()
436  {return m_mpiSize;}
442  inline int GetMPIRank()
443  {return m_mpiRank;}
449  inline int GetNbBeds()
450  {return m_nbBeds;}
456  inline void SetNbBeds(int a_nbBeds)
457  {m_nbBeds = a_nbBeds; if (mp_bedPositions!=NULL) free(mp_bedPositions); mp_bedPositions = (FLTNB*)calloc(m_nbBeds,sizeof(FLTNB));}
464  inline FLTNB GetBedPosition(int a_bedIndex)
465  {return mp_bedPositions[a_bedIndex];}
477  inline int GetNbTimeFrames()
478  {return m_nbTimeFrames;}
485  {return m_nbTimeBasisFunctions;}
493  inline FLTNB GetTimeBasisCoefficient(int a_timeBasisFunction, int a_timeFrame)
494  {return m2p_timeBasisFunctions[a_timeBasisFunction][a_timeFrame];}
502  inline FLTNB GetFrameDurationInSec(int a_bed, int a_frame)
503  {return ((FLTNB)(m2p_frameDurationsInMs[a_bed][a_frame]))/1000.;}
511  inline FLTNB GetFrameTimeStartInSec(int a_bed, int a_frame)
512  {return ((FLTNB)(m2p_frameTimeStartInMs[a_bed][a_frame]))/1000.;}
520  inline FLTNB GetFrameTimeStopInSec(int a_bed, int a_frame)
521  {return ((FLTNB)(m2p_frameTimeStopInMs[a_bed][a_frame]))/1000.;}
528  inline FLTNB GetFinalTimeStopInSec(int a_bed)
529  {return ((FLTNB)(m2p_frameTimeStopInMs[a_bed][m_nbTimeFrames-1]))/1000.;}
537  inline uint32_t GetFrameDurationInMs(int a_bed, int a_frame)
538  {return m2p_frameDurationsInMs[a_bed][a_frame];}
546  inline uint32_t GetFrameTimeStartInMs(int a_bed, int a_frame)
547  {return m2p_frameTimeStartInMs[a_bed][a_frame];}
555  inline uint32_t GetFrameTimeStopInMs(int a_bed, int a_frame)
556  {return m2p_frameTimeStopInMs[a_bed][a_frame];}
563  inline uint32_t GetFinalTimeStopInMs(int a_bed)
564  {return m2p_frameTimeStopInMs[a_bed][m_nbTimeFrames-1];}
571  inline uint32_t* GetFramesTimeStartsArray(int a_bed)
572  {return m2p_frameTimeStartInMs[a_bed];}
579  inline uint32_t* GetFramesTimeStopArray(int a_bed)
580  {return m2p_frameTimeStopInMs[a_bed];}
587  inline uint32_t* GetFramesTimeDurationsArray(int a_bed)
588  {return m2p_frameDurationsInMs[a_bed];}
594  inline void SetFrames(const string& a_frameList)
595  {m_frameList = a_frameList;}
601  // TODO: Remove this function and option from castor-recon
602  inline void SetNbTimeBasisFunctions(int a_nbTimeBasisFunctions)
603  {m_nbTimeBasisFunctions = a_nbTimeBasisFunctions;}
609  inline void SetTimeBasisFunctions(FLTNB** a_m2pTimeBasisFunctions)
610  {m2p_timeBasisFunctions = a_m2pTimeBasisFunctions;}
616  inline void SetRespBasisFunctions(FLTNB** a_m2pRespBasisFunctions)
617  {m2p_respBasisFunctions = a_m2pRespBasisFunctions;}
623  inline void SetCardBasisFunctions(FLTNB** a_m2pCardBasisFunctions)
624  {m2p_cardBasisFunctions = a_m2pCardBasisFunctions;}
635  int SetAcquisitionTime(int a_bed, FLTNB a_timeStartInSec, FLTNB a_durationInSec, string a_GateListDurationsInSec);
641  inline bool GetTimeStaticFlag()
642  {return m_timeStaticFlag;}
648  inline int GetNbRespGates()
649  {return m_nbRespGates;}
656  {return m_nbRespBasisFunctions;}
664  inline FLTNB GetRespBasisCoefficient(int a_respBasisFunction, int a_respGate)
665  {return m2p_respBasisFunctions[a_respBasisFunction][a_respGate];}
671  inline void SetNbRespGates(int a_nbRespGates)
672  {m_nbRespGates = a_nbRespGates;}
678  inline void SetNbRespBasisFunctions(int a_nbRespBasisFunctions)
679  {m_nbRespBasisFunctions = a_nbRespBasisFunctions;}
685  inline void SetRespBasisFunctionsFile(const string& a_respBasisFunctionsFile)
686  {m_respBasisFunctionsFile = a_respBasisFunctionsFile;}
692  inline bool GetRespStaticFlag()
693  {return m_respStaticFlag;}
699  inline int GetNbCardGates()
700  {return m_nbCardGates;}
707  {return m_nbCardBasisFunctions;}
715  inline FLTNB GetCardBasisCoefficient(int a_cardBasisFunction, int a_cardGate)
716  {return m2p_cardBasisFunctions[a_cardBasisFunction][a_cardGate];}
722  inline void SetNbCardGates(int a_nbCardGates)
723  {m_nbCardGates = a_nbCardGates;}
729  inline void SetNbCardBasisFunctions(int a_nbCardBasisFunctions)
730  {m_nbCardBasisFunctions = a_nbCardBasisFunctions;}
736  inline void SetCardBasisFunctionsFile(const string& a_cardBasisFunctionsFile)
737  {m_cardBasisFunctionsFile = a_cardBasisFunctionsFile;}
743  inline bool GetCardStaticFlag()
744  {return m_cardStaticFlag;}
750  inline INTNB GetNbVoxX()
751  {return m_nbVoxX;}
757  inline INTNB GetNbVoxY()
758  {return m_nbVoxY;}
764  inline INTNB GetNbVoxZ()
765  {return m_nbVoxZ;}
771  inline INTNB GetNbVoxXY()
772  {return m_nbVoxXY;}
779  {return m_nbVoxXYZ;}
786  { return ((INTNB)(sqrt( ((FLTNB)m_nbVoxX) * ((FLTNB)m_nbVoxX) +
787  ((FLTNB)m_nbVoxY) * ((FLTNB)m_nbVoxY) +
788  ((FLTNB)m_nbVoxZ) * ((FLTNB)m_nbVoxZ) ))); }
794  inline void SetNbVoxX(INTNB a_nbVoxX)
795  {m_nbVoxX = a_nbVoxX;}
801  inline void SetNbVoxY(INTNB a_nbVoxY)
802  {m_nbVoxY = a_nbVoxY;}
808  inline void SetNbVoxZ(INTNB a_nbVoxZ)
809  {m_nbVoxZ = a_nbVoxZ;}
816  {return m_voxSizeX;}
823  {return m_voxSizeY;}
830  {return m_voxSizeZ;}
837  {return m_fovSizeX;}
844  {return m_fovSizeY;}
851  {return m_fovSizeZ;}
857  inline void SetVoxSizeX(FLTNB a_voxSizeX)
858  {m_voxSizeX = a_voxSizeX;}
864  inline void SetVoxSizeY(FLTNB a_voxSizeY)
865  {m_voxSizeY = a_voxSizeY;}
871  inline void SetVoxSizeZ(FLTNB a_voxSizeZ)
872  {m_voxSizeZ = a_voxSizeZ;}
878  inline void SetFOVSizeX(FLTNB a_fovSizeX)
879  {m_fovSizeX = a_fovSizeX;}
885  inline void SetFOVSizeY(FLTNB a_fovSizeY)
886  {m_fovSizeY = a_fovSizeY;}
892  inline void SetFOVSizeZ(FLTNB a_fovSizeZ)
893  {m_fovSizeZ = a_fovSizeZ;}
900  inline void SetFOVOutMasking(FLTNB a_fovOutPercent, INTNB a_nbSliceOutMask)
901  {m_fovOutPercent = a_fovOutPercent; m_nbSliceOutMask = a_nbSliceOutMask;}
908  {return m_fovOutPercent;}
915  {return m_nbSliceOutMask;}
922  int SetFlipOut(const string& a_flipOut);
928  inline bool GetFlipOutX()
929  {return m_flipOutX;}
935  inline bool GetFlipOutY()
936  {return m_flipOutY;}
942  inline bool GetFlipOutZ()
943  {return m_flipOutZ;}
949  inline FLTNB GetOffsetX()
950  {return m_offsetX;}
956  inline FLTNB GetOffsetY()
957  {return m_offsetY;}
963  inline FLTNB GetOffsetZ()
964  {return m_offsetZ;}
970  inline void SetOffsetX(FLTNB a_offsetX)
971  {m_offsetX = a_offsetX;}
977  inline void SetOffsetY(FLTNB a_offsetY)
978  {m_offsetY = a_offsetY;}
984  inline void SetOffsetZ(FLTNB a_offsetZ)
985  {m_offsetZ = a_offsetZ;}
994  FLTNB GetQuantificationFactor(int a_bed, int a_frame, int a_respGate, int a_cardGate);
999  inline long double GetLambda() {return m_lambda;}
1008  int SetCalibrationFactor(int a_bed, FLTNB a_calibrationFactor);
1017  int SetPETIsotope(int a_bed, const string& a_isotope);
1026  int SetSPECTIsotope(int a_bed, const string& a_isotope);
1034  int SetDynamicSpecificQuantificationFactors(const string& a_quantificationFile);
1040  inline void SetIgnoredCorrections(const string& a_ignoredCorrectionsList)
1041  {m_ignoredCorrectionsList = a_ignoredCorrectionsList;}
1048  {return m_ignoreAttnCorrectionFlag;}
1055  {return m_ignoreNormCorrectionFlag;}
1062  {return m_ignoreScatCorrectionFlag;}
1069  {return m_ignoreRandCorrectionFlag;}
1076  {return m_ignoreDecaCorrectionFlag;}
1083  {return m_ignoreBratCorrectionFlag;}
1090  {return m_ignoreFdurCorrectionFlag;}
1097  {return m_ignoreCaliCorrectionFlag;}
1104  {return m_nbMultiModalImages;}
1110  inline int GetNbFramesToSkip()
1111  {return m_nbFramesToSkip;}
1117  inline void SetNbMultiModalImages(int a_nbMultiModalImages)
1118  {m_nbMultiModalImages = a_nbMultiModalImages;}
1124  inline void SetTimeStaticFlag(bool a_flag)
1125  {m_timeStaticFlag = a_flag ;}
1131  inline void SetRespStaticFlag(bool a_flag)
1132  {m_respStaticFlag = a_flag ;}
1138  inline void SetCardStaticFlag(bool a_flag)
1139  {m_cardStaticFlag = a_flag ;}
1145  inline void SetnbFramesToSkip(int a_FramesToSkip)
1146  {m_nbFramesToSkip = a_FramesToSkip ;}
1151  inline bool IsInitialized() {return m_initialized;}
1152 
1153 
1154  // -----------------------------------------------------------------------------------------
1155  // Data members
1156  private:
1158  // oDynamicModelManager* mp_DynamicModelManager; /*!< oDynamicModelManager object related to dynamic model management*/
1159  // Number of threads
1162  // MPI size and rank
1165  // Number of beds
1166  int m_nbBeds;
1169  // Framing of the acquisition
1170  string m_frameList;
1182  // Quantification
1193  long double m_lambda;
1194  // Respiratory gating
1200  // Cardiac gating
1206  // Image discretization
1221  // Percentage of transaxial FOV unmasked before saving
1224  // Output flip
1225  bool m_flipOutX;
1226  bool m_flipOutY;
1227  bool m_flipOutZ;
1228  // Parameters checked
1229  bool m_checked;
1230  // Object initialized
1232  // Verbose
1235 };
1236 
1237 #endif
int GetPMotionLastIndexForFrame(int a_fr)
if patient motion is enabled, return the last index of patient motion for the frame fr...
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.
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.
Definition: vDataFile.hh:102
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
oImageDimensionsAndQuantification()
The constructor of oImageDimensionsAndQuantification.
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&#39;s size along the Z axis, in mm.
void SetRespMotionFlagOn()
set the respiratory motion flag to &#39;true&#39;
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.
#define FLTNB
Definition: gVariables.hh:81
void SetCardMotionFlagOn()
set the cardiac motion flag to &#39;true&#39;
bool GetIgnoreBratCorrectionFlag()
Get the boolean that says if the branching ratio correction is ignored or not.
int GetCurrentPMotionIndex(int a_th)
call the eponym function from the oDynamicDataManager object
FLTNB GetVoxSizeX()
Get the voxel&#39;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.
void SetFOVSizeY(FLTNB a_fovSizeY)
Set the FOV&#39;s size along the Y axis, in mm.
void SetNbVoxZ(INTNB a_nbVoxZ)
Set the number of voxels along the Z axis.
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
FLTNB GetVoxSizeZ()
Get the voxel&#39;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...
int GetPMotionFirstIndexForFrame(int a_fr)
call the eponym function from the oDynamicDataManager object
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 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...
FLTNB GetListPMotionWeightInFrameForLMS(int a_fr, int a_pmsset)
return the weight of a patient motion subset in terms of duration, for a specific frame ...
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
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.
int GetCurrentRespGate(int a_th)
call the eponym function from the oDynamicDataManager object
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&#39;s size along the Y axis, in mm.
int GetPMotionFirstIndexForFrame(int a_fr)
if patient motion is enabled, return the first index of patient motion for the frame fr...
void SetCardStaticFlag(bool a_flag)
Set the Cardiac Static Flag.
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
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.
void SetMPIRankAndSize(int a_mpiRank, int a_mpiSize)
Set the MPI rank of the MPI instance, and the MPI size (the number of instances)
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&#39;s size along the X axis, in mm.
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 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&#39;s size along the Y axis, in mm.
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.
void SetVoxSizeX(FLTNB a_voxSizeX)
Set the voxel&#39;s size along the X axis, in mm.
Declaration of class oArterialInputCurve.
void SetRespStaticFlag(bool a_flag)
Set the Respiratory Static Flag.
int InitDynamicData(string a_pathTo4DDataSplittingFile, int a_respMotionCorrectionFlag, int a_cardMotionCorrectionFlag, int a_invMotionCorrectionFlag, int a_nbRespGates, int a_nbCardGates)
Call the eponym function from the oDynamicDataManager object in order to initialize its data...
FLTNB GetTimeBasisCoefficient(int a_timeBasisFunction, int a_timeFrame)
Get the time basis coefficients for the provided frame and basis function.
bool GetTimeStaticFlag()
Get the time static flag that says if the reconstruction has only one frame or not.
int GetPMotionLastIndexForFrame(int a_fr)
call the eponym function from the oDynamicDataManager object
void SetnbFramesToSkip(int a_FramesToSkip)
Set the number of frames to skip when used with ImageBasedDynamicModel.
FLTNB GetOffsetY()
Get the image offset along the Y axis, in mm.
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.
#define INTNB
Definition: gVariables.hh:92
bool GetFlipOutY()
Get the boolean saying if the output image must be flipped along the Y axis.
INTNB GetNbVoxDiagonal()
Get an estimation of the number of voxels along the image diagonal.
void SetVoxSizeZ(FLTNB a_voxSizeZ)
Set the voxel&#39;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.
uint32_t * GetFramesTimeStartsArray(int a_bed)
Get the array of frame start times for a bed in Ms at uint32_t.
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.
void SetTimeBasisFunctions(FLTNB **a_m2pTimeBasisFunctions)
Set the basis functions array, calculated by the DynamicModelManager or the DynamicModel.
uint32_t * GetFramesTimeDurationsArray(int a_bed)
Get the array of frame duration times for a bed in Ms at uint32_t.
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
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 cardiac basis functions coefficients.
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...
void SetRespBasisFunctions(FLTNB **a_m2pRespBasisFunctions)
Set the basis functions array, calculated by the DynamicModelManager or the DynamicModel.
bool GetFlipOutZ()
Get the boolean saying if the output image must be flipped along the Z axis.
int GetCurrentRespImage(int a_th)
call the eponym function from the oDynamicDataManager object
int SetAcquisitionTime(int a_bed, FLTNB a_timeStartInSec, FLTNB a_durationInSec, string a_GateListDurationsInSec)
Set the acquisition time if not already set by the SetTimeFrames()
int InitializeIgnoredCorrections()
A function used to initialize the ignored corrections.
int GetNbRespBasisFunctions()
Get the number of respiratory basis functions.
int GetMPIRank()
Get the MPI instance number (the rank)
FLTNB GetListPMotionWeightInFrameForLMS(int a_fr, int a_pmsset)
call the eponym function from the oDynamicDataManager object
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 &#39;true&#39;
int SetDynamicSpecificQuantificationFactors(const string &a_quantificationFile)
Apply specific quantification factors manually provided as an option.
void SetTimeStaticFlag(bool a_flag)
Set the Time Static Flag - to be used with Time Basis functions for direct dynamic reconstruction...
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.