CASToR  3.0
Tomographic Reconstruction (PET/SPECT/CT)
Public Member Functions | Private Member Functions | Private Attributes | List of all members
oOptimizerManager Class Reference

This class is designed to manage the optimization part of an iterative reconstruction. More...

#include <oOptimizerManager.hh>

Collaboration diagram for oOptimizerManager:
Collaboration graph

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)
 A function dedicated to the update step in the data space (for each event inside the loop) More...
 
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)
 Set the verbose level. More...
 
void SetOptionsOptimizer (const string &a_optionsOptimizer)
 Set the optimizer projection options contained in the provided string. More...
 
void SetNumbersOfIterationsAndSubsets (int a_nbIterations, int *ap_nbSubsets)
 Set these numbers of iterations and subsets to the vOptimizer. More...
 
void SetCurrentIteration (int a_currentIteration)
 Set the current iteration to the vOptimizer. More...
 
void SetCurrentSubset (int a_currentSubset)
 Set the current subset to the vOptimizer. More...
 
void SetOptionsPenalty (const string &a_optionsPenalty, FLTNB a_penaltyStrength)
 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...
 
bool GetNeedGlobalSensitivity ()
 Get the boolean saying if the sensitivity has to be computed globally. More...
 
vOptimizerGetOptimizer ()
 Return the optimizer object. More...
 

Private Member Functions

int ParseOptionsAndInitializeOptimizerAndPenalty ()
 

Private Attributes

oImageDimensionsAndQuantificationmp_ImageDimensionsAndQuantification
 
oImageSpacemp_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
 
vOptimizermp_Optimizer
 
vPenaltymp_Penalty
 
int m_verbose
 

Detailed Description

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 50 of file oOptimizerManager.hh.

Constructor & Destructor Documentation

◆ oOptimizerManager()

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 39 of file oOptimizerManager.cc.

◆ ~oOptimizerManager()

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.

Member Function Documentation

◆ CheckParameters()

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.

Returns
An integer reflecting the check status; 0 if no problem, another value otherwise.

Definition at line 83 of file oOptimizerManager.cc.

Here is the caller graph for this function:

◆ DataUpdateStep()

int oOptimizerManager::DataUpdateStep ( oProjectionLine ap_Line,
vEvent ap_Event,
int  a_bed,
int  a_timeFrame,
int  a_respGate,
int  a_cardGate,
int  a_thread 
)

A function dedicated to the update step in the data space (for each event inside the loop)

Parameters
oProjectionLine*ap_Line
vEvent*ap_Event
inta_bed
inta_timeFrame
inta_respGate
inta_cardGate
inta_iteration
inta_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,

  1. optional step, 5. compute corrections, 6. optional step, 7. backproj corrections, 8. compute FOMs. This function is called by the iterative algorithm, inside the loop on all events.
    Returns
    An integer reflecting the execution status; 0 if no problem, another value otherwise.

Definition at line 419 of file oOptimizerManager.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetInitialValue()

public inline FLTNB oOptimizerManager::GetInitialValue ( )
inline

Return the initial image value used by the optimizer, explaining why the eponym function of vOptimizer is called.

Definition at line 265 of file oOptimizerManager.hh.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetNbBackwardImages()

public inline int oOptimizerManager::GetNbBackwardImages ( )
inline

Return the number of backward images used by the optimizer, explaining why the eponym function of vOptimizer is called.

Definition at line 259 of file oOptimizerManager.hh.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetNeedGlobalSensitivity()

public inline bool oOptimizerManager::GetNeedGlobalSensitivity ( )
inline

Get the boolean saying if the sensitivity has to be computed globally.

This is managed by the optimizer itself

Definition at line 272 of file oOptimizerManager.hh.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetOptimizer()

vOptimizer * oOptimizerManager::GetOptimizer ( )
inline

Return the optimizer object.

Definition at line 279 of file oOptimizerManager.hh.

◆ ImageUpdateStep()

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.

Returns
An integer reflecting the execution status; 0 if no problem, another value otherwise.

Definition at line 514 of file oOptimizerManager.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Initialize()

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.

Returns
An integer reflecting the initialization status; 0 if no problem, another value otherwise.

