CASToR  3.0
Tomographic Reconstruction (PET/SPECT/CT)
iOptimizerBSREM.hh
Go to the documentation of this file.
1 /*
2 This file is part of CASToR.
3 
4  CASToR is free software: you can redistribute it and/or modify it under the
5  terms of the GNU General Public License as published by the Free Software
6  Foundation, either version 3 of the License, or (at your option) any later
7  version.
8 
9  CASToR is distributed in the hope that it will be useful, but WITHOUT ANY
10  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12  details.
13 
14  You should have received a copy of the GNU General Public License along with
15  CASToR (in file GNU_GPL.TXT). If not, see <http://www.gnu.org/licenses/>.
16 
17 Copyright 2017-2019 all CASToR contributors listed below:
18 
19  --> Didier BENOIT, Claude COMTAT, Marina FILIPOVIC, Thibaut MERLIN, Mael MILLARDET, Simon STUTE, Valentin VIELZEUF
20 
21 This is CASToR version 3.0.
22 */
23 
30 #ifndef IOPTIMIZERBSREM_HH
31 #define IOPTIMIZERBSREM_HH 1
32 
33 #include "gVariables.hh"
34 #include "sAddonManager.hh"
35 #include "vOptimizer.hh"
36 #include "oImageSpace.hh"
37 
38 #define BSREM_RELAXATION_CLASSIC 0
39 #define BSREM_NOT_DEFINED -1
40 
47 {
48  // -------------------------------------------------------------------
49  // Constructor & Destructor
50  public:
65 
66 
67  // -------------------------------------------------------------------
68  // Public member functions
69  public:
70  // Function for automatic insertion (put the class name as the parameter and do not add semi-column at the end of the line)
82  int ReadConfigurationFile(const string& a_configurationFile);
93  int ReadOptionsList(const string& a_optionsList);
94 
95  // -------------------------------------------------------------------
96  // Private member functions (virtual in vOptimizer)
97  private:
98 
107 
108 
109  // -------------------------------------------------------------------
110  // Private member functions (pure virtual in vOptimizer)
111  private:
121  void ShowHelpSpecific();
138  int InitializeSpecific();
154  int SensitivitySpecificOperations( FLTNB a_data, FLTNB a_forwardModel, FLTNB* ap_weight,
155  FLTNB a_multiplicativeCorrections, FLTNB a_additiveCorrections, FLTNB a_blankValue,
156  FLTNB a_quantificationFactor, oProjectionLine* ap_Line );
173  int DataSpaceSpecificOperations( FLTNB a_data, FLTNB a_forwardModel, FLTNB* ap_backwardValues,
174  FLTNB a_multiplicativeCorrections, FLTNB a_additiveCorrections, FLTNB a_blankValue,
175  FLTNB a_quantificationFactor, oProjectionLine* ap_Line );
191  int ImageSpaceSpecificOperations( FLTNB a_currentImageValue, FLTNB* ap_newImageValue,
192  FLTNB a_sensitivity, FLTNB* ap_correctionValues,
193  INTNB a_voxel, int a_tbf = -1, int a_rbf = -1, int a_cbf = -1 );
194 
195 
196  // -------------------------------------------------------------------
197  // Data members
198  private:
207 };
208 
209 // Class for automatic insertion (set here the visible optimizer's name as the first parameter,
210 // put the class name as the second parameter and do NOT add semi-colon at the end of the line)
212 
213 #endif
214 
void ShowHelpSpecific()
A function used to show help about the child optimizer.
iOptimizerBSREM()
The constructor of iOptimizerBSREM.
This header file is mainly used to declare some macro definitions and all includes needed from the st...
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 performs the image update step specific to the optimizer.
#define FLTNB
Definition: gVariables.hh:81
int ReadOptionsList(const string &a_optionsList)
A function used to read options from a list of options.
HPFLTNB m_relaxationFactorStepSize
#define HPFLTNB
Definition: gVariables.hh:83
HPFLTNB m_maximumImageValue
HPFLTNB m_relaxationFactorInitialValue
int ReadConfigurationFile(const string &a_configurationFile)
A function used to read options from a configuration file.
int CheckSpecificParameters()
A private function used to check the parameters settings specific to the child optimizer.
FLTNB **** m4p_firstDerivativePenaltyImage
This class implements the Block Sequential Regularized Expectation Maximization (BSREM) algorithm...
int InitializeSpecific()
This function is used to initialize specific stuff to the child 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) ...
Declaration of class vOptimizer.
#define FUNCTION_OPTIMIZER(CLASS)
Definition: vOptimizer.hh:708
HPFLTNB m_minimumImageValue
HPFLTNB m_relaxationFactor
#define CLASS_OPTIMIZER(NAME, CLASS)
Definition: vOptimizer.hh:712
#define INTNB
Definition: gVariables.hh:92
~iOptimizerBSREM()
The destructor of iOptimizerBSREM.
This class is designed to generically described any iterative optimizer.
Definition: vOptimizer.hh:59
This class is designed to manage and store system matrix elements associated to a vEvent...
Declaration of class oImageSpace.
int PreImageUpdateSpecificStep()
A private function used to compute the penalty term of the BSREM algorithm.
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...
Declaration of class sAddonManager.