CASToR  3.2
Tomographic Reconstruction (PET/SPECT/CT)
iOptimizerADMMLim.hh
Go to the documentation of this file.
1 
8 #ifndef iOptimizerADMMLim_HH
9 #define iOptimizerADMMLim_HH 1
10 
11 #include "gVariables.hh"
12 #include "sAddonManager.hh"
13 #include "vOptimizer.hh"
15 
16 #define ADMMLIM_NOT_ADAPTIVE 0
17 #define ADMMLIM_ADAPTIVE_ALPHA 1
18 #define ADMMLIM_ADAPTIVE_ALPHA_AND_TAU 2
19 #define ADMMLIM_NOT_DEFINED -1
20 
21 #define ADMMLIM_DO_NOT_SAVE_SINOGRAMS 0
22 #define ADMMLIM_SAVE_SINOGRAMS 1
23 
31 {
32  // -------------------------------------------------------------------
33  // Constructor & Destructor
34  public:
49 
50 
51  // -------------------------------------------------------------------
52  // Public member functions
53  public:
54  // Function for automatic insertion (put the class name as the parameter and do not add semi-column at the end of the line)
66  int ReadConfigurationFile(const string& a_configurationFile);
77  int ReadOptionsList(const string& a_optionsList);
78 
93  virtual int DataStep4Optional( oProjectionLine* ap_Line, vEvent* ap_Event,
94  int a_bed, int a_timeFrame, int a_respGate, int a_cardGate,
95  int a_thread );
112  virtual int DataStep5ComputeCorrections( oProjectionLine* ap_Line, vEvent* ap_Event,
113  int a_bed, int a_timeFrame, int a_respGate, int a_cardGate,
114  int a_thread );
130  virtual int DataStep6Optional( oProjectionLine* ap_Line, vEvent* ap_Event,
131  int a_bed, int a_timeFrame, int a_respGate, int a_cardGate,
132  int a_thread );
133 
134  // -------------------------------------------------------------------
135  // Private member functions (virtual in vOptimizer)
136  private:
144  virtual int PreDataUpdateSpecificStep();
162  void ShowHelpSpecific();
179  int InitializeSpecific();
195  int SensitivitySpecificOperations( FLTNB a_data, FLTNB a_forwardModel, FLTNB* ap_weight,
196  FLTNB a_multiplicativeCorrections, FLTNB a_additiveCorrections, FLTNB a_blankValue,
197  FLTNB a_quantificationFactor, oProjectionLine* ap_Line );
215  int DataSpaceSpecificOperations( FLTNB a_data, FLTNB a_forwardModel, FLTNB* ap_backwardValues,
216  FLTNB a_multiplicativeCorrections, FLTNB a_additiveCorrections, FLTNB a_blankValue,
217  FLTNB a_quantificationFactor, oProjectionLine* ap_Line);
234  int ImageSpaceSpecificOperations( FLTNB a_currentImageValue, FLTNB* apImageValue,
235  FLTNB a_sensitivity, FLTNB* ap_correctionValues,
236  INTNB a_voxel, int a_tbf = -1, int a_rbf = -1, int a_cbf = -1 );
247  virtual int ImageUpdateStep();
248 
249  // -------------------------------------------------------------------
250  // Data members
251  private:
253  // Variables to compute u and v in DataStep6
256  // Variables involved in adaptive alpha and tau computation
263  // All stored vectors (those linked to gradient, sinograms u, v and Ax)
269  // Vector norms
278  // General variables
287 };
288 
289 
290 // Class for automatic insertion (set here the visible optimizer's name as the first parameter,
291 // put the class name as the second parameter and do NOT add semi-colon at the end of the line)
293 
294 #endif
295 
HPFLTNB * mp_projGradSquareNorm
int CheckSpecificParameters()
A private function used to check the parameters settings specific to the child optimizer.
iOptimizerADMMLim()
The constructor of iOptimizerADMMLim.
virtual int DataStep4Optional(oProjectionLine *ap_Line, vEvent *ap_Event, int a_bed, int a_timeFrame, int a_respGate, int a_cardGate, int a_thread)
HPFLTNB * mp_penaltyGradSquareNorm
virtual int DataStep6Optional(oProjectionLine *ap_Line, vEvent *ap_Event, int a_bed, int a_timeFrame, int a_respGate, int a_cardGate, int a_thread)
A public function to compute the analytical solution of ADMM equation on v and update u...
int ReadConfigurationFile(const string &a_configurationFile)
A function used to read options from a configuration file.
void ShowHelpSpecific()
A function used to show help about the child optimizer.
Declaration of class vOptimizer.
virtual int DataStep5ComputeCorrections(oProjectionLine *ap_Line, vEvent *ap_Event, int a_bed, int a_timeFrame, int a_respGate, int a_cardGate, int a_thread)
A public function used to compute the correction terms in the data space, for the provided event...
FLTNB **** m4p_firstDerivativePenaltyImage
~iOptimizerADMMLim()
The destructor of iOptimizerADMMLim.
FLTNB **** m4p_currentGradFrameGates
Declaration of class iPenaltyMarkovRandomField.
#define FUNCTION_OPTIMIZER(CLASS)
#define CLASS_OPTIMIZER(NAME, CLASS)
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...
int ReadOptionsList(const string &a_optionsList)
A function used to read options from a list of options.
virtual int PreDataUpdateSpecificStep()
A private function used to compute some norms for the image update.
This class implements the ADMM with non-negativity on projection space.
Mother class for the Event objects.
int PreImageUpdateSpecificStep()
A private function used to compute the penalty term update adaptive alpha of the ADMM algorithm...
virtual int ImageUpdateStep()
A public function used to perform the image update step of the optimizer.
int InitializeSpecific()
This function is used to initialize specific stuff to the child optimizer.
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 ImageSpaceSpecificOperations(FLTNB a_currentImageValue, FLTNB *apImageValue, 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) ...