Definition at line 136 of file oOptimizerManager.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ParseOptionsAndInitializeOptimizerAndPenalty()

int oOptimizerManager::ParseOptionsAndInitializeOptimizerAndPenalty ( )
private

Definition at line 157 of file oOptimizerManager.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PreDataUpdateStep()

int oOptimizerManager::PreDataUpdateStep ( )

A function that simply calls the eponym function from the vOptimizer.

Returns
An integer reflecting the execution status; 0 if no problem, another value otherwise.

Definition at line 385 of file oOptimizerManager.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PreImageUpdateStep()

int oOptimizerManager::PreImageUpdateStep ( )

A function that simply calls the eponym function from the vOptimizer.

Returns
An integer reflecting the execution status; 0 if no problem, another value otherwise.

Definition at line 402 of file oOptimizerManager.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetCurrentIteration()

public inline void oOptimizerManager::SetCurrentIteration ( int  a_currentIteration)
inline

Set the current iteration to the vOptimizer.

Parameters
inta_currentIteration

Definition at line 182 of file oOptimizerManager.hh.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetCurrentSubset()

public inline void oOptimizerManager::SetCurrentSubset ( int  a_currentSubset)
inline

Set the current subset to the vOptimizer.

Parameters
inta_currentSubset

Definition at line 189 of file oOptimizerManager.hh.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetDataMode()

public inline void oOptimizerManager::SetDataMode ( int  a_dataMode)
inline

Set the mode of the data (histogram, list-mode)

Parameters
inta_dataMode

Definition at line 225 of file oOptimizerManager.hh.

Here is the caller graph for this function:

◆ SetDataSpec()

public inline void oOptimizerManager::SetDataSpec ( int  a_dataSpec)
inline

Set the specificity of the data: EMISSION or TRANSMISSION.

Parameters
inta_dataSpec

Definition at line 239 of file oOptimizerManager.hh.

Here is the caller graph for this function:

◆ SetDataType()

public inline void oOptimizerManager::SetDataType ( int  a_dataType)
inline

Set the type of the data (pet, spect, etc)

Parameters
inta_dataType

Definition at line 232 of file oOptimizerManager.hh.

Here is the caller graph for this function:

◆ SetImageDimensionsAndQuantification()

public inline void oOptimizerManager::SetImageDimensionsAndQuantification ( oImageDimensionsAndQuantification ap_ImageDimensionsAndQuantification)
inline

Set the image dimensions in use.

Parameters
oImageDimensionsAndQuantification*ap_ImageDimensionsAndQuantification

Definition at line 204 of file oOptimizerManager.hh.

Here is the caller graph for this function:

◆ SetImageSpace()

public inline void oOptimizerManager::SetImageSpace ( oImageSpace ap_ImageSpace)
inline

Set the image space in use.

Parameters
oImageSpace*ap_ImageSpace

Definition at line 211 of file oOptimizerManager.hh.

Here is the caller graph for this function:

◆ SetNbTOFBins()

public inline void oOptimizerManager::SetNbTOFBins ( int  a_nbTOFBins)
inline

Set the number of TOF bins in use.

Parameters
inta_nbTOFBins

Definition at line 218 of file oOptimizerManager.hh.

Here is the caller graph for this function:

◆ SetNumbersOfIterationsAndSubsets()

public inline void oOptimizerManager::SetNumbersOfIterationsAndSubsets ( int  a_nbIterations,
int *  ap_nbSubsets 
)
inline

Set these numbers of iterations and subsets to the vOptimizer.

Parameters
inta_nbIterations
int*ap_nbSubsets

Definition at line 175 of file oOptimizerManager.hh.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetOptimizerFOMFlag()

public inline void oOptimizerManager::SetOptimizerFOMFlag ( bool  a_optimizerFOMFlag)
inline

Set the optimizer FOM flag that specifies if some figures-of-merit (FOM) will be computed in the data space.

Parameters
boola_optimizerFOMFlag

Definition at line 246 of file oOptimizerManager.hh.

Here is the caller graph for this function:

◆ SetOptimizerImageStatFlag()

