CASToR  3.1
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-2020 all CASToR contributors listed below:
18 
19  --> Didier BENOIT, Claude COMTAT, Marina FILIPOVIC, Thibaut MERLIN, Mael MILLARDET, Simon STUTE, Valentin VIELZEUF, Zacharias CHALAMPALAKIS
20 
21 This is CASToR version 3.1.
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 
378  inline HPFLTNB GetdurationPerGate(int a_fr, int a_respGate)
379  {return mp_DynamicDataManager->GetDurationPerGate(a_fr,a_respGate);}
380 
385  inline bool GateDurationProvided()
387 
392  inline int GetDynRecoType()
393  {return m_DynRecoTypeFlag;}
394 
395 
396  // -----------------------------------------------------------------------------------------
397  // Get & Set functions
398  public:
404  inline void SetVerbose(int a_verbose)
405  {m_verbose = a_verbose;}
412  {return m_nbThreadsForProjection;}
425  inline int GetNbThreadsMax()
427  else return m_nbThreadsForImageComputation; }
436  int SetNbThreads(const string& a_nbThreads);
443  inline void SetMPIRankAndSize(int a_mpiRank, int a_mpiSize)
444  {m_mpiRank = a_mpiRank; m_mpiSize = a_mpiSize;}
450  inline int GetMPISize()
451  {return m_mpiSize;}
457  inline int GetMPIRank()
458  {return m_mpiRank;}
464  inline int GetNbBeds()
465  {return m_nbBeds;}
471  inline void SetNbBeds(int a_nbBeds)
472  {m_nbBeds = a_nbBeds; if (mp_bedPositions!=NULL) free(mp_bedPositions); mp_bedPositions = (FLTNB*)calloc(m_nbBeds,sizeof(FLTNB));}
479  inline FLTNB GetBedPosition(int a_bedIndex)
480  {return mp_bedPositions[a_bedIndex];}
492  inline int GetNbTimeFrames()
493  {return m_nbTimeFrames;}
500  {return m_nbTimeBasisFunctions;}
508  inline FLTNB GetTimeBasisCoefficient(int a_timeBasisFunction, int a_timeFrame)
509  {return m2p_timeBasisFunctions[a_timeBasisFunction][a_timeFrame];}
517  inline FLTNB GetFrameDurationInSec(int a_bed, int a_frame)
518  {return ((FLTNB)(m2p_frameDurationsInMs[a_bed][a_frame]))/1000.;}
526  inline FLTNB GetFrameTimeStartInSec(int a_bed, int a_frame)
527  {return ((FLTNB)(m2p_frameTimeStartInMs[a_bed][a_frame]))/1000.;}
535  inline FLTNB GetFrameTimeStopInSec(int a_bed, int a_frame)
536  {return ((FLTNB)(m2p_frameTimeStopInMs[a_bed][a_frame]))/1000.;}
543  inline FLTNB GetFinalTimeStopInSec(int a_bed)
544  {return ((FLTNB)(m2p_frameTimeStopInMs[a_bed][m_nbTimeFrames-1]))/1000.;}
552  inline uint32_t GetFrameDurationInMs(int a_bed, int a_frame)
553  {return m2p_frameDurationsInMs[a_bed][a_frame];}
561  inline uint32_t GetFrameTimeStartInMs(int a_bed, int a_frame)
562  {return m2p_frameTimeStartInMs[a_bed][a_frame];}
570  inline uint32_t GetFrameTimeStopInMs(int a_bed, int a_frame)
571  {return m2p_frameTimeStopInMs[a_bed][a_frame];}
578  inline uint32_t GetFinalTimeStopInMs(int a_bed)
579  {return m2p_frameTimeStopInMs[a_bed][m_nbTimeFrames-1];}
586  inline uint32_t* GetFramesTimeStartsArray(int a_bed)
587  {return m2p_frameTimeStartInMs[a_bed];}
594  inline uint32_t* GetFramesTimeStopArray(int a_bed)
595  {return m2p_frameTimeStopInMs[a_bed];}
602  inline uint32_t* GetFramesTimeDurationsArray(int a_bed)
603  {return m2p_frameDurationsInMs[a_bed];}
609  inline void SetFrames(const string& a_frameList)
610  {m_frameList = a_frameList;}
616  // TODO: Remove this function and option from castor-recon
617  inline void SetNbTimeBasisFunctions(int a_nbTimeBasisFunctions)
618  {m_nbTimeBasisFunctions = a_nbTimeBasisFunctions;}
624  inline void SetTimeBasisFunctions(FLTNB** a_m2pTimeBasisFunctions)
625  {m2p_timeBasisFunctions = a_m2pTimeBasisFunctions;}
631  inline void SetRespBasisFunctions(FLTNB** a_m2pRespBasisFunctions)
632  {m2p_respBasisFunctions = a_m2pRespBasisFunctions;}
638  inline void SetCardBasisFunctions(FLTNB** a_m2pCardBasisFunctions)
639  {m2p_cardBasisFunctions = a_m2pCardBasisFunctions;}
650  int SetAcquisitionTime(int a_bed, FLTNB a_timeStartInSec, FLTNB a_durationInSec, string a_GateListDurationsInSec);
656  inline bool GetTimeStaticFlag()
657  {return m_timeStaticFlag;}
663  inline int GetNbRespGates()
664  {return m_nbRespGates;}
671  {return m_nbRespBasisFunctions;}
679  inline FLTNB GetRespBasisCoefficient(int a_respBasisFunction, int a_respGate)
680  {return m2p_respBasisFunctions[a_respBasisFunction][a_respGate];}
686  inline void SetNbRespGates(int a_nbRespGates)
687  {m_nbRespGates = a_nbRespGates;}
693  inline void SetNbRespBasisFunctions(int a_nbRespBasisFunctions)
694  {m_nbRespBasisFunctions = a_nbRespBasisFunctions;}
700  inline void SetRespBasisFunctionsFile(const string& a_respBasisFunctionsFile)
701  {m_respBasisFunctionsFile = a_respBasisFunctionsFile;}
707  inline bool GetRespStaticFlag()
708  {return m_respStaticFlag;}
714  inline int GetNbCardGates()
715  {return m_nbCardGates;}
722  {return m_nbCardBasisFunctions;}
730  inline FLTNB GetCardBasisCoefficient(int a_cardBasisFunction, int a_cardGate)
731  {return m2p_cardBasisFunctions[a_cardBasisFunction][a_cardGate];}
737  inline void SetNbCardGates(int a_nbCardGates)
738  {m_nbCardGates = a_nbCardGates;}
744  inline void SetNbCardBasisFunctions(int a_nbCardBasisFunctions)
745  {m_nbCardBasisFunctions = a_nbCardBasisFunctions;}
751  inline void SetCardBasisFunctionsFile(const string& a_cardBasisFunctionsFile)
752  {m_cardBasisFunctionsFile = a_cardBasisFunctionsFile;}
758  inline bool GetCardStaticFlag()
759  {return m_cardStaticFlag;}
765  inline INTNB GetNbVoxX()
766  {return m_nbVoxX;}
772  inline INTNB GetNbVoxY()
773  {return m_nbVoxY;}
779  inline INTNB GetNbVoxZ()
780  {return m_nbVoxZ;}
786  inline INTNB GetNbVoxXY()
787  {return m_nbVoxXY;}
794  {return m_nbVoxXYZ;}
801  { return ((INTNB)(sqrt( ((FLTNB)m_nbVoxX) * ((FLTNB)m_nbVoxX) +
802  ((FLTNB)m_nbVoxY) * ((FLTNB)m_nbVoxY) +
803  ((FLTNB)m_nbVoxZ) * ((FLTNB)m_nbVoxZ) ))); }
809  inline void SetNbVoxX(INTNB a_nbVoxX)
810  {m_nbVoxX = a_nbVoxX;}
816  inline void SetNbVoxY(INTNB a_nbVoxY)
817  {m_nbVoxY = a_nbVoxY;}
823  inline void SetNbVoxZ(INTNB a_nbVoxZ)
824  {m_nbVoxZ = a_nbVoxZ;}
831  {return m_voxSizeX;}
838  {return m_voxSizeY;}
845  {return m_voxSizeZ;}
852  {return m_fovSizeX;}
859  {return m_fovSizeY;}
866  {return m_fovSizeZ;}
872  inline void SetVoxSizeX(FLTNB a_voxSizeX)
873  {m_voxSizeX = a_voxSizeX;}
879  inline void SetVoxSizeY(FLTNB a_voxSizeY)
880  {m_voxSizeY = a_voxSizeY;}
886  inline void SetVoxSizeZ(FLTNB a_voxSizeZ)
887  {m_voxSizeZ = a_voxSizeZ;}
893  inline void SetFOVSizeX(FLTNB a_fovSizeX)
894  {m_fovSizeX = a_fovSizeX;}
900  inline void SetFOVSizeY(FLTNB a_fovSizeY)
901  {m_fovSizeY = a_fovSizeY;}
907  inline void SetFOVSizeZ(FLTNB a_fovSizeZ)
908  {m_fovSizeZ = a_fovSizeZ;}
915  inline void SetFOVOutMasking(FLTNB a_fovOutPercent, INTNB a_nbSliceOutMask)
916  {m_fovOutPercent = a_fovOutPercent; m_nbSliceOutMask = a_nbSliceOutMask;}
923  {return m_fovOutPercent;}
930  {return m_nbSliceOutMask;}
937  int SetFlipOut(const string& a_flipOut);
943  inline bool GetFlipOutX()
944  {return m_flipOutX;}
950  inline bool GetFlipOutY()
951  {return m_flipOutY;}
957  inline bool GetFlipOutZ()
958  {return m_flipOutZ;}
964  inline FLTNB GetOffsetX()
965  {return m_offsetX;}
971  inline FLTNB GetOffsetY()
972  {return m_offsetY;}
978  inline FLTNB GetOffsetZ()
979  {return m_offsetZ;}
985  inline void SetOffsetX(FLTNB a_offsetX)
986  {m_offsetX = a_offsetX;}
992  inline void SetOffsetY(FLTNB a_offsetY)
993  {m_offsetY = a_offsetY;}
999  inline void SetOffsetZ(FLTNB a_offsetZ)
1000  {m_offsetZ = a_offsetZ;}
1009  FLTNB GetQuantificationFactor(int a_bed, int a_frame, int a_respGate, int a_cardGate);
1014  inline long double GetLambda() {return m_lambda;}
1023  int SetCalibrationFactor(int a_bed, FLTNB a_calibrationFactor);
1032  int SetPETIsotope(int a_bed, const string& a_isotope);
1041  int SetSPECTIsotope(int a_bed, const string& a_isotope);
1049  int SetDynamicSpecificQuantificationFactors(const string& a_quantificationFile);
1055  inline void SetIgnoredCorrections(const string& a_ignoredCorrectionsList)
1056  {m_ignoredCorrectionsList = a_ignoredCorrectionsList;}
1063  {return m_ignoreAttnCorrectionFlag;}
1070  {return m_ignoreNormCorrectionFlag;}
1077  {return m_ignoreScatCorrectionFlag;}
1084  {return m_ignoreRandCorrectionFlag;}
1091  {return m_ignoreDecaCorrectionFlag;}
1098  {return m_ignoreBratCorrectionFlag;}
1105  {return m_ignoreFdurCorrectionFlag;}
1112  {return m_ignoreCaliCorrectionFlag;}
1119  {return m_nbMultiModalImages;}
1125  inline int GetNbFramesToSkip()
1126  {return m_nbFramesToSkip;}
1132  inline void SetNbMultiModalImages(int a_nbMultiModalImages)
1133  {m_nbMultiModalImages = a_nbMultiModalImages;}
1139  inline void SetTimeStaticFlag(bool a_flag)
1140  {m_timeStaticFlag = a_flag ;}
1146  inline void SetRespStaticFlag(bool a_flag)
1147  {m_respStaticFlag = a_flag ;}
1153  inline void SetCardStaticFlag(bool a_flag)
1154  {m_cardStaticFlag = a_flag ;}
1160  inline void SetnbFramesToSkip(int a_FramesToSkip)
1161  {m_nbFramesToSkip = a_FramesToSkip ;}
1166  inline bool IsInitialized() {return m_initialized;}
1167 
1168 
1169  // -----------------------------------------------------------------------------------------
1170  // Data members
1171  private:
1173  // oDynamicModelManager* mp_DynamicModelManager; /*!< oDynamicModelManager object related to dynamic model management*/
1174  // Number of threads
1177  // MPI size and rank
1180  // Number of beds
1181  int m_nbBeds;
1184  // Framing of the acquisition
1185  string m_frameList;
1197  // Quantification
1208  long double m_lambda;
1209  // Respiratory gating
1215  // Cardiac gating
1221  // Image discretization
1236  // Percentage of transaxial FOV unmasked before saving
1239  // Output flip
1240  bool m_flipOutX;
1241  bool m_flipOutY;
1242  bool m_flipOutZ;
1243  // Parameters checked
1244  bool m_checked;
1245  // Object initialized
1247  // Verbose
1250 };
1251 
1252 #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
#define HPFLTNB
Definition: gVariables.hh:83
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.
HPFLTNB GetdurationPerGate(int a_fr, int a_respGate)
call the eponym function from the oDynamicDataManager object
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
HPFLTNB GetDurationPerGate(int a_fr, int a_respGate)
return the duration of a gate for a specific frame
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.