CASToR
1.1
Tomographic Reconstruction (PET/SPECT)
|
This class gathers the information about the dynamic splitting of the data. More...
#include <oDynamicDataManager.hh>
Public Member Functions | |
oDynamicDataManager () | |
oDynamicDataManager constructor. Initialize the member variables to their default values. More... | |
~oDynamicDataManager () | |
oDynamicDataManager destructor. More... | |
int | InitDynamicData (int a_nbRespGates, int a_nbCardGates, const string &a_pathTo4DDataSplittingFile, int a_rmMCorrFlag, int a_cMmCorrFlag, int a_dmCorrFlag, int a_pMotionCorrFlag) |
Main function for instanciation and initialization of the member variables and arrays. Call the specific initialization function depending of the type of dataset. More... | |
int | SetDynamicSpecificQuantificationFactors (FLTNB **a2p_quantificationFactors) |
Compute gate-specific quantificative factors using the number of events within each gate, and update the quantitative factors passed in argument. More... | |
int | CheckParameters (int64_t a_nbEvents) |
Check all mandatory parameters. More... | |
void | ResetCurrentDynamicIndices () |
Reset to 0 the multithreaded dynamic arrays gathering the indices of current frame, gates and involuntary motion. More... | |
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 belongs to a new respiratory/cardiac/involuntary motion gate Increment the index reporting the current relative gate in this case. More... | |
void | SetVerbose (int a_verboseLevel) |
set verbosity More... | |
void | SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification) |
set the pointer to the oImageDimensionsAndQuantification object More... | |
void | SetRespMotionFlagOn () |
set the respiratory motion flag to 'true' More... | |
void | SetCardMotionFlagOn () |
set the cardiac motion flag to 'true' More... | |
void | SetPMotionFlagOn () |
set the involuntary patient motion flag to 'true' More... | |
bool | IsRespMotionEnabled () |
bool | IsCardMotionEnabled () |
bool | IsPMotionEnabled () |
int | GetCurrentPMotionIndex (int a_th) |
return the number of the current involuntary patient motion image to be used in the ImageSpace matrices, for this thread More... | |
int | GetCurrentTimeFrame (int a_th) |
Return the index indicating the current time frame for this thread. More... | |
int | GetCurrentRespGate (int a_th) |
Return the index indicating the current respiratory gate for this thread. More... | |
int | GetCurrentRespImage (int a_th) |
return the number of the current respiratory gated image, to be used in the ImageSpace matrices for the reconstruction More... | |
int | GetCurrentCardGate (int a_th) |
Return the index indicating the current cardiac gate for this thread. More... | |
int | GetCurrentCardImage (int a_th) |
return the number of the current cardiac gated image, to be used in the ImageSpace matrices for the reconstruction More... | |
int | GetSensNbCardGates () |
return the number of cardiac images to be used in the ImageSpace matrices for the list-mode sensitivity image generation More... | |
int | GetSensNbRespGates () |
int | GetNbIPatMotionSubsets () |
return the number of involuntary patient motion transformations More... | |
Private Member Functions | |
int | InitDynamicDataGating (const string &a_pathToGateFile) |
Initialisation of arrays containing informations about the data splitting and respiratory/cardiac gated reconstruction. More... | |
int | InitDynamicDataPatientMotion (const string &a_pathToFile) |
Initialisation of involuntary patient motion correction information, if any. More... | |
Private Attributes | |
oImageDimensionsAndQuantification * | mp_ID |
int | m_verbose |
int * | mp_currentFrameIndex |
int | m_nbTimeFrames |
bool | m_respGatingFlag |
bool | m_rMotionCorrFlag |
int | m_nbRespGates |
int64_t ** | m2p_nbEventsPerRespGate |
int64_t ** | m2p_indexLastEventRespGate |
int * | mp_currentRespGateIndex |
bool | m_cardGatingFlag |
bool | m_cMotionCorrFlag |
int | m_nbCardGates |
int64_t ** | m2p_nbEventsPerCardGate |
int64_t ** | m2p_indexLastEventCardGate |
int * | mp_currentCardGateIndex |
bool | m_pMotionCorrFlag |
int | m_nbPMotionTriggers |
uint32_t * | mp_listPMotionTriggers |
int * | mp_currentPMotionIndex |
This class gathers the information about the dynamic splitting of the data.
It contains the functions dedicated to the reading of user-provided informations about the dynamic dataset.
It is specific to each iDataFile object.
It holds several arrays related to the 4D splitting of the data, the current gates indices, as well as the related functions.
Definition at line 33 of file oDynamicDataManager.hh.
oDynamicDataManager::oDynamicDataManager | ( | ) |
oDynamicDataManager constructor. Initialize the member variables to their default values.
Definition at line 31 of file oDynamicDataManager.cc.
oDynamicDataManager::~oDynamicDataManager | ( | ) |
oDynamicDataManager destructor.
Definition at line 62 of file oDynamicDataManager.cc.
int oDynamicDataManager::CheckParameters | ( | int64_t | a_nbEvents | ) |
Check all mandatory parameters.
a_nbEvents | : Number of events in the acquisition, used to check consistency with the gating metadata |
Definition at line 407 of file oDynamicDataManager.cc.
int oDynamicDataManager::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 belongs to a new respiratory/cardiac/involuntary motion gate
Increment the index reporting the current relative gate in this case.
a_currentEventIndex | : Index of the current event in the iterative reconstruction loop |
a_currentTime | : Timestamp of the current event in the iterative reconstruction loop |
a_bed | |
a_th |
Definition at line 523 of file oDynamicDataManager.cc.
|
inline |
Return the index indicating the current cardiac gate for this thread.
a_th |
Definition at line 193 of file oDynamicDataManager.hh.
|
inline |
return the number of the current cardiac gated image, to be used in the ImageSpace matrices for the reconstruction
a_th |
if cardiac motion correction is enabled in reconstruction, the function returns 0 as only one image is reconstructed for each gate
Definition at line 202 of file oDynamicDataManager.hh.
|
inline |
return the number of the current involuntary patient motion image to be used in the ImageSpace matrices, for this thread
a_th |
Definition at line 160 of file oDynamicDataManager.hh.
|
inline |
Return the index indicating the current respiratory gate for this thread.
a_th |
Definition at line 176 of file oDynamicDataManager.hh.
|
inline |
return the number of the current respiratory gated image, to be used in the ImageSpace matrices for the reconstruction
a_th |
if respiratory motion correction is enabled in reconstruction, the function returns 0 as only one image is reconstructed for each gate
Definition at line 185 of file oDynamicDataManager.hh.
|
inline |
Return the index indicating the current time frame for this thread.
a_th |
Definition at line 168 of file oDynamicDataManager.hh.
|
inline |
return the number of involuntary patient motion transformations
Definition at line 223 of file oDynamicDataManager.hh.
|
inline |
return the number of cardiac images to be used in the ImageSpace matrices for the list-mode sensitivity image generation
Definition at line 209 of file oDynamicDataManager.hh.
|
inline |
int oDynamicDataManager::InitDynamicData | ( | int | a_nbRespGates, |
int | a_nbCardGates, | ||
const string & | a_pathTo4DDataSplittingFile, | ||
int | a_rmMCorrFlag, | ||
int | a_cMmCorrFlag, | ||
int | a_dmCorrFlag, | ||
int | a_pMotionCorrFlag | ||
) |
Main function for instanciation and initialization of the member variables and arrays. Call the specific initialization function depending of the type of dataset.
a_nbRespGates | |
a_nbCardGates | |
a_pathTo4DDataFile | : path to an ASCII file containing dynamic metadata regarding the acquisition |
a_rmCorrFlag | : indicate whether respiratory motion correction is enabled (1) or disabled (0) |
a_cmCorrFlag | : indicate whether cardiac motion correction is enabled (1) or disabled (0) |
a_dmCorrFlag | : indicate whether simultaneous respiratory and cardiac motion corrections are enabled (1) or disabled (0) |
a_pmCorrFlag | : indicate whether involuntary patient motion correction is enabled (1) or disabled (0) |
Definition at line 104 of file oDynamicDataManager.cc.
|
private |
Initialisation of arrays containing informations about the data splitting and respiratory/cardiac gated reconstruction.
a_pathToFile | : path to an ASCII file containing dynamic metadata regarding the acquisition |
Definition at line 234 of file oDynamicDataManager.cc.
|
private |
Initialisation of involuntary patient motion correction information, if any.
a_pathToFile | : path to an ASCII file containing dynamic metadata regarding the acquisition |
Definition at line 310 of file oDynamicDataManager.cc.
|
inline |
Definition at line 146 of file oDynamicDataManager.hh.
|
inline |
Definition at line 152 of file oDynamicDataManager.hh.
|
inline |
Definition at line 140 of file oDynamicDataManager.hh.
void oDynamicDataManager::ResetCurrentDynamicIndices | ( | ) |
Reset to 0 the multithreaded dynamic arrays gathering the indices of current frame, gates and involuntary motion.
Definition at line 489 of file oDynamicDataManager.cc.
|
inline |
set the cardiac motion flag to 'true'
Definition at line 128 of file oDynamicDataManager.hh.
int oDynamicDataManager::SetDynamicSpecificQuantificationFactors | ( | FLTNB ** | a2p_quantificationFactors | ) |
Compute gate-specific quantificative factors using the number of events within each gate, and update the quantitative factors passed in argument.
FLTNB** | a2p_quantificationFactors : 2 dimensional [timeframe][gate] set of quantitative factors to update |
Definition at line 353 of file oDynamicDataManager.cc.
|
inline |
set the pointer to the oImageDimensionsAndQuantification object
ap_ImageDimensionsAndQuantification |
Definition at line 116 of file oDynamicDataManager.hh.
|
inline |
set the involuntary patient motion flag to 'true'
Definition at line 134 of file oDynamicDataManager.hh.
|
inline |
set the respiratory motion flag to 'true'
Definition at line 122 of file oDynamicDataManager.hh.
|
inline |
set verbosity
a_verboseLevel |
Definition at line 109 of file oDynamicDataManager.hh.
|
private |
2 dimensional array [nb frames][nb resp gates] containing the last event in the cardiac gates
Definition at line 272 of file oDynamicDataManager.hh.
|
private |
2 dimensional array [nb frames][nb resp gates] containing the last event in the respiratory gates
Definition at line 264 of file oDynamicDataManager.hh.
|
private |
2 dimensional array [nb frames][nb resp gates] containing the number of events in each cardiac gates.
Definition at line 271 of file oDynamicDataManager.hh.
|
private |
2 dimensional array [nb frames][nb resp gates] containing the number of events in each respiratory gates
Definition at line 263 of file oDynamicDataManager.hh.
|
private |
Flag indicating if cardiac gating is enabled
Definition at line 268 of file oDynamicDataManager.hh.
|
private |
Flag indicating if patient involuntary motion correction is enabled
Definition at line 269 of file oDynamicDataManager.hh.
|
private |
Number of gates for cardiac motion correction
Definition at line 270 of file oDynamicDataManager.hh.
|
private |
Number of triggers for patient involuntary motion correction
Definition at line 277 of file oDynamicDataManager.hh.
|
private |
Number of gates for respiratory motion correction
Definition at line 262 of file oDynamicDataManager.hh.
|
private |
Number of time frames
Definition at line 257 of file oDynamicDataManager.hh.
|
private |
Flag indicating if patient involuntary motion correction is enabled
Definition at line 276 of file oDynamicDataManager.hh.
|
private |
Flag indicating if respiratory gating is enabled
Definition at line 260 of file oDynamicDataManager.hh.
|
private |
Flag indicating if respiratory motion correction is enabled
Definition at line 261 of file oDynamicDataManager.hh.
|
private |
Verbosity
Definition at line 253 of file oDynamicDataManager.hh.
|
private |
Multithreaded array [nb threads] containing the index of the current cardiac gate in use
Definition at line 273 of file oDynamicDataManager.hh.
|
private |
Multithreaded array [nb threads] containing the index of the current frame in use
Definition at line 256 of file oDynamicDataManager.hh.
|
private |
Multithreaded array [nb threads] containing the index for patient involuntary motion correction
Definition at line 279 of file oDynamicDataManager.hh.
|
private |
Multithreaded array [nb threads] containing the index of the current respiratory gate in use
Definition at line 265 of file oDynamicDataManager.hh.
|
private |
Pointer to the oImageDimensionsAndQuantification object
Definition at line 252 of file oDynamicDataManager.hh.
|
private |
Array containing the timestamp of each trigger of the patient involuntary motion correction
Definition at line 278 of file oDynamicDataManager.hh.