![]() |
CASToR
3.2
Tomographic Reconstruction (PET/SPECT/CT)
|
This class is designed to manage the optimization part of an iterative reconstruction. More...
#include <oOptimizerManager.hh>
Public Member Functions | |
oOptimizerManager () | |
The constructor of oOptimizerManager. More... | |
~oOptimizerManager () | |
The destructor of oOptimizerManager. More... | |
int | CheckParameters () |
A function used to check the parameters settings. More... | |
int | Initialize () |
A function used to initialize the manager and the optimizer it manages. More... | |
int | PreDataUpdateStep () |
A function that simply calls the eponym function from the vOptimizer. More... | |
int | PreImageUpdateStep () |
A function that simply calls the eponym function from the vOptimizer. More... | |
int | DataUpdateStep (oProjectionLine *ap_Line, vEvent *ap_Event, int a_bed, int a_timeFrame, int a_respGate, int a_cardGate, int a_thread) |
int | ImageUpdateStep () |
A function dedicated to the update step in the image space (performed after the loop on events) More... | |
void | SetVerbose (int a_verboseLevel) |
void | SetOptionsOptimizer (const string &a_optionsOptimizer) |
void | SetNumbersOfIterationsAndSubsets (int a_nbIterations, int *ap_nbSubsets) |
void | SetCurrentIteration (int a_currentIteration) |
void | SetCurrentSubset (int a_currentSubset) |
void | SetOptionsPenalty (const string &a_optionsPenalty, FLTNB a_penaltyStrength) |
void | SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification) |
void | SetImageSpace (oImageSpace *ap_ImageSpace) |
void | SetNbTOFBins (int a_nbTOFBins) |
void | SetDataMode (int a_dataMode) |
void | SetDataType (int a_dataType) |
void | SetDataSpec (int a_dataSpec) |
void | SetOptimizerFOMFlag (bool a_optimizerFOMFlag) |
void | SetOptimizerImageStatFlag (bool a_optimizerImageStatFlag) |
int | GetNbBackwardImages () |
Return the number of backward images used by the optimizer, explaining why the eponym function of vOptimizer is called. More... | |
FLTNB | GetInitialValue () |
Return the initial image value used by the optimizer, explaining why the eponym function of vOptimizer is called. More... | |
bool | GetNeedGlobalSensitivity () |
Get the boolean saying if the sensitivity has to be computed globally. More... | |
vOptimizer * | GetOptimizer () |
Return the optimizer object. More... | |
oOptimizerManager () | |
~oOptimizerManager () | |
int | CheckParameters () |
int | Initialize () |
int | PreDataUpdateStep () |
int | PreImageUpdateStep () |
int | DataUpdateStep (oProjectionLine *ap_Line, vEvent *ap_Event, int a_bed, int a_timeFrame, int a_respGate, int a_cardGate, int a_thread) |
int | ImageUpdateStep () |
void | SetVerbose (int a_verboseLevel) |
void | SetOptionsOptimizer (const string &a_optionsOptimizer) |
void | SetNumbersOfIterationsAndSubsets (int a_nbIterations, int *ap_nbSubsets) |
void | SetOutputIterations (bool *ap_outputIterations) |
Set the selected output iterations to the vOptimizer. More... | |
void | SetCurrentIteration (int a_currentIteration) |
void | SetCurrentSubset (int a_currentSubset) |
void | SetOptionsPenalty (const string &a_optionsPenalty, FLTNB a_penaltyStrength) |
void | SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification) |
void | SetImageSpace (oImageSpace *ap_ImageSpace) |
void | SetNbTOFBins (int a_nbTOFBins) |
void | SetDataMode (int a_dataMode) |
void | SetDataType (int a_dataType) |
void | SetDataFile (vDataFile *ap_DataFile) |
Set the data file in use. More... | |
void | SetDataSpec (int a_dataSpec) |
void | SetOptimizerFOMFlag (bool a_optimizerFOMFlag) |
void | SetOptimizerImageStatFlag (bool a_optimizerImageStatFlag) |
void | SetImageConvolverManager (oImageConvolverManager *ap_ImageConvolverManager) |
Set the Image Convolver Manager Object. More... | |
int | GetNbBackwardImages () |
FLTNB | GetInitialValue () |
bool | GetNeedGlobalSensitivity () |
int | GetNbSubIterationsInOneIteration () |
Get the number of sub iterations in one iteration. More... | |
bool | NeedPreIteration () |
Say if the optimizer needs a pre-process loop before iterations are done. More... | |
void | EnterPreIteration () |
Set pre-process flag of the vOptimizer to true. More... | |
void | ExitPreIteration () |
Set pre-process flag of the vOptimizer to false. More... | |
bool | NeedPostIteration () |
Say if the optimizer needs a post-process loop after iterations are done. More... | |
void | EnterPostIteration () |
Set post-process flag of the vOptimizer to true. More... | |
void | ExitPostIteration () |
Set post-process flag of the vOptimizer to false. More... | |
vOptimizer * | GetOptimizer () |
Private Member Functions | |
int | ParseOptionsAndInitializeOptimizerAndPenalty () |
int | ParseOptionsAndInitializeOptimizerAndPenalty () |
Private Attributes | |
oImageDimensionsAndQuantification * | mp_ImageDimensionsAndQuantification |
oImageSpace * | mp_ImageSpace |
int | m_dataMode |
int | m_dataType |
int | m_dataSpec |
int | m_nbTOFBins |
string | m_optionsOptimizer |
string | m_optionsPenalty |
FLTNB | m_penaltyStrength |
bool | m_optimizerFOMFlag |
bool | m_optimizerImageStatFlag |
vOptimizer * | mp_Optimizer |
vPenalty * | mp_Penalty |
int | m_verbose |
oImageConvolverManager * | mp_ImageConvolverManager |
vDataFile * | mp_DataFile |
This class is designed to manage the optimization part of an iterative reconstruction.
As each manager class, it is created in the main program, all parameters are then set, checked, and the manager is initialized. The manager is then used by the algorithm itself, where the function DataUpdateStep() function is called for each event to apply the forward projection, perform operations in the data space and apply the back-proj, based on a oProjectionLine, a vEvent and a vOptimizer. The ImageUpdateStep() function is called after the loop on events to apply the update operations in the image space, based on the back-projected correction images.
Definition at line 28 of file code/include/optimizer/oOptimizerManager.hh.
oOptimizerManager::oOptimizerManager | ( | ) |
The constructor of oOptimizerManager.
This is the default and unique constructor. It does not take any parameter and its role is only to affect default values to each member of the class.
Definition at line 17 of file code/src/optimizer/oOptimizerManager.cc.
oOptimizerManager::~oOptimizerManager | ( | ) |
The destructor of oOptimizerManager.
This is the default and unique destructor. It does not take any parameter and its role is only to free or delete all structures that were built by this class.
Definition at line 50 of file code/src/optimizer/oOptimizerManager.cc.
oOptimizerManager::oOptimizerManager | ( | ) |
oOptimizerManager::~oOptimizerManager | ( | ) |
int oOptimizerManager::CheckParameters | ( | ) |
A function used to check the parameters settings.
This function does not take any parameter and is used to check that all mandatory members were correctly parameterized.
Definition at line 61 of file code/src/optimizer/oOptimizerManager.cc.
int oOptimizerManager::CheckParameters | ( | ) |
int oOptimizerManager::DataUpdateStep | ( | oProjectionLine * | ap_Line, |
vEvent * | ap_Event, | ||
int | a_bed, | ||
int | a_timeFrame, | ||
int | a_respGate, | ||
int | a_cardGate, | ||
int | a_thread | ||
) |
Definition at line 397 of file code/src/optimizer/oOptimizerManager.cc.
int oOptimizerManager::DataUpdateStep | ( | oProjectionLine * | ap_Line, |
vEvent * | ap_Event, | ||
int | a_bed, | ||
int | a_timeFrame, | ||
int | a_respGate, | ||
int | a_cardGate, | ||
int | a_thread | ||
) |
|
inline |
Set post-process flag of the vOptimizer to true.
Definition at line 317 of file include/optimizer/oOptimizerManager.hh.
|
inline |
Set pre-process flag of the vOptimizer to true.
Definition at line 298 of file include/optimizer/oOptimizerManager.hh.
|
inline |
Set post-process flag of the vOptimizer to false.
Definition at line 323 of file include/optimizer/oOptimizerManager.hh.
|
inline |
Set pre-process flag of the vOptimizer to false.
Definition at line 304 of file include/optimizer/oOptimizerManager.hh.
|
inline |
Return the initial image value used by the optimizer, explaining why the eponym function of vOptimizer is called.
Definition at line 243 of file code/include/optimizer/oOptimizerManager.hh.
|
inline |
Definition at line 271 of file include/optimizer/oOptimizerManager.hh.
|
inline |
Return the number of backward images used by the optimizer, explaining why the eponym function of vOptimizer is called.
Definition at line 237 of file code/include/optimizer/oOptimizerManager.hh.
|
inline |
Definition at line 265 of file include/optimizer/oOptimizerManager.hh.
|
inline |
Get the number of sub iterations in one iteration.
Definition at line 285 of file include/optimizer/oOptimizerManager.hh.
|
inline |
Get the boolean saying if the sensitivity has to be computed globally.
This is managed by the optimizer itself
Definition at line 250 of file code/include/optimizer/oOptimizerManager.hh.
|
inline |
Definition at line 278 of file include/optimizer/oOptimizerManager.hh.
|
inline |
Return the optimizer object.
Definition at line 257 of file code/include/optimizer/oOptimizerManager.hh.
|
inline |
Definition at line 330 of file include/optimizer/oOptimizerManager.hh.
int oOptimizerManager::ImageUpdateStep | ( | ) |
A function dedicated to the update step in the image space (performed after the loop on events)
This function will update the visited voxels first (see in vOptimizer for details), manage the call for penalty computation and call the image update step function specific to the optimizer.
Definition at line 492 of file code/src/optimizer/oOptimizerManager.cc.
int oOptimizerManager::ImageUpdateStep | ( | ) |
int oOptimizerManager::Initialize | ( | ) |
A function used to initialize the manager and the optimizer it manages.
This function does not take any parameter and is used to initialize everything that should be initialized. In a few words, it parses the options, then creates and initializes the optimizer based on the provided options.
Definition at line 114 of file code/src/optimizer/oOptimizerManager.cc.
int oOptimizerManager::Initialize | ( | ) |
|
inline |
Say if the optimizer needs a post-process loop after iterations are done.
Definition at line 311 of file include/optimizer/oOptimizerManager.hh.
|
inline |
Say if the optimizer needs a pre-process loop before iterations are done.
Definition at line 292 of file include/optimizer/oOptimizerManager.hh.
|
private |
Definition at line 135 of file code/src/optimizer/oOptimizerManager.cc.
|
private |
int oOptimizerManager::PreDataUpdateStep | ( | ) |
A function that simply calls the eponym function from the vOptimizer.
Definition at line 363 of file code/src/optimizer/oOptimizerManager.cc.
int oOptimizerManager::PreDataUpdateStep | ( | ) |
int oOptimizerManager::PreImageUpdateStep | ( | ) |
A function that simply calls the eponym function from the vOptimizer.
Definition at line 380 of file code/src/optimizer/oOptimizerManager.cc.
int oOptimizerManager::PreImageUpdateStep | ( | ) |
|
inline |
Definition at line 160 of file code/include/optimizer/oOptimizerManager.hh.
|
inline |
Definition at line 168 of file include/optimizer/oOptimizerManager.hh.
|
inline |
Definition at line 167 of file code/include/optimizer/oOptimizerManager.hh.
|
inline |
Definition at line 181 of file include/optimizer/oOptimizerManager.hh.
|
inline |
Set the data file in use.
vDataFile* | ap_DataFile |
Definition at line 231 of file include/optimizer/oOptimizerManager.hh.
|
inline |
Definition at line 203 of file code/include/optimizer/oOptimizerManager.hh.
|
inline |
Definition at line 217 of file include/optimizer/oOptimizerManager.hh.
|
inline |
Definition at line 217 of file code/include/optimizer/oOptimizerManager.hh.
|
inline |
Definition at line 238 of file include/optimizer/oOptimizerManager.hh.
|
inline |
Definition at line 210 of file code/include/optimizer/oOptimizerManager.hh.
|
inline |
Definition at line 224 of file include/optimizer/oOptimizerManager.hh.
|
inline |
Set the Image Convolver Manager Object.
ap_ImageConvolverManager |
Definition at line 259 of file include/optimizer/oOptimizerManager.hh.
|
inline |
Definition at line 182 of file code/include/optimizer/oOptimizerManager.hh.
|
inline |
Definition at line 196 of file include/optimizer/oOptimizerManager.hh.
|
inline |
Definition at line 189 of file code/include/optimizer/oOptimizerManager.hh.
|
inline |
Definition at line 203 of file include/optimizer/oOptimizerManager.hh.
|
inline |
Definition at line 196 of file code/include/optimizer/oOptimizerManager.hh.
|
inline |
Definition at line 210 of file include/optimizer/oOptimizerManager.hh.
|
inline |
Definition at line 153 of file code/include/optimizer/oOptimizerManager.hh.
|
inline |
Definition at line 154 of file include/optimizer/oOptimizerManager.hh.
|
inline |
Definition at line 224 of file code/include/optimizer/oOptimizerManager.hh.
|
inline |
Definition at line 245 of file include/optimizer/oOptimizerManager.hh.
|
inline |
Definition at line 231 of file code/include/optimizer/oOptimizerManager.hh.
|
inline |
Definition at line 252 of file include/optimizer/oOptimizerManager.hh.
|
inline |
Definition at line 145 of file code/include/optimizer/oOptimizerManager.hh.
|
inline |
Definition at line 146 of file include/optimizer/oOptimizerManager.hh.
|
inline |
Definition at line 175 of file code/include/optimizer/oOptimizerManager.hh.
|
inline |
Definition at line 189 of file include/optimizer/oOptimizerManager.hh.
|
inline |
Set the selected output iterations to the vOptimizer.
bool* | ap_outputIterations |
Definition at line 161 of file include/optimizer/oOptimizerManager.hh.
|
inline |
Definition at line 138 of file code/include/optimizer/oOptimizerManager.hh.
|
inline |
Definition at line 139 of file include/optimizer/oOptimizerManager.hh.
|
private |
Flag indicating if the data is List (=0) or Histogram (=1) mode
Definition at line 265 of file code/include/optimizer/oOptimizerManager.hh.
|
private |
Flag indicating if the data is EMISSION or TRANSMISSION
Definition at line 267 of file code/include/optimizer/oOptimizerManager.hh.
|
private |
Flag indicating if the data is PET (=0),SPECT (=1) or TRANSMISSION type (=2)
Definition at line 266 of file code/include/optimizer/oOptimizerManager.hh.
|
private |
The number of TOF bins in use
Definition at line 268 of file code/include/optimizer/oOptimizerManager.hh.
|
private |
Flag that says if some figures-of-merit will be computed in the data space
Definition at line 272 of file code/include/optimizer/oOptimizerManager.hh.
|
private |
Flag that says if some basic statistics about the image update will be computed
Definition at line 273 of file code/include/optimizer/oOptimizerManager.hh.
|
private |
The string containing options for the optimizer projections
Definition at line 269 of file code/include/optimizer/oOptimizerManager.hh.
|
private |
The string containing options for the penalty projections
Definition at line 270 of file code/include/optimizer/oOptimizerManager.hh.
|
private |
The strength of the penalty (beta)
Definition at line 271 of file code/include/optimizer/oOptimizerManager.hh.
|
private |
The verbose level
Definition at line 276 of file code/include/optimizer/oOptimizerManager.hh.
|
private |
Pointer to the vDataFile object in use
Definition at line 339 of file include/optimizer/oOptimizerManager.hh.
|
private |
Pointer to the oImageConvolverManager object in use
Definition at line 338 of file include/optimizer/oOptimizerManager.hh.
|
private |
Pointer to the oImageDimensionsAndQuantification object in use
Definition at line 263 of file code/include/optimizer/oOptimizerManager.hh.
|
private |
Pointer to the oImageSpace object in use
Definition at line 264 of file code/include/optimizer/oOptimizerManager.hh.
|
private |
The actual optimizer in use
Definition at line 274 of file code/include/optimizer/oOptimizerManager.hh.
|
private |
The actual penalty in use (optional)
Definition at line 275 of file code/include/optimizer/oOptimizerManager.hh.