CASToR  3.2
Tomographic Reconstruction (PET/SPECT/CT)
code/include/optimizer/oOptimizerManager.hh
Go to the documentation of this file.
1 
8 #ifndef OOPTIMIZERMANAGER_HH
9 #define OOPTIMIZERMANAGER_HH 1
10 
11 #include "gVariables.hh"
12 #include "vOptimizer.hh"
13 #include "vPenalty.hh"
14 #include "oImageSpace.hh"
15 #include "vDataFile.hh"
16 
29 {
30  // -------------------------------------------------------------------
31  // Constructor & Destructor
32  public:
47 
48 
49  // -------------------------------------------------------------------
50  // Public member functions
51  public:
59  int CheckParameters();
69  int Initialize();
75  int PreDataUpdateStep();
81  int PreImageUpdateStep();
99  int DataUpdateStep( oProjectionLine* ap_Line, vEvent* ap_Event,
100  int a_bed, int a_timeFrame, int a_respGate, int a_cardGate,
101  int a_thread );
109  int ImageUpdateStep();
110 
111 
112  // -------------------------------------------------------------------
113  // Private member functions
114  private:
128 
129 
130  // -------------------------------------------------------------------
131  // Public Get & Set functions
132  public:
138  inline void SetVerbose(int a_verboseLevel)
139  {m_verbose = a_verboseLevel;}
145  inline void SetOptionsOptimizer(const string& a_optionsOptimizer)
146  {m_optionsOptimizer = a_optionsOptimizer;}
153  inline void SetNumbersOfIterationsAndSubsets(int a_nbIterations, int* ap_nbSubsets)
154  {mp_Optimizer->SetNumbersOfIterationsAndSubsets(a_nbIterations,ap_nbSubsets);}
160  inline void SetCurrentIteration(int a_currentIteration)
161  {mp_Optimizer->SetCurrentIteration(a_currentIteration);}
167  inline void SetCurrentSubset(int a_currentSubset)
168  {mp_Optimizer->SetCurrentSubset(a_currentSubset);}
175  inline void SetOptionsPenalty(const string& a_optionsPenalty, FLTNB a_penaltyStrength)
176  {m_optionsPenalty = a_optionsPenalty; m_penaltyStrength = a_penaltyStrength;}
182  inline void SetImageDimensionsAndQuantification(oImageDimensionsAndQuantification* ap_ImageDimensionsAndQuantification)
183  {mp_ImageDimensionsAndQuantification = ap_ImageDimensionsAndQuantification;}
189  inline void SetImageSpace(oImageSpace* ap_ImageSpace)
190  {mp_ImageSpace = ap_ImageSpace;}
196  inline void SetNbTOFBins(int a_nbTOFBins)
197  {m_nbTOFBins = a_nbTOFBins;}
203  inline void SetDataMode(int a_dataMode)
204  {m_dataMode = a_dataMode;}
210  inline void SetDataType(int a_dataType)
211  {m_dataType = a_dataType;}
217  inline void SetDataSpec(int a_dataSpec)
218  {m_dataSpec = a_dataSpec;}
224  inline void SetOptimizerFOMFlag(bool a_optimizerFOMFlag)
225  {m_optimizerFOMFlag = a_optimizerFOMFlag;}
231  inline void SetOptimizerImageStatFlag(bool a_optimizerImageStatFlag)
232  {m_optimizerImageStatFlag = a_optimizerImageStatFlag;}
237  inline int GetNbBackwardImages()
238  {return mp_Optimizer->GetNbBackwardImages();}
244  {return mp_Optimizer->GetInitialValue();}
252 
258 
259  // -------------------------------------------------------------------
260  // Data members
261  private:
276  int m_verbose;
277 };
278 
279 #endif
void SetOptionsPenalty(const string &a_optionsPenalty, FLTNB a_penaltyStrength)
bool GetNeedGlobalSensitivity()
Get the boolean saying if the sensitivity has to be computed globally for all data channels and not p...
FLTNB GetInitialValue()
Return the initial image value used by the optimizer, explaining why the eponym function of vOptimize...
int PreImageUpdateStep()
A function that simply calls the eponym function from the vOptimizer.
This class is designed to manage the optimization part of an iterative reconstruction.
void SetImageDimensionsAndQuantification(oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
int Initialize()
A function used to initialize the manager and the optimizer it manages.
int DataUpdateStep(oProjectionLine *ap_Line, vEvent *ap_Event, int a_bed, int a_timeFrame, int a_respGate, int a_cardGate, int a_thread)
void SetOptionsOptimizer(const string &a_optionsOptimizer)
void SetOptimizerFOMFlag(bool a_optimizerFOMFlag)
int GetNbBackwardImages()
Return the number of backward images used by the optimizer, explaining why the eponym function of vOp...
int PreDataUpdateStep()
A function that simply calls the eponym function from the vOptimizer.
Declaration of class vOptimizer.
This class is designed to generically described any penalty applied to MAP algorithms.
void SetCurrentIteration(int a_currentIteration)
FLTNB GetInitialValue()
Get the initial image value (for initialization)
void SetNumbersOfIterationsAndSubsets(int a_nbIterations, int *ap_nbSubsets)
bool GetNeedGlobalSensitivity()
Get the boolean saying if the sensitivity has to be computed globally.
int CheckParameters()
A function used to check the parameters settings.
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...
~oOptimizerManager()
The destructor of oOptimizerManager.
This class holds all the matrices in the image domain that can be used in the algorithm: image...
void SetNumbersOfIterationsAndSubsets(int a_nbIterations, int *ap_nbSubsets)
Mother class for the Event objects.
void SetCurrentIteration(int a_currentIteration)
void SetCurrentSubset(int a_currentSubset)
int ImageUpdateStep()
A function dedicated to the update step in the image space (performed after the loop on events) ...
vOptimizer * GetOptimizer()
Return the optimizer object.
This class is designed to manage all dimensions and quantification related stuff. ...
oOptimizerManager()
The constructor of oOptimizerManager.
int GetNbBackwardImages()
Get the number of backward images used by the specific optimizer.
void SetImageSpace(oImageSpace *ap_ImageSpace)
Declaration of class vPenalty.
oImageDimensionsAndQuantification * mp_ImageDimensionsAndQuantification
void SetOptimizerImageStatFlag(bool a_optimizerImageStatFlag)