89 cout <<
"This optimizer is a version of the MLTR algorithm implemented from equation 16 of the paper from K. Van Slambrouck and J. Nuyts:" << endl;
90 cout <<
"\"Reconstruction scheme for accelerated maximum lihelihood reconstruction: the patchwork structure\"," << endl;
91 cout <<
"IEEE Trans. Nucl. Sci., vol. 61, pp. 173-81, 2014." << endl;
92 cout <<
"An additional empiric relaxation factor has been added onto the additive update. Its value onto the first and last updates" << endl;
93 cout <<
"can be parameterized. Its value for all updates in between is computed linearly from these first and last provided values." << endl;
94 cout <<
"The design parameter 'alpha' is not used here." << endl;
95 cout <<
"Subsets can be used." << endl;
96 cout <<
"The following options can be used (in this particular order when provided as a list):" << endl;
97 cout <<
" initial image value: to set the uniform voxel value for the initial image" << endl;
99 cout <<
" initial relaxation factor: to set the empiric multiplicative factor on the additive update used at the first update" << endl;
100 cout <<
" final relaxation factor: to set the empiric multiplicative factor on the additive update used at the last update" << endl;
101 cout <<
" non-negativity constraint: 0 if no constraint or 1 in order to apply the constraint during the image update" << endl;
111 string key_word =
"";
113 key_word =
"initial image value";
116 Cerr(
"***** iOptimizerMLTR::ReadConfigurationFile() -> Failed to get the '" << key_word <<
"' keyword !" << endl);
129 key_word =
"initial relaxation factor";
132 Cerr(
"***** iOptimizerMLTR::ReadConfigurationFile() -> Failed to get the '" << key_word <<
"' keyword !" << endl);
136 key_word =
"final relaxation factor";
139 Cerr(
"***** iOptimizerMLTR::ReadConfigurationFile() -> Failed to get the '" << key_word <<
"' keyword !" << endl);
143 key_word =
"non-negativity constraint";
146 Cerr(
"***** iOptimizerMLTR::ReadConfigurationFile() -> Failed to get the '" << key_word <<
"' keyword !" << endl);
161 const int nb_options = 4;
162 FLTNB options[nb_options];
164 if (
ReadStringOption(a_optionsList, options, nb_options,
",",
"MLTR configuration"))
166 Cerr(
"***** iOptimizerMLTR::ReadOptionsList() -> Failed to correctly read the list of options !" << endl);
198 Cerr(
"***** iOptimizerMLTR->CheckSpecificParameters() -> Provided initial relaxation factor (" <<
m_initialRelaxationFactor <<
") must be positive !" << endl);
203 Cerr(
"***** iOptimizerMLTR->CheckSpecificParameters() -> Provided final relaxation factor (" <<
m_finalRelaxationFactor <<
") must be positive !" << endl);
220 Cout(
"iOptimizerMLTR::InitializeSpecific() -> Use the MLTR optimizer" << endl);
314 Cerr(
"***** iOptimizerMLTR::PreImageUpdateSpecificStep() -> Initial and final relaxation differ while there is only one update to do !" << endl);
322 int total_number_of_updates_minus_one = -1;
325 int current_update_index = 0;
329 FLTNB ratio_of_updates = ((
FLTNB)current_update_index) / ((
FLTNB)total_number_of_updates_minus_one);
347 FLTNB a_multiplicativeCorrections,
FLTNB a_additiveCorrections,
FLTNB a_blankValue,
363 FLTNB a_multiplicativeCorrections,
FLTNB a_additiveCorrections,
FLTNB a_blankValue,
367 if (a_data<0.) a_data = 0.;
369 *ap_backwardValues = a_forwardModel - a_data;
380 FLTNB a_sensitivity,
FLTNB* ap_correctionValues,
381 INTNB a_voxel,
int a_tbf,
int a_rbf,
int a_cbf )
387 *ap_newImageValue = a_currentImageValue + image_update_factor;
~iOptimizerMLTR()
The destructor of iOptimizerMLTR.
bool m_listmodeCompatibility
FLTNB m_initialRelaxationFactor
void ShowHelpSpecific()
A function used to show help about the child optimizer.
FLTNB ForwardProject(oProjectionLine *ap_Line, FLTNB *ap_image=NULL)
A function used to forward project the provided image (or 1 if NULL), based on the provided oProjecti...
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)
This function performs the data space operations specific to the optimizer (computes the values to be...
FLTNB m_currentRelaxationFactor
bool m_emissionCompatibility
iOptimizerMLTR()
The constructor of iOptimizerMLTR.
int CheckSpecificParameters()
A private function used to check the parameters settings specific to the child optimizer.
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 ReadOptionsList(const string &a_optionsList)
A function used to read options from a list of options.
Declaration of class iOptimizerMLTR.
bool m_histogramCompatibility
int InitializeSpecific()
This function is used to initialize specific stuff to the child optimizer.
#define KEYWORD_MANDATORY
bool m_transmissionCompatibility
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...
bool m_nonNegativityConstraint
FLTNB m_finalRelaxationFactor
Declaration of class sOutputManager.
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)
This function perform the image update step specific to the optimizer.
int PreImageUpdateSpecificStep()
This function is overloaded from the vOptimizer that does nothing by default.
int ReadConfigurationFile(const string &a_configurationFile)
A function used to read options from a configuration file.
int ReadStringOption(const string &a_input, T *ap_return, int a_nbElts, const string &sep, const string &a_option)
Parse the 'a_input' string corresponding to the 'a_option' into 'a_nbElts' elements, using the 'sep' separator. The results are returned in the templated 'ap_return' dynamic templated array. Call "ConvertFromString()" to perform the correct conversion depending on the type of the data to convert.
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)
This function compute the weight associated to the provided event (for sensitivity computation) ...