66 cout <<
"This optimizer is the NEGML algorithm from K. Van Slambrouck et al, IEEE TMI, Jan 2015, vol. 34, pp. 126-136." << endl;
67 cout <<
"Subsets can be used. This implementation only consider the psi parameter, but not the alpha image design parameter" << endl;
68 cout <<
"which is supposed to be 1 for all voxels. It implements equation 17 of the reference paper." << endl;
69 cout <<
"The following options can be used (in this particular order when provided as a list):" << endl;
70 cout <<
" initial image value: to set the uniform voxel value for the initial image" << endl;
71 cout <<
" psi: to set the psi parameter that sets the transition from Poisson to Gaussian statistics (must be positive)." << endl;
72 cout <<
" (if set to 0, then it is taken to infinity and implements equation 21 in the reference paper)." << endl;
84 key_word =
"initial image value";
87 Cerr(
"***** iOptimizerNEGML::ReadAndCheckConfigurationFile() -> Failed to get the '" << key_word <<
"' keyword !" << endl);
94 Cerr(
"***** iOptimizerNEGML::ReadAndCheckConfigurationFile() -> Failed to get the '" << key_word <<
"' keyword !" << endl);
111 if (
ReadStringOption(a_optionsList, options, 2,
",",
"NEGML configuration"))
113 Cerr(
"***** iOptimizerNEGML::ReadAndCheckConfigurationFile() -> Failed to correctly read the list of options !" << endl);
133 Cerr(
"***** iOptimizerNEGML::Initialize() -> Provided psi value (" <<
m_psi <<
") must be positive !" << endl);
150 Cout(
"iOptimizerNEGML::Initialize() -> Use the NEGML optimizer" << endl);
155 else if (
m_psi==0.)
Cout(
" --> Psi taken to infinity" << endl);
168 FLTNB a_multiplicativeCorrections,
FLTNB a_additiveCorrections,
185 FLTNB a_multiplicativeCorrections,
FLTNB a_additiveCorrections,
189 FLTNB numerator = a_data - a_forwardModel;
191 FLTNB denominator = 1.;
192 if (
m_psi>0.) denominator = max(
m_psi , a_forwardModel );
194 *ap_backwardValues = numerator / denominator;
205 FLTNB a_sensitivity,
FLTNB* ap_correctionValues )
208 FLTNB image_update_factor = *ap_correctionValues / a_sensitivity;
210 *ap_newImageValue = a_currentImageValue + image_update_factor;
bool m_listmodeCompatibility
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 ImageSpaceSpecificOperations(FLTNB a_currentImageValue, FLTNB *ap_newImageValue, FLTNB a_sensitivity, FLTNB *ap_correctionValues)
This function perform the image update step specific to the optimizer.
int DataSpaceSpecificOperations(FLTNB a_data, FLTNB a_forwardModel, FLTNB *ap_backwardValues, FLTNB a_multiplicativeCorrections, FLTNB a_additiveCorrections, FLTNB a_quantificationFactor, oProjectionLine *ap_Line)
This function performs the data space operations specific to the optimizer (computes the values to be...
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 ReadConfigurationFile(const string &a_configurationFile)
A function used to read options from a configuration file.
bool m_histogramCompatibility
#define KEYWORD_MANDATORY
Declaration of class iOptimizerNEGML.
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...
Declaration of class sOutputManager.
void ShowHelpSpecific()
A function used to show help about the child optimizer.
iOptimizerNEGML()
The constructor of iOptimizerNEGML.
~iOptimizerNEGML()
The destructor of iOptimizerNEGML.
int ReadOptionsList(const string &a_optionsList)
A function used to read options from a list of options.
int SensitivitySpecificOperations(FLTNB a_data, FLTNB a_forwardModel, FLTNB *ap_weight, FLTNB a_multiplicativeCorrections, FLTNB a_additiveCorrections, FLTNB a_quantificationFactor, oProjectionLine *ap_Line)
This function compute the weight associated to the provided event (for sensitivity computation) ...
int InitializeSpecific()
This function is used to initialize specific stuff to the child optimizer.
int CheckSpecificParameters()
A private function used to check the parameters settings specific to the child optimizer.
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.