CASToR  3.2
Tomographic Reconstruction (PET/SPECT/CT)
code/src/optimizer/iOptimizerOneStepLate.cc
Go to the documentation of this file.
1 
8 #include "iOptimizerOneStepLate.hh"
9 #include "sOutputManager.hh"
10 
11 // =====================================================================
12 // ---------------------------------------------------------------------
13 // ---------------------------------------------------------------------
14 // =====================================================================
15 
17 {
18  // ---------------------------
19  // Mandatory member parameters
20  // ---------------------------
21 
22  // Initial value at 1
23  m_initialValue = 1.;
24  // Only one backward image
26  // OSL accepts penalties, which must have a derivative order of 1 minimum
28  // OSL is compatible with listmode and histogram data
31  // OSL is only compatible with emission data
34 
35  // --------------------------
36  // Specific member parameters
37  // --------------------------
38 
43  m_displayWarningFlag = true;
44 }
45 
46 // =====================================================================
47 // ---------------------------------------------------------------------
48 // ---------------------------------------------------------------------
49 // =====================================================================
50 
52 {
53  // Delete the penalty image
54  // Note: there is no need to deallocate the images themselves as they are allocate using the
55  // miscellaneous image function from the image space, which automatically deals with
56  // memory deallocations.
58  {
59  // Loop over time basis functions
61  {
63  {
64  // Loop over respiratory basis functions
66  {
67  if (m4p_firstDerivativePenaltyImage[tbf][rbf])
68  {
69  free(m4p_firstDerivativePenaltyImage[tbf][rbf]);
70  }
71  }
73  }
74  }
76  }
77  // If the warning about negative sensitivity+penalty has been printed out, we print it again
78  // here at the end to be sure that the user is paying attention to it.
80  {
81  Cerr("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl);
82  Cerr("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl);
83  Cerr("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl);
84  Cerr("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl);
85  Cerr("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl);
86  Cerr("!!!!! iOptimizerOneStepLate::Destructor() -> Several times, the update factor was not positive and was set to 1. !!!!!" << endl);
87  Cerr("!!!!! For convenience, it was advertised only the first time. But this may be a sign that the penalty strength !!!!!" << endl);
88  Cerr("!!!!! is too high for this approximative algorithm. It may also be due to voxels close to FOV extremities. Be !!!!!" << endl);
89  Cerr("!!!!! sure to double check your images ! !!!!!" << endl);
90  Cerr("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl);
91  Cerr("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl);
92  Cerr("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl);
93  Cerr("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl);
94  Cerr("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl);
95  }
96 }
97 
98 // =====================================================================
99 // ---------------------------------------------------------------------
100 // ---------------------------------------------------------------------
101 // =====================================================================
102 
104 {
105  cout << "This optimizer is the One-Step-Late algorithm from P. J. Green, IEEE TMI, Mar 1990, vol. 9, pp. 84-93." << endl;
106  cout << "Subsets can be used as for OSEM. It accepts penalty terms that have a derivative order of at least one." << endl;
107  cout << "Without penalty, it is stricly equivalent to the MLEM algorithm." << endl;
108  cout << "It is numerically implemented in the multiplicative form (as opposed to the gradient form)." << endl;
109  cout << "The following options can be used (in this particular order when provided as a list):" << endl;
110  cout << " initial image value: to set the uniform voxel value for the initial image" << endl;
111  cout << " denominator threshold: to set the threshold of the data space denominator under which the ratio is set to 1" << endl;
112  cout << " minimum image update: to set the minimum of the image update factor under which it stays constant (0 or a negative value" << endl;
113  cout << " means no minimum thus allowing a 0 update)" << endl;
114  cout << " maximum image update: to set the maximum of the image update factor over which it stays constant (0 or a negative value means" << endl;
115  cout << " no maximum)" << endl;
116 }
117 
118 // =====================================================================
119 // ---------------------------------------------------------------------
120 // ---------------------------------------------------------------------
121 // =====================================================================
122 
123 int iOptimizerOneStepLate::ReadConfigurationFile(const string& a_configurationFile)
124 {
125  string key_word = "";
126  // Read the initial image value option
127  key_word = "initial image value";
128  if (ReadDataASCIIFile(a_configurationFile, key_word, &m_initialValue, 1, KEYWORD_MANDATORY))
129  {
130  Cerr("***** iOptimizerOneStepLate::ReadAndCheckConfigurationFile() -> Failed to get the '" << key_word << "' keyword !" << endl);
131  return 1;
132  }
133  // Read the denominator threshold option
134  key_word = "denominator threshold";
135  if (ReadDataASCIIFile(a_configurationFile, key_word, &m_dataSpaceDenominatorThreshold, 1, KEYWORD_MANDATORY))
136  {
137  Cerr("***** iOptimizerOneStepLate::ReadAndCheckConfigurationFile() -> Failed to get the '" << key_word << "' keyword !" << endl);
138  return 1;
139  }
140  // Read the minimum image update option
141  key_word = "minimum image update";
142  if (ReadDataASCIIFile(a_configurationFile, key_word, &m_minimumImageUpdateFactor, 1, KEYWORD_MANDATORY))
143  {
144  Cerr("***** iOptimizerOneStepLate::ReadAndCheckConfigurationFile() -> Failed to get the '" << key_word << "' keyword !" << endl);
145  return 1;
146  }
147  // Read the maximum image update option
148  key_word = "maximum image update";
149  if (ReadDataASCIIFile(a_configurationFile, key_word, &m_maximumImageUpdateFactor, 1, KEYWORD_MANDATORY))
150  {
151  Cerr("***** iOptimizerOneStepLate::ReadAndCheckConfigurationFile() -> Failed to get the '" << key_word << "' keyword !" << endl);
152  return 1;
153  }
154  // Normal end
155  return 0;
156 }
157 
158 // =====================================================================
159 // ---------------------------------------------------------------------
160 // ---------------------------------------------------------------------
161 // =====================================================================
162 
163 int iOptimizerOneStepLate::ReadOptionsList(const string& a_optionsList)
164 {
165  // There are 4 floating point variables as options
166  const int nb_options = 4;
167  FLTNB options[nb_options];
168  // Read them
169  if (ReadStringOption(a_optionsList, options, nb_options, ",", "OneStepLate configuration"))
170  {
171  Cerr("***** iOptimizerOneStepLate::ReadAndCheckConfigurationFile() -> Failed to correctly read the list of options !" << endl);
172  return 1;
173  }
174  // Affect options
175  m_initialValue = options[0];
176  m_dataSpaceDenominatorThreshold = options[1];
177  m_minimumImageUpdateFactor = options[2];
178  m_maximumImageUpdateFactor = options[3];
179  // Normal end
180  return 0;
181 }
182 
183 // =====================================================================
184 // ---------------------------------------------------------------------
185 // ---------------------------------------------------------------------
186 // =====================================================================
187 
189 {
190  // Check that initial image value is strictly positive
191  if (m_initialValue<=0.)
192  {
193  Cerr("***** iOptimizerOneStepLate->Initialize() -> Provided initial image value (" << m_initialValue << ") must be strictly positive !" << endl);
194  return 1;
195  }
196  // Check that denominator threshold value is strictly positive
198  {
199  Cerr("***** iOptimizerOneStepLate->Initialize() -> Provided data space denominator threshold (" << m_dataSpaceDenominatorThreshold << ") must be strictly positive !" << endl);
200  return 1;
201  }
202  // Check that maximum image update factor is higher than the minimum
204  {
205  Cerr("***** iOptimizerOneStepLate->Initialize() -> Provided minimum/maximum (" << m_minimumImageUpdateFactor << "/" << m_maximumImageUpdateFactor << " are inconsistent !" << endl);
206  return 1;
207  }
208  // Cannot deal with list-mode transmission data
210  {
211  Cerr("***** iOptimizerMLEM->CheckSpecificParameters() -> Cannot reconstruct list-mode transmission data !" << endl);
212  return 1;
213  }
214  // Normal end
215  return 0;
216 }
217 
218 // =====================================================================
219 // ---------------------------------------------------------------------
220 // ---------------------------------------------------------------------
221 // =====================================================================
222 
224 {
225  // Allocate and create the penalty image
227  // Loop over time basis functions
228  for (int tbf=0; tbf<mp_ImageDimensionsAndQuantification->GetNbTimeBasisFunctions(); tbf++)
229  {
231  // Loop over respiratory basis functions
232  for (int rbf=0; rbf<mp_ImageDimensionsAndQuantification->GetNbRespBasisFunctions(); rbf++)
233  {
235  // Loop over cardiac basis functions
236  for (int cbf=0; cbf<mp_ImageDimensionsAndQuantification->GetNbCardBasisFunctions(); cbf++)
237  {
238  // Get a pointer to a newly allocated image
239  m4p_firstDerivativePenaltyImage[tbf][rbf][cbf] = mp_ImageSpace -> AllocateMiscellaneousImage();
240  // Initialize to 0, in case the penalty is not used
241  for (INTNB v=0; v<mp_ImageDimensionsAndQuantification->GetNbVoxXYZ(); v++) m4p_firstDerivativePenaltyImage[tbf][rbf][cbf][v] = 0.;
242  }
243  }
244  }
245  // Force the display of the OSL warning (when sensitivity+penalty is negative or null in the image update step)
246  m_displayWarningFlag = true;
247  // Verbose
248  if (m_verbose>=2)
249  {
250  Cout("iOptimizerOneStepLate::Initialize() -> Use the OneStepLate optimizer" << endl);
251  if (m_verbose>=3)
252  {
253  Cout(" --> Initial image value: " << m_initialValue << endl);
254  Cout(" --> Data space denominator threshold: " << m_dataSpaceDenominatorThreshold << endl);
255  if (m_minimumImageUpdateFactor>0.) Cout(" --> Minimum image update factor: " << m_minimumImageUpdateFactor << endl);
256  else Cerr("!!!!! The minimum update value is not set, if using subsets, voxels could be trapped in 0 value causing some negative bias !" << endl);
257  if (m_maximumImageUpdateFactor>0.) Cout(" --> Maximum image update factor: " << m_maximumImageUpdateFactor << endl);
258  }
259  }
260  // Normal end
261  return 0;
262 }
263 
264 // =====================================================================
265 // ---------------------------------------------------------------------
266 // ---------------------------------------------------------------------
267 // =====================================================================
268 
270 {
271  // ==========================================================================================
272  // If no penalty, then exit (the penalty image term has been initialized to 0)
273  if (mp_Penalty==NULL) return 0;
274  // Set the number of threads
275  #ifdef CASTOR_OMP
277  #endif
278  // Verbose
279  if (m_verbose>=1) Cout("iOptimizerOneStepLate::PreImageUpdateSpecificStep() -> Compute penalty term" << endl);
280  // ==========================================================================================
281  // Global precomputation step if needed by the penalty
283  {
284  Cerr("***** iOptimizerOneStepLate::PreImageUpdateSpecificStep() -> A problem occurred while computing the penalty pre-processing step !" << endl);
285  return 1;
286  }
287  // ==========================================================================================
288  // Loop over time basis functions
289  for (int tbf=0; tbf<mp_ImageDimensionsAndQuantification->GetNbTimeBasisFunctions(); tbf++)
290  {
291  // Loop over respiratory basis functions
292  for (int rbf=0; rbf<mp_ImageDimensionsAndQuantification->GetNbRespBasisFunctions(); rbf++)
293  {
294  // Loop over cardiac basis functions
295  for (int cbf=0; cbf<mp_ImageDimensionsAndQuantification->GetNbCardBasisFunctions(); cbf++)
296  {
297  // In order to detect problems in the multi-threaded loop
298  bool problem = false;
299  // Voxel index
300  INTNB v;
301  // Multi-threading over voxels
302  #pragma omp parallel for private(v) schedule(guided)
304  {
305  // Get the thread index
306  int th = 0;
307  #ifdef CASTOR_OMP
308  th = omp_get_thread_num();
309  #endif
310  // Local precomputation step if needed by the penalty
311  if (mp_Penalty->LocalPreProcessingStep(tbf,rbf,cbf,v,th))
312  {
313  Cerr("***** iOptimizerOneStepLate::PreImageUpdateSpecificStep() -> A problem occurred while computing the penalty local pre-processing step for voxel " << v << " !" << endl);
314  problem = true;
315  }
316  // Compute the penalty term at first order
317  m4p_firstDerivativePenaltyImage[tbf][rbf][cbf][v] = mp_Penalty->ComputeFirstDerivative(tbf,rbf,cbf,v,th);
318  }
319  // Check for problems
320  if (problem)
321  {
322  Cerr("***** iOptimizerOneStepLate::PreImageUpdateSpecificStep() -> A problem occurred inside the multi-threaded loop, stop now !" << endl);
323  return 1;
324  }
325  }
326  }
327  }
328  // Normal end
329  return 0;
330 }
331 
332 // =====================================================================
333 // ---------------------------------------------------------------------
334 // ---------------------------------------------------------------------
335 // =====================================================================
337  FLTNB a_multiplicativeCorrections, FLTNB a_additiveCorrections, FLTNB a_blankValue,
338  FLTNB a_quantificationFactor, oProjectionLine* ap_Line )
339 {
340  // Line weight here is simply 1
341  *ap_weight = 1.;
342  // That's all
343  return 0;
344 }
345 // =====================================================================
346 // ---------------------------------------------------------------------
347 // ---------------------------------------------------------------------
348 // =====================================================================
349 
350 int iOptimizerOneStepLate::DataSpaceSpecificOperations( FLTNB a_data, FLTNB a_forwardModel, FLTNB* ap_backwardValues,
351  FLTNB a_multiplicativeCorrections, FLTNB a_additiveCorrections, FLTNB a_blankValue,
352  FLTNB a_quantificationFactor, oProjectionLine* ap_Line )
353 {
354  // Case for emission tomography
356  {
357  // Truncate data to 0 if negative
358  if (a_data<0.) a_data = 0.;
359  // If the foward model is too close to zero, then ignore this data (set to 1 and not 0 because this line is taken into account in the sensitivity)
360  if (a_forwardModel>m_dataSpaceDenominatorThreshold) *ap_backwardValues = a_data / a_forwardModel;
361  else *ap_backwardValues = 1.;
362  }
363  // Case for transmission tomography (equivalent of log-converted MLEM from Nuyts et al 1998)
364  else if (m_dataSpec==SPEC_TRANSMISSION)
365  {
366  // Subtract scatters
367  a_data -= a_additiveCorrections;
368  a_forwardModel -= a_additiveCorrections;
369  // Safely ignore this data (set backward value to 1 and return) in 2 different cases:
370  // - if data or model is inferior to 1
371  // - if data or model is higher than blank value
372  if (a_data<1. || a_forwardModel<1. || a_data>a_blankValue || a_forwardModel>a_blankValue)
373  {
374  *ap_backwardValues = 1.;
375  return 0;
376  }
377  // Log-convert the data and the model
378  a_data = log(a_blankValue/a_data);
379  a_forwardModel = log(a_blankValue/a_forwardModel);
380  // If the foward model is to close to zero, then ignore this data (set to 1 and not 0 because this line is taken into account in the sensitivity)
381  if (a_forwardModel>m_dataSpaceDenominatorThreshold) *ap_backwardValues = a_data / a_forwardModel;
382  else *ap_backwardValues = 1.;
383  }
384  // That's all
385  return 0;
386 }
387 
388 // =====================================================================
389 // ---------------------------------------------------------------------
390 // ---------------------------------------------------------------------
391 // =====================================================================
392 
393 int iOptimizerOneStepLate::ImageSpaceSpecificOperations( FLTNB a_currentImageValue, FLTNB* ap_newImageValue,
394  FLTNB a_sensitivity, FLTNB* ap_correctionValues,
395  INTNB a_voxel, int a_tbf, int a_rbf, int a_cbf )
396 {
397  // The update factor
398  FLTNB image_update_factor = 0.;
399  // Compute the sensitivity + penalty term (the penalty term is divided by the current number of subsets, for balance)
400  FLTNB sensitivity_plus_penalty = a_sensitivity + m4p_firstDerivativePenaltyImage[a_tbf][a_rbf][a_cbf][a_voxel]/(FLTNB)mp_nbSubsets[m_currentIteration];
401  // If negative update (which can be caused by the limitation of the OSL algorithm itself)
402  if (sensitivity_plus_penalty <= 0.)
403  {
404  // Do not update the image, so set the update factor to 1
405  image_update_factor = 1.;
407  {
408  Cerr("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl);
409  Cerr("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl);
410  Cerr("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl);
411  Cerr("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl);
412  Cerr("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl);
413  Cerr("!!!!! iOptimizerOneStepLate::ImageSpaceSpecificOperations() -> The update factor was not positive ! It has been set to 1. !!!!!" << endl);
414  Cerr("!!!!! This may be a sign that the penalty strength is too high, but it may only be due to voxels close to FOV extremities. !!!!!" << endl);
415  Cerr("!!!!! For convenience, this warning will appear only for this update. Be careful about your results ! !!!!!" << endl);
416  Cerr("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl);
417  Cerr("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl);
418  Cerr("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl);
419  Cerr("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl);
420  Cerr("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << endl);
421  // Display this warning only once, otherwise, it can be invasive (many voxels next to FOV extremitites can be affected, even with reasonable beta values)
422  m_displayWarningFlag = false;
423  }
424  }
425  // Otherwise, normal update
426  else
427  {
428  // Compute image update factor
429  image_update_factor = *ap_correctionValues / sensitivity_plus_penalty;
430  // Apply minimum image update factor
431  if ( m_minimumImageUpdateFactor > 0. && image_update_factor < m_minimumImageUpdateFactor ) image_update_factor = m_minimumImageUpdateFactor;
432  // Apply maximum image update factor
433  if ( m_maximumImageUpdateFactor > 0. && image_update_factor > m_maximumImageUpdateFactor ) image_update_factor = m_maximumImageUpdateFactor;
434  }
435  // Update image
436  *ap_newImageValue = a_currentImageValue * image_update_factor;
437  // End
438  return 0;
439 }
440 
441 // =====================================================================
442 // ---------------------------------------------------------------------
443 // ---------------------------------------------------------------------
444 // =====================================================================
int ReadStringOption(const string &a_input, T *ap_return, int a_nbElts, const string &sep, const string &a_option)
Parse the &#39;a_input&#39; string corresponding to the &#39;a_option&#39; into &#39;a_nbElts&#39; elements, using the &#39;sep&#39; separator. The results are returned in the templated &#39;ap_return&#39; dynamic templated array. Call "ConvertFromString()" to perform the correct conversion depending on the type of the data to convert.
int GetNbCardBasisFunctions()
Get the number of cardiac basis functions.
#define Cerr(MESSAGE)
void ShowHelpSpecific()
A function used to show help about the child optimizer.
oImageDimensionsAndQuantification * mp_ImageDimensionsAndQuantification
int SensitivitySpecificOperations(FLTNB a_data, FLTNB a_forwardModel, FLTNB *ap_weight, FLTNB a_multiplicativeCorrections, FLTNB a_additiveCorrections, FLTNB a_blankValue, FLTNB a_quantificationFactor, oProjectionLine *ap_Line)
virtual int LocalPreProcessingStep(int a_tbf, int a_rbf, int a_cbf, INTNB a_voxel, int a_th)
int GetNbTimeBasisFunctions()
Get the number of time basis functions.
int ImageSpaceSpecificOperations(FLTNB a_currentImageValue, FLTNB *ap_newImageValue, FLTNB a_sensitivity, FLTNB *ap_correctionValues, INTNB a_voxel, int a_tbf=-1, int a_rbf=-1, int a_cbf=-1)
int ReadOptionsList(const string &a_optionsList)
int ReadConfigurationFile(const string &a_configurationFile)
virtual int GlobalPreProcessingStep()
A public function computing a global pre-processing step for the penalty.
~iOptimizerOneStepLate()
The destructor of iOptimizerOneStepLate.
#define KEYWORD_MANDATORY
#define SPEC_TRANSMISSION
This class is designed to generically described any iterative optimizer.
This class is designed to manage and store system matrix elements associated to a vEvent...
int DataSpaceSpecificOperations(FLTNB a_data, FLTNB a_forwardModel, FLTNB *ap_backwardValues, FLTNB a_multiplicativeCorrections, FLTNB a_additiveCorrections, FLTNB a_blankValue, FLTNB a_quantificationFactor, oProjectionLine *ap_Line)
int GetNbThreadsForImageComputation()
Get the number of threads used for image operations.
virtual FLTNB ComputeFirstDerivative(int a_tbf, int a_rbf, int a_cbf, INTNB a_voxel, int a_th)=0
iOptimizerOneStepLate()
The constructor of iOptimizerOneStepLate.
int ReadDataASCIIFile(const string &a_file, const string &a_keyword, T *ap_return, int a_nbElts, bool a_mandatoryFlag)
Look for "a_nbElts" elts in the "a_file" file matching the "a_keyword" string passed as parameter a...
int InitializeSpecific()
This function is used to initialize specific stuff to the child optimizer.
#define Cout(MESSAGE)
int GetNbRespBasisFunctions()
Get the number of respiratory basis functions.
int PreImageUpdateSpecificStep()
A private function used to compute the penalty term of the OneStepLate algorithm. ...
int CheckSpecificParameters()
A private function used to check the parameters settings specific to the child optimizer.