103 if (a_nbIterationsSubsets==
"")
return 0;
108 string buf = a_nbIterationsSubsets;
112 while ((pos_comma=buf.find_first_of(
","))!=string::npos)
115 string sub_buf = buf.substr(0,pos_comma);
117 size_t pos_column = sub_buf.find_first_of(
":");
118 if (pos_column==string::npos || pos_column==0)
120 Cerr(
"***** oIterativeAlgorithm::SetNbIterationsAndSubsets() -> Syntax problem in number of iterations and subsets !" << endl);
123 int iter = atoi( sub_buf.substr(0,pos_column).c_str() );
124 int subs = atoi( sub_buf.substr(pos_column+1).c_str() );
126 for (
int it=0; it<iter; it++) mp_nbSubsets[
m_nbIterations+it] = subs;
128 buf = buf.substr(pos_comma+1);
132 size_t pos_column = buf.find_first_of(
":");
133 if (pos_column==string::npos || pos_column==0)
135 Cerr(
"***** oIterativeAlgorithm::SetNbIterationsAndSubsets() -> Syntax problem in number of iterations and subsets !" << endl);
138 int iter = atoi( buf.substr(0,pos_column).c_str() );
139 int subs = atoi( buf.substr(pos_column+1).c_str() );
140 mp_nbSubsets = (
int*)realloc(mp_nbSubsets,(
m_nbIterations+iter)*
sizeof(int));
141 for (
int it=0; it<iter; it++) mp_nbSubsets[
m_nbIterations+it] = subs;
146 Cout(
"oIterativeAlgorithm::SetNbIterationsAndSubsets() -> Selected numbers of subsets for each iteration:" << endl);
147 Cout(
" Iteration / number of subsets "<< endl);
148 for (
int it=0 ; it<
m_nbIterations ; it++)
Cout(
" " << it+1 <<
" / " << mp_nbSubsets[it] << endl);
171 if(
m_verbose>=2)
Cout(
"oIterativeAlgorithm::SetOutputIterations ..."<< endl);
178 if (a_outputIterations==
"")
185 string buf = a_outputIterations;
189 int current_iteration = -1;
190 while ((pos_comma=buf.find_first_of(
","))!=string::npos)
193 string sub_buf = buf.substr(0,pos_comma);
195 size_t pos_column = sub_buf.find_first_of(
":");
196 if (pos_column==string::npos || pos_column==0)
198 Cerr(
"***** oIterativeAlgorithm::SetOutputIterations() -> Syntax problem in output iteration numbers !" << endl);
201 int step_iteration = atoi( sub_buf.substr(0,pos_column).c_str() );
202 if (step_iteration<=0)
204 Cerr(
"***** oIterativeAlgorithm::SetOutputIterations() -> Iteration step must be strictly positive (here it is " << step_iteration <<
") !" << endl);
207 int stop_iteration = atoi( sub_buf.substr(pos_column+1).c_str() );
208 if (stop_iteration<=current_iteration)
210 Cerr(
"***** oIterationAlgorithm::SetOutputIterations() -> Output iteration number must be increasing through provided couples !" << endl);
213 for (
int it=current_iteration+step_iteration; it<stop_iteration; it+=step_iteration)
mp_outputIterations[it] =
true;
214 current_iteration = stop_iteration-1;
215 buf = buf.substr(pos_comma+1);
219 size_t pos_column = buf.find_first_of(
":");
220 if (pos_column==string::npos || pos_column==0)
231 Cerr(
"***** oIterativeAlgorithm::SetOutputIterations() -> Syntax problem in output iteration numbers !" << endl);
235 int step_iteration = atoi( buf.substr(0,pos_column).c_str() );
236 if (step_iteration<=0)
238 Cerr(
"***** oIterativeAlgorithm::SetOutputIterations() -> Iteration step must be strictly positive (here it is " << step_iteration <<
") !" << endl);
241 int stop_iteration = atoi( buf.substr(pos_column+1).c_str() );
242 if (stop_iteration<=current_iteration)
244 Cerr(
"***** oIterationAlgorithm::SetOutputIterations() -> Output iteration number must be increasing through provided couples !" << endl);
247 for (
int it=current_iteration+step_iteration; it<stop_iteration; it+=step_iteration)
mp_outputIterations[it] =
true;
264 if(
m_verbose>=2)
Cout(
"oIterativeAlgorithm::Iterate ..."<< endl);
305 MPI_Barrier(MPI_COMM_WORLD);
312 clock_t clock_start_whole = clock();
313 time_t time_start_whole = time(NULL);
318 Cerr(
"***** oIterativeAlgorithm::IterateCPU() -> A problem occured while calling StepBeforeIterationLoop() function !" << endl);
329 Cerr(
"***** oIterativeAlgorithm::IterateCPU() -> A problem occured while calling StepBeforeSubsetLoop() function !" << endl);
334 for (
int subset=0 ; subset<mp_nbSubsets[iteration] ; subset++)
339 Cout(
"oIterativeAlgorithm::IterateCPU() -> Start iteration " << iteration+1 <<
"/" << m_nbIterations
340 <<
" subset " << subset+1 <<
"/" << mp_nbSubsets[iteration] << endl);
344 clock_t clock_start_subset = clock();
345 time_t time_start_subset = time(NULL);
350 Cerr(
"***** oIterativeAlgorithm::IterateCPU() -> A problem occured while calling StepPreProcessInsideSubsetLoop() function !" << endl);
356 MPI_Barrier(MPI_COMM_WORLD);
360 for (
int bed=0 ; bed<
m_nbBeds ; bed++)
365 Cerr(
"***** oIterativeAlgorithm::IterateCPU() -> A problem occured while calling StepInnerLoopInsideSubsetLoop() function !" << endl);
372 MPI_Barrier(MPI_COMM_WORLD);
378 Cerr(
"***** oIterativeAlgorithm::IterateCPU() -> A problem occured while calling StepPostProcessInsideSubsetLoop() function !" << endl);
383 clock_t clock_stop_subset = clock();
384 time_t time_stop_subset = time(NULL);
385 if (
m_verbose>=2)
Cout (
"oIterativeAlgorithm::IterateCPU() -> Time spent for subset " << subset+1 <<
" | User: " << time_stop_subset-time_start_subset
386 <<
" sec | CPU: " << (clock_stop_subset-clock_start_subset)/((
FLTNB)CLOCKS_PER_SEC) <<
" sec" << endl);
395 Cerr(
"***** oIterativeAlgorithm::IterateCPU() -> A problem occured while calling StepAfterSubsetLoop() function !" << endl);
405 Cerr(
"***** oIterativeAlgorithm::IterateCPU() -> A problem occured while calling StepAfterIterationLoop() function !" << endl);
410 clock_t clock_stop_whole = clock();
411 time_t time_stop_whole = time(NULL);
412 if (
m_verbose>=1)
Cout(
"oIterativeAlgorithm::IterateCPU() -> Total time spent | User: " << time_stop_whole-time_start_whole
413 <<
" sec | CPU: " << (clock_stop_whole-clock_start_whole)/((
FLTNB)CLOCKS_PER_SEC) <<
" sec" << endl);
432 if (
m_verbose>=2)
Cout(
"oIterativeAlgorithm::StepBeforeIterationLoop ... " << endl);
437 Cerr(
"***** oIterativeAlgorithm::StepBeforeIterationLoop() -> Image space has not been created or was not checked !" << endl);
453 Cerr(
"***** oIterativeAlgorithm::StepBeforeIterationLoop() -> An error occured while reading the initialization image !" << endl);
459 Cerr(
"***** oIterativeAlgorithm::StepBeforeIterationLoop()-> Error during attenuation image initialization !" << endl);
465 Cerr(
"***** oIterativeAlgorithm::StepBeforeIterationLoop() -> An error occured while initializing the sensitivity image !" << endl);
471 Cerr(
"***** oIterativeAlgorithm::StepBeforeIterationLoop()-> Error during multimodal image initialization !" << endl);
477 Cerr(
"***** oIterativeAlgorithm::StepBeforeIterationLoop()-> Error during mask image initialization !" << endl);
497 if (
m_verbose>=3)
Cout(
"oIterativeAlgorithm::StepBeforeSubsetLoop ... " << endl);
521 if (
m_verbose>=3)
Cout(
"oIterativeAlgorithm::StepPreProcessInsideSubsetLoop ... " << endl);
535 Cerr(
"***** oIterativeAlgorithm::StepPreProcessInsideSubsetLoop() -> A problem occured while applyin image processing to forward image !" << endl);
543 Cerr(
"***** oIterativeAlgorithm::StepPreProcessInsideSubsetLoop() -> A problem occured while applying image convolver to forward image !" << endl);
584 if (
m_nbBeds>1)
Cout(
"oIterativeAlgorithm::StepInnerLoopInsideSubsetLoop() -> Start loop over events for bed " << a_bed+1 << endl << flush);
585 else Cout(
"oIterativeAlgorithm::StepInnerLoopInsideSubsetLoop() -> Start loop over events" << endl << flush);
597 cout <<
"0 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%" << endl;
598 cout <<
"|----|----|----|----|----|----|----|----|----|----|" << endl;
599 cout <<
"|" << flush;
601 int progression_percentage_old = 0;
602 int progression_nb_bars = 0;
603 uint64_t progression_printing_index = 0;
606 int64_t index_start = 0;
607 int64_t index_stop = 0;
616 MPI_Barrier(MPI_COMM_WORLD);
625 bool problem =
false;
633 #pragma omp parallel for private(index) schedule(static, 1)
634 for ( index = index_start ; index < index_stop ; index += mp_nbSubsets[a_iteration] )
639 th = omp_get_thread_num();
644 if (progression_printing_index%1000==0)
646 int progression_percentage_new = ((int)( (((
float)(index-index_start+1))/((float)(index_stop-index_start)) ) * 100.));
647 if (progression_percentage_new>=progression_percentage_old+2)
649 int nb_steps = (progression_percentage_new-progression_percentage_old)/2;
650 for (
int i=0; i<nb_steps; i++)
652 cout <<
"-" << flush;
653 progression_nb_bars++;
655 progression_percentage_old += nb_steps*2;
658 progression_printing_index++;
664 if (
m_verbose>=4)
Cout(
"oIterativeAlgorithm::StepInnerLoopInsideSubsetLoop() -> Step1: Get current event for that thread index " << endl);
669 Cerr(
"***** oIterativeAlgorithm::StepInnerLoopInsideSubsetLoop() -> An error occured while getting the event from index "
670 << index <<
" (thread " << th <<
") !" << endl);
683 Cout(
"oIterativeAlgorithm::StepInnerLoopInsideSubsetLoop() -> Step2: Check for Dynamic event (frame/gate switch, image-based deformation " << endl);
686 int dynamic_switch_value =
mp_ID->
DynamicSwitch(index, event->GetTimeInMs(), a_bed, th);
727 if (
m_verbose>=4)
Cout(
"oIterativeAlgorithm::StepInnerLoopInsideSubsetLoop() -> Step3: Compute the projection line " << endl);
732 Cerr(
"***** oIterativeAlgorithm::StepInnerLoopInsideSubsetLoop() -> A problem occured while computing the projection line !" << endl);
743 if (
m_verbose>=4)
Cout(
"oIterativeAlgorithm::StepInnerLoopInsideSubsetLoop() -> Step4: Optimize in the data space " << endl);
758 MPI_Barrier(MPI_COMM_WORLD);
769 int progression_total_bars = 49;
770 for (
int i=0; i<progression_total_bars-progression_nb_bars; i++) cout <<
"-";
777 Cerr(
"***** oIterativeAlgorithm::StepInnerLoopInsideSubsetLoop() -> A problem occured inside the parallel loop over events !" << endl);
804 if (
m_verbose>=3)
Cout(
"oIterativeAlgorithm::StepPostProcessInsideSubsetLoop ... " << endl);
822 Cerr(
"***** oIterativeAlgorithm::StepPostProcessInsideSubsetLoop() -> A problem occured while applying convolver to backward images !" << endl);
837 Cerr(
"***** oIterativeAlgorithm::StepPostProcessInsideSubsetLoop() -> A problem occured while applying convolver to current estimate images !" << endl);
845 Cerr(
"***** oIterativeAlgorithm::StepPostProcessInsideSubsetLoop() -> A problem occured while applying dynamic model to current estimate images !" << endl);
852 Cerr(
"***** oIterativeAlgorithm::StepPostProcessInsideSubsetLoop() -> A problem occured while applying image processing to current estimate images !" << endl);
863 stringstream temp_it; temp_it << a_iteration + 1;
864 stringstream temp_ss; temp_ss << a_subset + 1;
865 temp_sens.append(
"_it").append(temp_it.str()).append(
"_ss").append(temp_ss.str()).append(
"_sensitivity");
874 if (
m_verbose>=1)
Cout(
"oIterativeAlgorithm::StepPostProcessInsideSubsetLoop() -> Save image at iteration " << a_iteration+1 <<
" for subset " << a_subset+1 << endl);
881 Cerr(
"***** oIterativeAlgorithm::StepPostProcessInsideSubsetLoop() -> A problem occured while convolving the output image !" << endl);
888 Cerr(
"***** oIterativeAlgorithm::StepPostProcessInsideSubsetLoop() -> A problem occured while applying image processing the output image !" << endl);
894 Cerr(
"***** oIterativeAlgorithm::StepPostProcessInsideSubsetLoop() -> A problem occured while saving parametric images related to the dynamic model !" << endl);
900 Cerr(
"***** oIterativeAlgorithm::StepPostProcessInsideSubsetLoop() -> A problem occured while applying output FOV masking !" << endl);
906 Cerr(
"***** oIterativeAlgorithm::StepPostProcessInsideSubsetLoop() -> A problem occured while applying output flip !" << endl);
912 Cerr(
"***** oIterativeAlgorithm::StepPostProcessInsideSubsetLoop() -> A problem occured while saving output image !" << endl);
937 if (
m_verbose>=3)
Cout(
"oIterativeAlgorithm::StepAfterSubsetLoop ... " << endl);
947 if (
m_verbose>=1)
Cout(
"oIterativeAlgorithm::StepAfterSubsetLoop() -> Save image at iteration " << a_iteration+1 << endl);
954 Cerr(
"***** oIterativeAlgorithm::StepAfterSubsetLoop() -> A problem occured while convolving the output image !" << endl);
961 Cerr(
"***** oIterativeAlgorithm::StepAfterSubsetLoop() -> A problem occured while applying image processing the output image !" << endl);
967 Cerr(
"***** oIterativeAlgorithm::StepAfterSubsetLoop() -> A problem occured while saving parametric images related to the dynamic model !" << endl);
974 Cerr(
"***** oIterativeAlgorithm::StepAfterSubsetLoop() -> A problem occured while applying output FOV masking !" << endl);
980 Cerr(
"***** oIterativeAlgorithm::StepAfterSubsetLoop() -> A problem occured while applying output flip !" << endl);
986 Cerr(
"***** oIterativeAlgorithm::StepAfterSubsetLoop() -> A problem occured while saving output image !" << endl);
1008 if (
m_verbose>=2)
Cout(
"oIterativeAlgorithm::StepAfterIterationLoop ... " << endl);
1038 if (
m_verbose>=2)
Cout(
"oIterativeAlgorithm::InitSpecificOptions ... " << endl);
1061 if (
m_verbose>=4)
Cout(
"oIterativeAlgorithm::ThreadBarrierIncrement ... " << endl);
1064 #pragma omp critical(increment_waiting_threads)
1082 if (
m_verbose>=4)
Cout(
"oIterativeAlgorithm::ThreadBarrierFlag ... " << endl);
1086 #pragma omp flush(m_releaseThreads)
1102 if (
m_verbose>=4)
Cout(
"oIterativeAlgorithm::ThreadBarrierCheck ... " << endl);
1105 #pragma omp flush(m_nbThreadsWaiting) // Check any change in m_nbThreadsWaiting
1120 if (
m_verbose>=4)
Cout(
"oIterativeAlgorithm::ThreadBarrierSetOff ... " << endl);
1124 #pragma omp flush(m_releaseThreads) // Make sure the value of m_releaseThreads is propagated to other threads
1126 #pragma omp flush(m_nbThreadsWaiting) // Same for m_nbThreadsWaiting
1140 if (
m_verbose>=4)
Cout(
"oIterativeAlgorithm::ThreadBarrierSetOn ... " << endl);
1144 #pragma omp flush(m_releaseThreads) // Make sure the value of m_releaseThreads is propagated to other threads
1146 #pragma omp flush(m_nbThreadsWaiting) // Same for m_nbThreadsWaiting
void StopIterativeDataUpdateStep1(int a_thread)
Stop the timer for duration of iterative data update step 1.
int ApplyProcessingForward(oImageSpace *ap_ImageSpace)
This header file is mainly used to declare some macro definitions and all includes needed from the st...
int GetCurrentCardImage(int a_th)
call the eponym function from the oDynamicDataManager object
vector< string > m_pathToMultiModalImg
void GetEventIndexStartAndStop(int64_t *ap_indexStart, int64_t *ap_indexStop, int a_subsetNum=0, int a_NbSubsets=1)
Compute the index start and stop of the events loop with respect to the current subset and MPI size a...
int Iterate()
Just call either the IterateCPU or the IterateGPU function as asked for.
int SetNbIterationsAndSubsets(const string &a_nbIterationsSubsets)
Set the number of iterations and subsets.
void DeallocateBackwardImageFromDynamicBasis()
Free memory for the backward image matrices.
bool * mp_outputIterations
virtual int StepInnerLoopInsideSubsetLoop(int a_iteration, int a_subset, int a_bed)
This function is called inside the subset loop and manages the main loop over the events The loop o...
FLTNB GetInitialValue()
Return the initial image value used by the optimizer, explaining why the eponym function of vOptimize...
string m_pathToSensitivityImg
int InitMaskImage(const string &a_pathToImage)
Memory allocation and initialization for the mask image.
void DeallocateImage()
Free memory for the main image matrices.
#define DYNAMIC_SWITCH_CONTINUE
void Reduce()
Merge parallel results into the matrix of the backward image matrix of the first thread. Also for MPI.
int InitMultiModalImage(const vector< string > &a_pathToMultiModalImage)
Memory allocation and initialization for the multimodal image matrices.
int ConvolveForward(oImageSpace *ap_ImageSpace)
A function used to apply convolvers onto the forward image of the oImageSpace.
virtual int StepAfterIterationLoop()
This function is called at the end of the IterateCPU function.
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 ApplyOutputFOVMasking()
Mask the outside of the transaxial FOV based on the m_fovOutPercent.
void DeallocateMultiModalImage()
Free memory for the multimodal image.
void ThreadBarrierSetOff()
Disable the thread locking variable (thread safe), and reset the number of waiting threads to 0...
void ThreadBarrierSetOn()
Enable the thread locking variable (thread safe), and reset the number of waiting threads to 0...
oIterativeAlgorithm()
oIterativeAlgorithm constructor. Initialize the member variables to their default values...
void DeallocateSensitivityImage()
Free memory for the sensitivity image matrices.
void StopIterativeDataUpdateStep3(int a_thread)
Stop the timer for duration of iterative data update step 3.
void InstantiateImage()
Allocate memory for the main image matrices.
void InstantiateBackwardImageFromDynamicBasis(int a_nbBackwardImages)
Allocate memory for the backward image matrices and set the number of backward images for the whole c...
int SetOutputIterations(const string &a_outputIterations)
Set the selected output iterations.
string m_pathToInitialImg
int ApplyMaskToSensitivity()
Apply the mask to the sensitivity image (only for the first thread, the image must be reduced beforeh...
bool ThreadBarrierCheck()
Check if all the threads are currently in waiting condition.
void InstantiateSensitivityImage(const string &a_pathToSensitivityImage)
Allocate the sensitivity image matrices.
static sOutputManager * GetInstance()
Instanciate the singleton object and Initialize member variables if not already done, return a pointer to this object otherwise.
int InitAttenuationImage(const string &a_pathToAtnImage)
Memory allocation and initialisation for the attenuation image using either :
int ConvolvePost(oImageSpace *ap_ImageSpace)
A function used to apply convolvers onto the output image of the oImageSpace.
int ConvolveIntra(oImageSpace *ap_ImageSpace)
A function used to apply convolvers onto the current image of the oImageSpace.
int ApplyProcessingPost(oImageSpace *ap_ImageSpace)
int InitImage(const string &a_pathToInitialImage, FLTNB a_value)
Initialize the main image, either using:
void DeallocateVisitedVoxelsImage()
Free memory for the image matrix containing binary information regarding which 3D voxels have been vi...
Declaration of class oIterativeAlgorithm.
virtual int StepAfterSubsetLoop(int a_iteration)
This function is called after finishing the subset loop.
void StartIterativeDataUpdateStep1(int a_thread)
Start the timer for duration of iterative data update step 1.
void DeallocateMaskImage()
Free memory for the mask image.
int PostDataUpdateStep(int a_iteration, int a_nbIterations, int a_subset, int *ap_nbSubsets)
A function that simply calls the eponym function from the vOptimizer.
void StopIterativeDataUpdateStep4(int a_thread)
Stop the timer for duration of iterative data update step 4.
oImageProcessingManager * mp_ImageProcessingManager
bool ThreadBarrierFlag()
Check if the m_releaseThreads boolean is enabled or not.
void StartIterativeDataUpdateStep2(int a_thread)
Start the timer for duration of iterative data update step 2.
oImageConvolverManager * mp_ImageConvolverManager
vEvent * GetEvent(int64_t a_eventIndex, int a_th=0)
void PrepareForwardImage()
Copy current image matrix in the forward-image buffer matrix.
const string & GetPathName()
bool m_generalizedImplementation
void InstantiateVisitedVoxelsImage()
Memory allocation and initialization for the image matrix containing binary information regarding whi...
void CleanNeverVisitedVoxels()
Based on the visitedVoxelsImage, clean the never visited voxels in the image. This function must be c...
Singleton class that manages output writing on disk (images, sinograms, etc). It also manages loggi...
oDynamicModelManager * mp_DynamicModelManager
int GetNbBackwardImages()
Return the number of backward images used by the optimizer, explaining why the eponym function of vOp...
virtual int StepPostProcessInsideSubsetLoop(int a_iteration, int a_subset)
int SaveOutputImage(int a_iteration, int a_subset=-1)
Call the interfile function to write output image on disk.
Declaration of class iEventHistoCT.
oDeformationManager * mp_DeformationManager
vDataFile ** m2p_DataFile
void ResetCurrentDynamicIndices()
Call the eponym function from the oDynamicDataManager class using the member object.
void ComputeOutputImage()
void StartIterativeDataUpdateStep3(int a_thread)
Start the timer for duration of iterative data update step 3.
oProjectionLine * ComputeProjectionLine(vEvent *ap_Event, int a_th)
This function is used to compute system matrix elements from the associated projector or pre-computed...
int ConvolveBackward(oImageSpace *ap_ImageSpace)
A function used to apply convolvers onto the backward images of the oImageSpace.
void StopIterativeDataUpdateStep2(int a_thread)
Stop the timer for duration of iterative data update step 2.
int SaveParametricImages(int a_iteration, int a_subset=-1)
Call SaveParametricImages() function of the dynamic model object is 'm_UseModel' is on...
void ApplyBedOffset(int a_bed)
Compute the bed offset from the provided bed index and apply it to all projection lines...
void StartConvolution()
Start the timer for duration of convolution.
void InstantiateForwardImage()
Allocate memory for the forward image matrices.
bool NotEmptyLine()
This function is used to know if the line contains any voxel contribution.
int ApplyProcessingIntra(oImageSpace *ap_ImageSpace)
bool m_saveImageAfterSubsets
int ImageUpdateStep(int a_iteration, int a_nbSubsets)
A function dedicated to the update step in the image space (performed after the loop on events) ...
int DataUpdateStep(oProjectionLine *ap_Line, vEvent *ap_Event, int a_bed, int a_timeFrame, int a_respGate, int a_cardGate, int a_iteration, int a_thread)
A function dedicated to the update step in the data space (for each event inside the loop) ...
virtual int StepBeforeIterationLoop()
This function is called at the beginning of the IterateCPU function.
bool m_saveSensitivityHistoFlag
void StartIterativeDataUpdateStep4(int a_thread)
Start the timer for duration of iterative data update step 4.
This class is designed to manage and store system matrix elements associated to a vEvent...
const string & GetBaseName()
int ApplyOutputFlip()
Just flip the output image.
int IterateCPU()
Perform the iterative loop of the algorithm, call the different object for optimization, projection, update, etc. Function designed to be executed on the CPU only.
void DeallocateOutputImage()
Free memory for the Image matrices dedicated to output writing on disk.
virtual int InitSpecificOptions(string a_specificOptions)
Set the selected output iterations.
virtual int StepBeforeSubsetLoop(int a_iteration)
This function is called before starting the subset loop.
void StopConvolution()
Stop the timer for duration of convolution.
Mother class for the Event objects.
int GetNbThreadsForImageComputation()
Get the number of threads used for image operations.
oImageSpace * mp_ImageSpace
virtual int StepPreProcessInsideSubsetLoop(int a_iteration, int a_subset)
This function is called right after starting the subset loop. Apply any kind of processing on the for...
int PreDataUpdateStep(int a_iteration, int a_nbIterations, int a_subset, int *ap_nbSubsets)
A function that simply calls the eponym function from the vOptimizer.
int GetNbThreadsForProjection()
Get the number of threads used for projections.
oOptimizerManager * mp_OptimizerManager
This class is designed to manage some profiling of the code.
oProjectorManager * mp_ProjectorManager
bool Checked()
Simply check that the image dimensions and verbosity has been set.
void ThreadBarrierIncrement()
Increment (thread safe) the m_nbThreadsWaiting variable.
int SaveSensitivityImage(const string &a_pathToSensitivityImage)
Call the interfile function to write the sensitivity image on disk.
void InitBackwardImage()
Initialize each voxel of the backward images to 0, also for sensitivity if not loaded (estimated on t...
int InitSensitivityImage(const string &a_pathToSensitivityImage)
Initialization for the sensitivity image matrices.
int GetCurrentRespImage(int a_th)
call the eponym function from the oDynamicDataManager object
void DeallocateForwardImage()
Free memory for the forward image matrices.
static sChronoManager * GetInstance()
Instantiate the singleton if not already done, then return the pointer to its instance.
int GetMPIRank()
Get the MPI instance number (the rank)
int ApplyDynamicModel(oImageSpace *ap_ImageS, int a_iteration, int a_subset)
int GetCurrentTimeFrame(int a_th)
call the eponym function from the oDynamicDataManager object
oImageDimensionsAndQuantification * mp_ID
virtual ~oIterativeAlgorithm()
oIterativeAlgorithm destructor.
void InstantiateOutputImage()
Instanciate Image matrices dedicated to output writing on disk.
#define DYNAMIC_SWITCH_DEFORMATION