82 cout <<
"This optimizer implements the standard Landweber algorithm for least-squares optimization." << endl;
83 cout <<
"With transmission data, it uses the log-converted model to derive the update." << endl;
84 cout <<
"Be aware that the relaxation parameter is not automatically set, so it often requires some" << endl;
85 cout <<
"trials and errors to find an optimal setting. Also, remember that this algorithm is particularly" << endl;
86 cout <<
"slow to converge." << endl;
87 cout <<
"The following options can be used (in this particular order when provided as a list):" << endl;
88 cout <<
" initial image value: to set the uniform voxel value for the initial image" << endl;
89 cout <<
" relaxation factor: to set the relaxation factor applied to the update" << endl;
90 cout <<
" non-negativity constraint: 0 if no constraint or 1 in order to apply the constraint during the image update" << endl;
100 string key_word =
"";
102 key_word =
"initial image value";
105 Cerr(
"***** iOptimizerLandweber::ReadConfigurationFile() -> Failed to get the '" << key_word <<
"' keyword !" << endl);
109 key_word =
"relaxation factor";
112 Cerr(
"***** iOptimizerLandweber::ReadConfigurationFile() -> Failed to get the '" << key_word <<
"' keyword !" << endl);
116 key_word =
"non-negativity constraint";
119 Cerr(
"***** iOptimizerMLTR::ReadConfigurationFile() -> Failed to get the '" << key_word <<
"' keyword !" << endl);
134 const int nb_options = 3;
135 FLTNB options[nb_options];
137 if (
ReadStringOption(a_optionsList, options, nb_options,
",",
"Landweber configuration"))
139 Cerr(
"***** iOptimizerLandweber::ReadOptionsList() -> Failed to correctly read the list of options !" << endl);
161 Cerr(
"***** iOptimizerLandweber->CheckSpecificParameters() -> Provided relaxation factor (" <<
m_relaxationFactor <<
") must be strictly positive !" << endl);
178 Cout(
"iOptimizerLandweber::InitializeSpecific() -> Use the Landweber algorithm" << endl);
196 FLTNB a_multiplicativeCorrections,
FLTNB a_additiveCorrections,
FLTNB a_blankValue,
211 FLTNB a_multiplicativeCorrections,
FLTNB a_additiveCorrections,
FLTNB a_blankValue,
218 *ap_backwardValues = (a_data - a_forwardModel);
224 a_data -= a_additiveCorrections;
225 a_forwardModel -= a_additiveCorrections;
227 if (a_data<1. || a_forwardModel<1.) *ap_backwardValues = 0.;
229 *ap_backwardValues = log( a_forwardModel / a_data );
241 FLTNB a_sensitivity,
FLTNB* ap_correctionValues,
242 INTNB a_voxel,
int a_tbf,
int a_rbf,
int a_cbf )
247 *ap_newImageValue = a_currentImageValue + image_update_factor;
int ReadOptionsList(const string &a_optionsList)
A function used to read options from a list of options.
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 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) ...
void ShowHelpSpecific()
A function used to show help about the child optimizer.
bool m_listmodeCompatibility
int ReadConfigurationFile(const string &a_configurationFile)
A function used to read options from a configuration file.
~iOptimizerLandweber()
The destructor of iOptimizerLandweber.
int InitializeSpecific()
This function is used to initialize specific stuff to the child optimizer.
bool m_emissionCompatibility
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...
bool m_histogramCompatibility
#define KEYWORD_MANDATORY
#define SPEC_TRANSMISSION
Declaration of class iOptimizerLandweber.
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
iOptimizerLandweber()
The constructor of iOptimizerLandweber.
Declaration of class sOutputManager.
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 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...