public inline void oOptimizerManager::SetOptimizerImageStatFlag ( bool  a_optimizerImageStatFlag)
inline

Set the optimizer image stat flag that specifies if some basic statistics about image update is computed.

Parameters
boola_optimizerImageStatFlag

Definition at line 253 of file oOptimizerManager.hh.

Here is the caller graph for this function:

◆ SetOptionsOptimizer()

public inline void oOptimizerManager::SetOptionsOptimizer ( const string &  a_optionsOptimizer)
inline

Set the optimizer projection options contained in the provided string.

Parameters
conststring& a_optionsOptimizer

Definition at line 167 of file oOptimizerManager.hh.

Here is the caller graph for this function:

◆ SetOptionsPenalty()

public inline void oOptimizerManager::SetOptionsPenalty ( const string &  a_optionsPenalty,
FLTNB  a_penaltyStrength 
)
inline

Set the penalty projection options contained in the provided string.

Parameters
conststring& a_optionsPenalty
FLTNBa_penaltyStrength

Definition at line 197 of file oOptimizerManager.hh.

Here is the caller graph for this function:

◆ SetVerbose()

public inline void oOptimizerManager::SetVerbose ( int  a_verboseLevel)
inline

Set the verbose level.

Parameters
inta_verboseLevel

Definition at line 160 of file oOptimizerManager.hh.

Here is the caller graph for this function:

Member Data Documentation

◆ m_dataMode

int oOptimizerManager::m_dataMode
private

Flag indicating if the data is List (=0) or Histogram (=1) mode

Definition at line 287 of file oOptimizerManager.hh.

◆ m_dataSpec

int oOptimizerManager::m_dataSpec
private

Flag indicating if the data is EMISSION or TRANSMISSION

Definition at line 289 of file oOptimizerManager.hh.

◆ m_dataType

int oOptimizerManager::m_dataType
private

Flag indicating if the data is PET (=0),SPECT (=1) or TRANSMISSION type (=2)

Definition at line 288 of file oOptimizerManager.hh.

◆ m_nbTOFBins

int oOptimizerManager::m_nbTOFBins
private

The number of TOF bins in use

Definition at line 290 of file oOptimizerManager.hh.

◆ m_optimizerFOMFlag

bool oOptimizerManager::m_optimizerFOMFlag
private

Flag that says if some figures-of-merit will be computed in the data space

Definition at line 294 of file oOptimizerManager.hh.

◆ m_optimizerImageStatFlag

bool oOptimizerManager::m_optimizerImageStatFlag
private

Flag that says if some basic statistics about the image update will be computed

Definition at line 295 of file oOptimizerManager.hh.

◆ m_optionsOptimizer

string oOptimizerManager::m_optionsOptimizer
private

The string containing options for the optimizer projections

Definition at line 291 of file oOptimizerManager.hh.

◆ m_optionsPenalty

string oOptimizerManager::m_optionsPenalty
private

The string containing options for the penalty projections

Definition at line 292 of file oOptimizerManager.hh.

◆ m_penaltyStrength

FLTNB oOptimizerManager::m_penaltyStrength
private

The strength of the penalty (beta)

Definition at line 293 of file oOptimizerManager.hh.

◆ m_verbose

int oOptimizerManager::m_verbose
private

The verbose level

Definition at line 298 of file oOptimizerManager.hh.

◆ mp_ImageDimensionsAndQuantification

oImageDimensionsAndQuantification* oOptimizerManager::mp_ImageDimensionsAndQuantification
private

Pointer to the oImageDimensionsAndQuantification object in use

Definition at line 285 of file oOptimizerManager.hh.

◆ mp_ImageSpace

oImageSpace* oOptimizerManager::mp_ImageSpace
private

Pointer to the oImageSpace object in use

Definition at line 286 of file oOptimizerManager.hh.

◆ mp_Optimizer

vOptimizer* oOptimizerManager::mp_Optimizer
private

The actual optimizer in use

Definition at line 296 of file oOptimizerManager.hh.

◆ mp_Penalty

vPenalty* oOptimizerManager::mp_Penalty
private

The actual penalty in use (optional)

Definition at line 297 of file oOptimizerManager.hh.


The documentation for this class was generated from the following files: