9 #include "sOutputManager.hh" 60 cout <<
"This is a specific optimizer to compute a sensitivity image from a uniform acquisition, such as a uniform cylinder covering the FOV." << endl;
61 cout <<
"To use it, just add '-opti SENS' in the command-line option." << endl;
62 cout <<
"The data update step treats the input image as a mumap in cm-1 (data update step = 1 / exp(forwardProj*0.1)" << endl;
63 cout <<
"The image update step just take the image update factor as the actual image value" << endl;
64 cout <<
"This is just a quick/cheap implementation of such process, so here is a few remarks to make it work:" << endl;
65 cout <<
"- Iterations/subsets MUST both be 1 (-it 1:1)" << endl;
66 cout <<
"- For attenuation, an input mumap (cm-1) could be incorporated with the option -img. Make sure however it has the same numbers of voxel and voxel sizes than reconstruction" << endl;
67 cout <<
"- Calibration factor in the datafile header MUST be set to 1" << endl;
68 cout <<
"- The command-line options MUST disable frame duration correction, use the following command: 'ignore-corr fdur' " << endl;
69 cout <<
"- The algorithm will still try to compute a sensitivity image before the reconstruction process, whereas we just want the reconstruction to compute our sensitivity image" << endl;
70 cout <<
" Just input any image with the -sens option to bypass that step (the values from this image will not be taken into account anyway)." << endl;
71 cout <<
" Make sure it is the same dimensions as reconstruction dimensions and voxel sizes" << endl;
83 key_word =
"initial image value";
86 Cerr(
"***** iOptimizerSens::ReadConfigurationFile() -> Failed to get the '" << key_word <<
"' keyword !" << endl);
90 key_word =
"denominator threshold";
93 Cerr(
"***** iOptimizerSens::ReadConfigurationFile() -> Failed to get the '" << key_word <<
"' keyword !" << endl);
97 key_word =
"minimum image update";
100 Cerr(
"***** iOptimizerSens::ReadConfigurationFile() -> Failed to get the '" << key_word <<
"' keyword !" << endl);
104 key_word =
"maximum image update";
107 Cerr(
"***** iOptimizerSens::ReadConfigurationFile() -> Failed to get the '" << key_word <<
"' keyword !" << endl);
122 const int nb_options = 4;
123 FLTNB options[nb_options];
126 if (
ReadStringOption(a_optionsList, options, nb_options,
",",
"MLEM configuration"))
128 Cerr(
"***** iOptimizerSens::ReadOptionsList() -> Failed to correctly read the list of options !" << endl);
151 Cerr(
"***** iOptimizerSens->CheckSpecificParameters() -> Provided initial image value (" <<
m_initialValue <<
") must be positive !" << endl);
157 Cerr(
"***** iOptimizerSens->CheckSpecificParameters() -> Provided data space denominator threshold (" <<
m_dataSpaceDenominatorThreshold <<
") must be strictly positive !" << endl);
181 Cout(
"iOptimizerSens::InitializeSpecific() -> Use the SENS optimizer" << endl);
187 else Cerr(
"!!!!! The minimum update value is not set, if using subsets, voxels could be trapped in 0 value causing some negative bias !" << endl);
201 FLTNB a_multiplicativeCorrections,
FLTNB a_additiveCorrections,
FLTNB a_blankValue,
223 FLTNB a_multiplicativeCorrections,
FLTNB a_additiveCorrections,
FLTNB a_blankValue,
231 if (a_multiplicativeCorrections<=0.)
return 0;
234 if (a_quantificationFactor<=0.)
return 0;
243 FLTNB acf = exp(-mux);
248 *ap_backwardValues = acf;
259 FLTNB a_sensitivity,
FLTNB* ap_correctionValues,
260 INTNB a_voxel,
int a_tbf,
int a_rbf,
int a_cbf )
264 FLTNB image_update_factor = *ap_correctionValues ;
270 *ap_newImageValue = image_update_factor;
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...
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.
bool m_listmodeCompatibility
int CheckSpecificParameters()
A private function used to check the parameters settings specific to the child optimizer.
Declaration of class iOptimizerSens.
int ReadConfigurationFile(const string &a_configurationFile)
A function used to read options from a configuration file.
int InitializeSpecific()
This function is used to initialize specific stuff to the child optimizer.
FLTNB m_dataSpaceDenominatorThreshold
~iOptimizerSens()
The destructor of iOptimizerSens.
FLTNB m_maximumImageUpdateFactor
bool m_emissionCompatibility
iOptimizerSens()
The constructor of iOptimizerSens.
bool m_histogramCompatibility
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) ...
#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...
FLTNB m_minimumImageUpdateFactor
void ShowHelpSpecific()
A function used to show help about 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.