CASToR
2.0
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 (int a_iteration, int a_nbIterations, int a_subset, int *ap_nbSubsets) |
A function that simply calls the eponym function from the vOptimizer. More... | |
int | PostDataUpdateStep (int a_iteration, int a_nbIterations, int a_subset, int *ap_nbSubsets) |
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_iteration, int a_thread) |
A function dedicated to the update step in the data space (for each event inside the loop) More... | |
int | ImageUpdateStep (int a_iteration, int a_nbSubsets) |
A function dedicated to the update step in the image space (performed after the loop on events) More... | |
void | SetVerbose (int a_verboseLevel) |
Set the verbose level. More... | |
void | SetOptionsOptimizer (const string &a_optionsOptimizer) |
Set the optimizer projection options contained in the provided string. More... | |
void | SetOptionsPenalty (const string &a_optionsPenalty) |
Set the penalty projection options contained in the provided string. More... | |
void | SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification) |
Set the image dimensions in use. More... | |
void | SetImageSpace (oImageSpace *ap_ImageSpace) |
Set the image space in use. More... | |
void | SetNbTOFBins (int a_nbTOFBins) |
Set the number of TOF bins in use. More... | |
void | SetDataMode (int a_dataMode) |
Set the mode of the data (histogram, list-mode) More... | |
void | SetDataType (int a_dataType) |
Set the type of the data (pet, spect, etc) More... | |
void | SetDataSpec (int a_dataSpec) |
Set the specificity of the data: EMISSION or TRANSMISSION. More... | |
void | SetOptimizerFOMFlag (bool a_optimizerFOMFlag) |
Set the optimizer FOM flag that specifies if some figures-of-merit (FOM) will be computed in the data space. More... | |
void | SetOptimizerImageStatFlag (bool a_optimizerImageStatFlag) |
Set the optimizer image stat flag that specifies if some basic statistics about image update is computed. More... | |
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... | |
Private Member Functions | |
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 |
bool | m_optimizerFOMFlag |
bool | m_optimizerImageStatFlag |
vOptimizer * | mp_Optimizer |
vPenalty * | mp_Penalty |
int | m_verbose |
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 51 of file 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 40 of file 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 72 of file oOptimizerManager.cc.
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 81 of file 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_iteration, | ||
int | a_thread | ||
) |
A function dedicated to the update step in the data space (for each event inside the loop)
oProjectionLine* | ap_Line |
vEvent* | ap_Event |
int | a_bed |
int | a_timeFrame |
int | a_respGate |
int | a_cardGate |
int | a_iteration |
int | a_thread |
This function will call many functions of the vOptimizer that split up the update step in the data space in smaller steps: 1. forward projection, 2. optional step, 3. backproj sensitivity for histogram mode,
Definition at line 417 of file oOptimizerManager.cc.
|
inline |
Return the initial image value used by the optimizer, explaining why the eponym function of vOptimizer is called.
Definition at line 253 of file 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 247 of file oOptimizerManager.hh.
int oOptimizerManager::ImageUpdateStep | ( | int | a_iteration, |
int | a_nbSubsets | ||
) |
A function dedicated to the update step in the image space (performed after the loop on events)
int | a_iteration |
int | a_nbSubsets |
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 506 of file oOptimizerManager.cc.
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 134 of file oOptimizerManager.cc.
|
private |
Definition at line 155 of file oOptimizerManager.cc.
int oOptimizerManager::PostDataUpdateStep | ( | int | a_iteration, |
int | a_nbIterations, | ||
int | a_subset, | ||
int * | ap_nbSubsets | ||
) |
A function that simply calls the eponym function from the vOptimizer.
int | a_iteration |
int | a_nbIterations |
int | a_subset |
int* | ap_nbSubsets |
Definition at line 400 of file oOptimizerManager.cc.
int oOptimizerManager::PreDataUpdateStep | ( | int | a_iteration, |
int | a_nbIterations, | ||
int | a_subset, | ||
int * | ap_nbSubsets | ||
) |
A function that simply calls the eponym function from the vOptimizer.
int | a_iteration |
int | a_nbIterations |
int | a_subset |
int* | ap_nbSubsets |
Definition at line 383 of file oOptimizerManager.cc.
|
inline |
Set the mode of the data (histogram, list-mode)
int | a_dataMode |
Definition at line 213 of file oOptimizerManager.hh.
|
inline |
Set the specificity of the data: EMISSION or TRANSMISSION.
int | a_dataSpec |
Definition at line 227 of file oOptimizerManager.hh.
|
inline |
Set the type of the data (pet, spect, etc)
int | a_dataType |
Definition at line 220 of file oOptimizerManager.hh.
|
inline |
Set the image dimensions in use.
oImageDimensionsAndQuantification* | ap_ImageDimensionsAndQuantification |
Definition at line 192 of file oOptimizerManager.hh.
|
inline |
Set the image space in use.
oImageSpace* | ap_ImageSpace |
Definition at line 199 of file oOptimizerManager.hh.
|
inline |
Set the number of TOF bins in use.
int | a_nbTOFBins |
Definition at line 206 of file oOptimizerManager.hh.
|
inline |
Set the optimizer FOM flag that specifies if some figures-of-merit (FOM) will be computed in the data space.
bool | a_optimizerFOMFlag |
Definition at line 234 of file oOptimizerManager.hh.
|
inline |
Set the optimizer image stat flag that specifies if some basic statistics about image update is computed.
bool | a_optimizerImageStatFlag |
Definition at line 241 of file oOptimizerManager.hh.
|
inline |
Set the optimizer projection options contained in the provided string.
const | string& a_optionsOptimizer |
Definition at line 178 of file oOptimizerManager.hh.
|
inline |
Set the penalty projection options contained in the provided string.
const | string& a_optionsPenalty |
Definition at line 185 of file oOptimizerManager.hh.
|
inline |
Set the verbose level.
int | a_verboseLevel |
Definition at line 171 of file oOptimizerManager.hh.
|
private |
Flag indicating if the data is List (=0) or Histogram (=1) mode
Definition at line 263 of file oOptimizerManager.hh.
|
private |
Flag indicating if the data is EMISSION or TRANSMISSION
Definition at line 265 of file oOptimizerManager.hh.
|
private |
Flag indicating if the data is PET (=0),SPECT (=1) or TRANSMISSION type (=2)
Definition at line 264 of file oOptimizerManager.hh.
|
private |
The number of TOF bins in use
Definition at line 266 of file oOptimizerManager.hh.
|
private |
Flag that says if some figures-of-merit will be computed in the data space
Definition at line 269 of file oOptimizerManager.hh.
|
private |
Flag that says if some basic statistics about the image update will be computed
Definition at line 270 of file oOptimizerManager.hh.
|
private |
The string containing options for the optimizer projections
Definition at line 267 of file oOptimizerManager.hh.
|
private |
The string containing options for the penalty projections
Definition at line 268 of file oOptimizerManager.hh.
|
private |
The verbose level
Definition at line 273 of file oOptimizerManager.hh.
|
private |
Pointer to the oImageDimensionsAndQuantification object in use
Definition at line 261 of file oOptimizerManager.hh.
|
private |
Pointer to the oImageSpace object in use
Definition at line 262 of file oOptimizerManager.hh.
|
private |
The actual optimizer in use
Definition at line 271 of file oOptimizerManager.hh.
|
private |
The actual penalty in use (optional)
Definition at line 272 of file oOptimizerManager.hh.