90 if (a_nbIterationsSubsets==
"")
return 0;
95 string buf = a_nbIterationsSubsets;
99 while ((pos_comma=buf.find_first_of(
","))!=string::npos)
102 string sub_buf = buf.substr(0,pos_comma);
104 size_t pos_column = sub_buf.find_first_of(
":");
105 if (pos_column==string::npos || pos_column==0)
107 Cerr(
"***** oIterativeAlgorithm::SetNbIterationsAndSubsets() -> Syntax problem in number of iterations and subsets !" << endl);
110 int iter = atoi( sub_buf.substr(0,pos_column).c_str() );
111 int subs = atoi( sub_buf.substr(pos_column+1).c_str() );
113 for (
int it=0; it<iter; it++) mp_nbSubsets[
m_nbIterations+it] = subs;
115 buf = buf.substr(pos_comma+1);
119 size_t pos_column = buf.find_first_of(
":");
120 if (pos_column==string::npos || pos_column==0)
122 Cerr(
"***** oIterativeAlgorithm::SetNbIterationsAndSubsets() -> Syntax problem in number of iterations and subsets !" << endl);
125 int iter = atoi( buf.substr(0,pos_column).c_str() );
126 int subs = atoi( buf.substr(pos_column+1).c_str() );
127 mp_nbSubsets = (
int*)realloc(mp_nbSubsets,(
m_nbIterations+iter)*
sizeof(int));
128 for (
int it=0; it<iter; it++) mp_nbSubsets[
m_nbIterations+it] = subs;
133 Cout(
"oIterativeAlgorithm::SetNbIterationsAndSubsets() -> Selected numbers of subsets for each iteration:" << endl);
134 Cout(
" Iteration / number of subsets "<< endl);
135 for (
int it=0 ; it<
m_nbIterations ; it++)
Cout(
" " << it+1 <<
" / " << mp_nbSubsets[it] << endl);
158 if(
m_verbose>=2)
Cout(
"oIterativeAlgorithm::SetOutputIterations ..."<< endl);
165 if (a_outputIterations==
"")
172 string buf = a_outputIterations;
176 int current_iteration = -1;
177 while ((pos_comma=buf.find_first_of(
","))!=string::npos)
180 string sub_buf = buf.substr(0,pos_comma);
182 size_t pos_column = sub_buf.find_first_of(
":");
183 if (pos_column==string::npos || pos_column==0)
185 Cerr(
"***** oIterativeAlgorithm::SetOutputIterations() -> Syntax problem in output iteration numbers !" << endl);
188 int step_iteration = atoi( sub_buf.substr(0,pos_column).c_str() );
189 if (step_iteration<=0)
191 Cerr(
"***** oIterativeAlgorithm::SetOutputIterations() -> Iteration step must be strictly positive (here it is " << step_iteration <<
") !" << endl);
194 int stop_iteration = atoi( sub_buf.substr(pos_column+1).c_str() );
195 if (stop_iteration<=current_iteration)
197 Cerr(
"***** oIterationAlgorithm::SetOutputIterations() -> Output iteration number must be increasing through provided couples !" << endl);
200 for (
int it=current_iteration+step_iteration; it<stop_iteration; it+=step_iteration)
mp_outputIterations[it] =
true;
201 current_iteration = stop_iteration-1;
202 buf = buf.substr(pos_comma+1);
206 size_t pos_column = buf.find_first_of(
":");
207 if (pos_column==string::npos || pos_column==0)
218 Cerr(
"***** oIterativeAlgorithm::SetOutputIterations() -> Syntax problem in output iteration numbers !" << endl);
222 int step_iteration = atoi( buf.substr(0,pos_column).c_str() );
223 if (step_iteration<=0)
225 Cerr(
"***** oIterativeAlgorithm::SetOutputIterations() -> Iteration step must be strictly positive (here it is " << step_iteration <<
") !" << endl);
228 int stop_iteration = atoi( buf.substr(pos_column+1).c_str() );
229 if (stop_iteration<=current_iteration)
231 Cerr(
"***** oIterationAlgorithm::SetOutputIterations() -> Output iteration number must be increasing through provided couples !" << endl);
234 for (
int it=current_iteration+step_iteration; it<stop_iteration; it+=step_iteration)
mp_outputIterations[it] =
true;
251 if(
m_verbose>=2)
Cout(
"oIterativeAlgorithm::Iterate ..."<< endl);
292 MPI_Barrier(MPI_COMM_WORLD);
299 clock_t clock_start_whole = clock();
300 time_t time_start_whole = time(NULL);
305 Cerr(
"***** oIterativeAlgorithm::IterateCPU() -> A problem occured while calling StepBeforeIterationLoop() function !" << endl);
316 Cerr(
"***** oIterativeAlgorithm::IterateCPU() -> A problem occured while calling StepBeforeSubsetLoop() function !" << endl);
321 for (
int subset=0 ; subset<mp_nbSubsets[iteration] ; subset++)
326 Cout(
"oIterativeAlgorithm::IterateCPU() -> Start iteration " << iteration+1 <<
"/" << m_nbIterations
327 <<
" subset " << subset+1 <<
"/" << mp_nbSubsets[iteration] << endl);
331 clock_t clock_start_subset = clock();
332 time_t time_start_subset = time(NULL);
337 Cerr(
"***** oIterativeAlgorithm::IterateCPU() -> A problem occured while calling StepPreProcessInsideSubsetLoop() function !" << endl);
343 MPI_Barrier(MPI_COMM_WORLD);
347 for (
int bed=0 ; bed<
m_nbBeds ; bed++)
352 Cerr(
"***** oIterativeAlgorithm::IterateCPU() -> A problem occured while calling StepInnerLoopInsideSubsetLoop() function !" << endl);
359 MPI_Barrier(MPI_COMM_WORLD);
365 Cerr(
"***** oIterativeAlgorithm::IterateCPU() -> A problem occured while calling StepPostProcessInsideSubsetLoop() function !" << endl);
370 clock_t clock_stop_subset = clock();
371 time_t time_stop_subset = time(NULL);
372 if (
m_verbose>=2)
Cout (
"oIterativeAlgorithm::IterateCPU() -> Time spent for subset " << subset+1 <<
" | User: " << time_stop_subset-time_start_subset
373 <<
" sec | CPU: " << (clock_stop_subset-clock_start_subset)/((
FLTNB)CLOCKS_PER_SEC) <<
" sec" << endl);
382 Cerr(
"***** oIterativeAlgorithm::IterateCPU() -> A problem occured while calling StepAfterSubsetLoop() function !" << endl);
392 Cerr(
"***** oIterativeAlgorithm::IterateCPU() -> A problem occured while calling StepAfterIterationLoop() function !" << endl);
397 clock_t clock_stop_whole = clock();
398 time_t time_stop_whole = time(NULL);
399 if (
m_verbose>=1)
Cout(
"oIterativeAlgorithm::IterateCPU() -> Total time spent | User: " << time_stop_whole-time_start_whole
400 <<
" sec | CPU: " << (clock_stop_whole-clock_start_whole)/((
FLTNB)CLOCKS_PER_SEC) <<
" sec" << endl);
419 if (
m_verbose>=2)
Cout(
"oIterativeAlgorithm::StepBeforeIterationLoop ... " << endl);
424 Cerr(
"***** oIterativeAlgorithm::StepBeforeIterationLoop() -> Image space has not been created or was not checked !" << endl);
440 Cerr(
"***** oIterativeAlgorithm::StepBeforeIterationLoop() -> An error occured while reading the initialization image !" << endl);
446 Cerr(
"***** oIterativeAlgorithm::StepBeforeIterationLoop()-> Error during attenuation image initialization !" << endl);
452 Cerr(
"***** oIterativeAlgorithm::StepBeforeIterationLoop() -> An error occured while initializing the sensitivity image !" << endl);
458 Cerr(
"***** oIterativeAlgorithm::StepBeforeIterationLoop()-> Error during anatomical image initialization !" << endl);
464 Cerr(
"***** oIterativeAlgorithm::StepBeforeIterationLoop()-> Error during mask image initialization !" << endl);
484 if (
m_verbose>=3)
Cout(
"oIterativeAlgorithm::StepBeforeSubsetLoop ... " << endl);
508 if (
m_verbose>=3)
Cout(
"oIterativeAlgorithm::StepPreProcessInsideSubsetLoop ... " << endl);
523 Cerr(
"***** oIterativeAlgorithm::StepPreProcessInsideSubsetLoop() -> A problem occured while applyin image processing to forward image !" << endl);
530 Cerr(
"***** oIterativeAlgorithm::StepPreProcessInsideSubsetLoop() -> A problem occured while applying image convolver to forward image !" << endl);
565 if (
m_nbBeds>1)
Cout(
"oIterativeAlgorithm::StepInnerLoopInsideSubsetLoop() -> Start loop over events for bed " << a_bed+1 << endl << flush);
566 else Cout(
"oIterativeAlgorithm::StepInnerLoopInsideSubsetLoop() -> Start loop over events" << endl << flush);
575 cout <<
"0 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%" << endl;
576 cout <<
"|----|----|----|----|----|----|----|----|----|----|" << endl;
577 cout <<
"|" << flush;
580 int progression_percentage_old = 0;
581 int progression_nb_bars = 0;
582 uint64_t progression_printing_index = 0;
585 int64_t index_start = 0;
586 int64_t index_stop = 0;
598 MPI_Barrier(MPI_COMM_WORLD);
607 bool problem =
false;
614 int64_t loop_increment = mp_nbSubsets[a_iteration];
616 int64_t index_start_for_this_thread = index_start + th * loop_increment;
617 int64_t nb_loop_pass_through = (index_stop - 1 - index_start_for_this_thread) / increment_for_this_thread;
618 p_last_index[th] = index_start_for_this_thread + nb_loop_pass_through * increment_for_this_thread;
624 #pragma omp parallel for private(index) schedule(static, 1)
625 for ( index = index_start ; index < index_stop ; index += mp_nbSubsets[a_iteration] )
630 th = omp_get_thread_num();
635 if (progression_printing_index%1000==0)
639 int progression_percentage_new = ((int)( (((
float)(index-index_start+1))/((float)(index_stop-index_start)) ) * 100.));
640 if (progression_percentage_new>=progression_percentage_old+2)
642 int nb_steps = (progression_percentage_new-progression_percentage_old)/2;
643 for (
int i=0; i<nb_steps; i++)
645 cout <<
"-" << flush;
646 progression_nb_bars++;
648 progression_percentage_old += nb_steps*2;
651 progression_printing_index++;
656 if (
m_verbose>=4)
Cout(
"oIterativeAlgorithm::StepInnerLoopInsideSubsetLoop() -> Step1: Get current event for that thread index " << endl);
667 Cerr(
"***** oIterativeAlgorithm::StepInnerLoopInsideSubsetLoop() -> An error occured while getting the event from index "
668 << index <<
" (thread " << th <<
") !" << endl);
679 Cout(
"oIterativeAlgorithm::StepInnerLoopInsideSubsetLoop() -> Step2: Check for Dynamic event (frame/gate switch, image-based deformation " << endl);
682 int dynamic_switch_value =
mp_ID->
DynamicSwitch(index, event->GetTimeInMs(), a_bed, th);
721 if (
m_verbose>=4)
Cout(
"oIterativeAlgorithm::StepInnerLoopInsideSubsetLoop() -> Step3: Compute the projection line " << endl);
726 Cerr(
"***** oIterativeAlgorithm::StepInnerLoopInsideSubsetLoop() -> A problem occured while computing the projection line !" << endl);
735 if (
m_verbose>=4)
Cout(
"oIterativeAlgorithm::StepInnerLoopInsideSubsetLoop() -> Step4: Optimize in the data space " << endl);
750 MPI_Barrier(MPI_COMM_WORLD);
764 int progression_total_bars = 49;
765 for (
int i=0; i<progression_total_bars-progression_nb_bars; i++) cout <<
"-";
772 Cerr(
"***** oIterativeAlgorithm::StepInnerLoopInsideSubsetLoop() -> A problem occured inside the parallel loop over events !" << endl);
799 if (
m_verbose>=3)
Cout(
"oIterativeAlgorithm::StepPostProcessInsideSubsetLoop ... " << endl);
810 Cerr(
"***** oIterativeAlgorithm::StepPostProcessInsideSubsetLoop() -> A problem occured while applying convolver to backward images !" << endl);
823 Cerr(
"***** oIterativeAlgorithm::StepPostProcessInsideSubsetLoop() -> A problem occured while applying convolver to current estimate images !" << endl);
830 Cerr(
"***** oIterativeAlgorithm::StepPostProcessInsideSubsetLoop() -> A problem occured while applying dynamic model to current estimate images !" << endl);
837 Cerr(
"***** oIterativeAlgorithm::StepPostProcessInsideSubsetLoop() -> A problem occured while applying image processing to current estimate images !" << endl);
848 stringstream temp_it; temp_it << a_iteration + 1;
849 stringstream temp_ss; temp_ss << a_subset + 1;
850 temp_sens.append(
"_it").append(temp_it.str()).append(
"_ss").append(temp_ss.str()).append(
"_sensitivity");
859 if (
m_verbose>=1)
Cout(
"oIterativeAlgorithm::StepPostProcessInsideSubsetLoop() -> Save image at iteration " << a_iteration+1 <<
" for subset " << a_subset+1 << endl);
865 Cerr(
"***** oIterativeAlgorithm::StepPostProcessInsideSubsetLoop() -> A problem occured while convolving the output image !" << endl);
871 Cerr(
"***** oIterativeAlgorithm::StepPostProcessInsideSubsetLoop() -> A problem occured while applying image processing the output image !" << endl);
877 Cerr(
"***** oIterativeAlgorithm::StepPostProcessInsideSubsetLoop() -> A problem occured while applying output FOV masking !" << endl);
883 Cerr(
"***** oIterativeAlgorithm::StepPostProcessInsideSubsetLoop() -> A problem occured while applying output flip !" << endl);
889 Cerr(
"***** oIterativeAlgorithm::StepPostProcessInsideSubsetLoop() -> A problem occured while saving output image !" << endl);
914 if (
m_verbose>=3)
Cout(
"oIterativeAlgorithm::StepAfterSubsetLoop ... " << endl);
921 if (
m_verbose>=1)
Cout(
"oIterativeAlgorithm::StepAfterSubsetLoop() -> Save image at iteration " << a_iteration+1 << endl);
927 Cerr(
"***** oIterativeAlgorithm::StepAfterSubsetLoop() -> A problem occured while convolving the output image !" << endl);
933 Cerr(
"***** oIterativeAlgorithm::StepAfterSubsetLoop() -> A problem occured while applying image processing the output image !" << endl);
939 Cerr(
"***** oIterativeAlgorithm::StepAfterSubsetLoop() -> A problem occured while saving parametric images related to the dynamic model !" << endl);
946 Cerr(
"***** oIterativeAlgorithm::StepAfterSubsetLoop() -> A problem occured while applying output FOV masking !" << endl);
952 Cerr(
"***** oIterativeAlgorithm::StepAfterSubsetLoop() -> A problem occured while applying output flip !" << endl);
958 Cerr(
"***** oIterativeAlgorithm::StepAfterSubsetLoop() -> A problem occured while saving output image !" << endl);
980 if (
m_verbose>=2)
Cout(
"oIterativeAlgorithm::StepAfterIterationLoop ... " << endl);
1010 if (
m_verbose>=2)
Cout(
"oIterativeAlgorithm::InitSpecificOptions ... " << endl);
1033 if (
m_verbose>=4)
Cout(
"oIterativeAlgorithm::ThreadBarrierIncrement ... " << endl);
1036 #pragma omp critical(increment_waiting_threads)
1054 if (
m_verbose>=4)
Cout(
"oIterativeAlgorithm::ThreadBarrierFlag ... " << endl);
1058 #pragma omp flush(m_releaseThreads)
1074 if (
m_verbose>=4)
Cout(
"oIterativeAlgorithm::ThreadBarrierCheck ... " << endl);
1077 #pragma omp flush(m_nbThreadsWaiting) // Check any change in m_nbThreadsWaiting
1092 if (
m_verbose>=4)
Cout(
"oIterativeAlgorithm::ThreadBarrierSetOff ... " << endl);
1096 #pragma omp flush(m_releaseThreads) // Make sure the value of m_releaseThreads is propagated to other threads
1098 #pragma omp flush(m_nbThreadsWaiting) // Same for m_nbThreadsWaiting
1112 if (
m_verbose>=4)
Cout(
"oIterativeAlgorithm::ThreadBarrierSetOn ... " << endl);
1116 #pragma omp flush(m_releaseThreads) // Make sure the value of m_releaseThreads is propagated to other threads
1118 #pragma omp flush(m_nbThreadsWaiting) // Same for m_nbThreadsWaiting
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
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
vEvent * GetEventWithoutOrderAssumption(int64_t a_eventIndex, int a_th)
According to the current part of the datafile loaded in memory, either read from this buffer or direc...
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...
int ApplyDynamicModel(oImageSpace *ap_ImageS, int a_ite, int a_sset)
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 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 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 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 PreDataUpdateStep(int a_iteration, int a_nbIterations, int a_subset, int a_nbSubsets)
A function that simply calls the eponym function from the vOptimizer.
bool ThreadBarrierCheck()
Check if all the threads are currently in waiting condition.
void InstantiateSensitivityImage(const string &a_pathToSensitivityImage)
Allocate the sensitivity image matrices.
int ImageUpdateStep(oImageSpace *ap_Image, int a_iteration, int a_nbSubsets)
A function dedicated to the update step in the image space (performed after the loop on events) ...
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...
void DeallocateAnatomicalImage()
Free memory for the anatomical image.
Declaration of class oIterativeAlgorithm.
virtual int StepAfterSubsetLoop(int a_iteration)
This function is called after finishing the subset loop.
void DeallocateMaskImage()
Free memory for the mask image.
oImageProcessingManager * mp_ImageProcessingManager
bool ThreadBarrierFlag()
Check if the m_releaseThreads boolean is enabled or not.
oImageConvolverManager * mp_ImageConvolverManager
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...
int PostDataUpdateStep(int a_iteration, int a_nbIterations, int a_subset, int a_nbSubsets)
A function that simply calls the eponym function from the vOptimizer.
int InitAnatomicalImage(const string &a_pathToAnatomicalImage)
Memory allocation and initialization for the anatomical image matrices.
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.
oDeformationManager * mp_DeformationManager
void ResetBufferRange()
Simply set the m_1stIdxArrayEvents and m_lastIdxArrayEvents to -1 only if the percentage load is stri...
vDataFile ** m2p_DataFile
int DataUpdateStep(oProjectionLine *ap_Line, oImageSpace *ap_Image, 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) ...
void ResetCurrentDynamicIndices()
Call the eponym function from the oDynamicDataManager class using the member object.
void ComputeOutputImage()
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 ApplyBedOffset(int a_bed)
Compute the bed offset from the provided bed index and apply it to all projection lines...
void InstantiateForwardImage()
Allocate memory for the forward image matrices.
bool NotEmptyLine()
This function is used to know if the line contains any voxel contribution.
vEvent * GetEventWithAscendingOrderAssumption(int64_t a_eventIndex, int64_t a_eventIndexLimit, int a_th)
According to the current part of the datafile loaded in memory, either read from this buffer or direc...
int ApplyProcessingIntra(oImageSpace *ap_ImageSpace)
bool m_saveImageAfterSubsets
virtual int StepBeforeIterationLoop()
This function is called at the beginning of the IterateCPU function.
bool m_saveSensitivityHistoFlag
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.
Mother class for the Event objects.
int GetNbThreadsForImageComputation()
Get the number of threads used for image operations.
int SaveParametricImages(int a_ite)
Call SaveParametricImages() function of the dynamic model object is 'm_UseModel' is on...
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 GetNbThreadsForProjection()
Get the number of threads used for projections.
oOptimizerManager * mp_OptimizerManager
oProjectorManager * mp_ProjectorManager
string m_pathToAnatomicalImg
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.
int GetMPIRank()
Get the MPI instance number (the rank)
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