CASToR
3.0
Tomographic Reconstruction (PET/SPECT/CT)
|
This class is designed to generically described any iterative optimizer. More...
#include <vOptimizer.hh>
Public Member Functions | |
vOptimizer () | |
The constructor of vOptimizer. More... | |
virtual | ~vOptimizer () |
The destructor of vOptimizer. More... | |
void | ShowHelp () |
A function used to show help about the optimizer. More... | |
int | CheckParameters () |
A public function used to check the parameters settings. More... | |
int | Initialize () |
A public function used to initialize the optimizer. More... | |
int | UpdateVisitedVoxels () |
A public function used to update the 'visited' voxels after each subset. More... | |
int | PreDataUpdateStep () |
A public function used to do stuff that need to be done at the beginning of a subset (before the data update step; i.e. the loop over all events) More... | |
int | PreImageUpdateStep () |
A public function used to do stuff that need to be done between the loop over events and the image update step. More... | |
virtual int | DataStep1ForwardProjectModel (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 model: forward projection of the provided event. More... | |
virtual int | DataStep2Optional (oProjectionLine *ap_Line, vEvent *ap_Event, int a_bed, int a_timeFrame, int a_respGate, int a_cardGate, int a_thread) |
A public function which does nothing but being virtual. More... | |
virtual int | DataStep3BackwardProjectSensitivity (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 back-project the sensitivity terms for the provided event. More... | |
virtual int | DataStep4Optional (oProjectionLine *ap_Line, vEvent *ap_Event, int a_bed, int a_timeFrame, int a_respGate, int a_cardGate, int a_thread) |
A public function which does nothing but being virtual. More... | |
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. More... | |
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 which does nothing but being virtual. More... | |
virtual int | DataStep7BackwardProjectCorrections (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 back-project the correction terms into the backward correction image. More... | |
virtual int | DataStep8ComputeFOM (oProjectionLine *ap_Line, vEvent *ap_Event, int a_timeFrame, int a_respGate, int a_cardGate, int a_thread) |
A public function used to update the computation of figures-of-merit in the data space. More... | |
virtual int | ImageUpdateStep () |
A public function used to perform the image update step of the optimizer. More... | |
virtual int | ReadConfigurationFile (const string &a_configurationFile)=0 |
A function used to read options from a configuration file. More... | |
virtual int | ReadOptionsList (const string &a_optionsList)=0 |
A function used to read options from a list of options. More... | |
void | SetVerbose (int a_verbose) |
Set the verbose level. More... | |
void | SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification) |
Set the pointer to the image dimensions in use. More... | |
void | SetImageSpace (oImageSpace *ap_ImageSpace) |
Set the pointer to 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 data mode in use. More... | |
void | SetDataType (int a_dataType) |
Set the data type in use. More... | |
void | SetDataSpec (int a_dataSpec) |
Set the data physical specificity in use. More... | |
void | SetAttenuationImage (FLTNB *ap_attenuationImage, int a_thread) |
Set the attenuation image corresponding to the current thread and current event. More... | |
void | SetFOMFlag (bool a_optimizerFOMFlag) |
Set the FOM flag specifying if figures-of-merit will be computed or not. More... | |
void | SetImageStatFlag (bool a_optimizerImageStatFlag) |
Set the image stat flag specifying if basic statistics about image udpate will be computed or not. More... | |
void | SetNumbersOfIterationsAndSubsets (int a_nbIterations, int *ap_nbSubsets) |
Set these numbers of iterations and subsets. More... | |
void | SetCurrentIteration (int a_currentIteration) |
Set the current iteration. More... | |
void | SetCurrentSubset (int a_currentSubset) |
Set the current subset. More... | |
int | GetNbBackwardImages () |
Get the number of backward images used by the specific optimizer. More... | |
FLTNB | GetInitialValue () |
Get the initial image value (for initialization) More... | |
void | SetOptimizerID (const string &a_optimizerID) |
Set the optimizer ID. More... | |
const string & | GetOptimizerID () |
int | GetRequiredPenaltyDerivativesOrder () |
Get the penalty derivative order needed for this algorithm. More... | |
bool | GetAcceptPenalty () |
Get the boolean saying if the optimizer accepts penalties. More... | |
void | SetPenalty (vPenalty *ap_penalty) |
Set the penalty of the optimizer. More... | |
bool | GetNeedGlobalSensitivity () |
Get the boolean saying if the sensitivity has to be computed globally for all data channels and not per subset. More... | |
Protected Member Functions | |
FLTNB | ComputeSensitivity (FLTNB ****a4p_sensitivityImage, int a_timeBasisFunction, int a_respBasisFunction, int a_cardBasisFunction, int a_voxel) |
A function used to compute the sensitivity of a given voxel and a given set of dynamic basis functions. More... | |
FLTNB | ForwardProject (oProjectionLine *ap_Line, FLTNB *ap_image=NULL) |
A function used to forward project the provided image (or 1 if NULL), based on the provided oProjectionLine. More... | |
void | BackwardProject (oProjectionLine *ap_Line, FLTNB *ap_image, FLTNB a_value) |
A function used to backward project the provided value into the provided image, based on the provided oProjectionLine. More... | |
Private Member Functions | |
virtual int | PreDataUpdateSpecificStep () |
A private function used to perform any step required by the child optimizer, before the loop on event inside the subset loop. More... | |
virtual int | PreImageUpdateSpecificStep () |
A private function used to perform any step required by the child optimizer, between the loop on event and the image update step. More... | |
virtual void | ShowHelpSpecific ()=0 |
A function used to show help about the child module. More... | |
virtual int | CheckSpecificParameters ()=0 |
A private function used to check the parameters settings specific to the child optimizer. More... | |
virtual int | InitializeSpecific ()=0 |
A private function used to initialize everything specific to the child optimizer. More... | |
virtual 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)=0 |
A private function used to compute the sensitivity weight associated to the provided data. More... | |
virtual 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)=0 |
A private function used to compute the correction term in the data space from the provided data. More... | |
virtual int | ImageSpaceSpecificOperations (FLTNB a_currentImageValue, FLTNB *ap_newImageValue, FLTNB a_sensitivity, FLTNB *ap_correctionValues, INTNB a_voxel, int tbf=-1, int rbf=-1, int cbf=-1)=0 |
A private function used to update the image value from the provided data. More... | |
This class is designed to generically described any iterative optimizer.
This class is an abstract one, in the sense that it cannot be used on its own because several pure virtual functions belong to it. Its children are implementations of actual optimizers. Everywhere in the code, this parent class should be used instead of any of its children. The optimizer is created by the oOptimizerManager is used during the iterative process of the algorithm through the call of multiple functions. All functions prefixed by DataStepX are called within the DataUpdateStep() function of the oOptimizerManager. The other main function is the ImageUpdateStep() function called by the eponym function from the manager. Anyway, all these aforementioned functions are virtual, but are designed to be flexible enaugh for any kind of optimizer. Finally, a particular optimizer (a child of this vOptimizer) will be characterized by the implementation of some pure virtual functions, some for options and initialization management, and three particular ones that really describe what this particular optimizer does: SensitivitySpecificOperations(), DataSpaceSpecificOperations() and ImageSpaceSpecificOperations(). Read the description of these functions below to get more details.
Definition at line 59 of file vOptimizer.hh.
vOptimizer::vOptimizer | ( | ) |
The constructor of vOptimizer.
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 37 of file vOptimizer.cc.
|
virtual |
The destructor of vOptimizer.
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. It is virtual, so that it is automatically called when a child object is deleted.
Definition at line 83 of file vOptimizer.cc.
|
protected |
A function used to backward project the provided value into the provided image, based on the provided oProjectionLine.
oProjectionLine* | ap_Line |
FLTNB* | ap_image |
FLTNB | a_value |
Based on the data type, the function calls the projection function of the oProjectionLine class to backward project the value into the image taking the multiplicative terms into account, and eventually dealing with the SPECT attenuation.
Definition at line 1135 of file vOptimizer.cc.
int vOptimizer::CheckParameters | ( | ) |
A public 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. At the end, it calls the pure virtual CheckSpecificParameters() function implemented by children.
Definition at line 254 of file vOptimizer.cc.
|
privatepure virtual |
A private function used to check the parameters settings specific to the child optimizer.
This function is used to check that all parameters specific to the optimizer are correctly set within allowed values. It is called by the CheckParameters() function. It is pure virtual so is implemented by children.
Implemented in iOptimizerModifiedEMForMRFPenalizedML, iOptimizerBSREM, iOptimizerOneStepLate, iOptimizerMLTR, iOptimizerPenalizedPreconditionedGradientML, iOptimizerTemplate, iOptimizerNEGML, iOptimizerOriginalAML, iOptimizerLandweber, and iOptimizerMLEM.
|
protected |
A function used to compute the sensitivity of a given voxel and a given set of dynamic basis functions.
FLTNB**** | a4p_sensitivityImage |
int | a_timeBasisFunction |
int | a_respBasisFunction |
int | a_cardBasisFunction |
int | a_voxel |
int | a_nbSubsets |
This function computes the sensitivity for a given set of dynamic basis functions and for a given number of subsets. It loops over the dynamic frames and gates to compute the sensitivity based on basis functions coefficients. In list-mode, as the sensitivity is computed for the whole FOV, the value is divided by the current number of subsets of the current iteration, given as a parameter.
Definition at line 1150 of file vOptimizer.cc.
|
privatepure virtual |
A private function used to compute the correction term in the data space from the provided data.
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 is pure virtual, so must be implemented by specific optimizers. The computed correction term must be put at the ap_backwardValues pointer. All potentially useful information is provided as parameters. This is the operation that the optimization algorithm performs in the data space, in the loop on events. Note that the multiplicate corrections parameter only includes such correction specific to the event; in other words, it does not include the quantification factor which is given separately.
Implemented in iOptimizerModifiedEMForMRFPenalizedML, iOptimizerBSREM, iOptimizerMLTR, iOptimizerOneStepLate, iOptimizerTemplate, iOptimizerPenalizedPreconditionedGradientML, iOptimizerNEGML, iOptimizerOriginalAML, iOptimizerLandweber, and iOptimizerMLEM.
|
virtual |
A public function used to compute the model: forward projection of the provided event.
oProjectionLine* | ap_Line |
vEvent* | ap_Event |
int | a_bed |
int | a_timeFrame |
int | a_respGate |
int | a_cardGate |
int | a_thread |
Inside the DataUpdateStep() of the oOptimizerManager, this is the first function called. This function performs the forward projection of the provided event, following the provided projection line. It takes all dynamic dimensions into account, including the intrinsic basis functions. Note that this function uses the ForwardProject() function that automatically deals with attenuation for SPECT and includes all multiplicative terms theoretically included in the system matrix. Then, all additive corrections are added to the forward projection. So the unit of the resulting model is the same as the data. The result of this forward projection is put in the m2p_forwardValues table (for the given thread). The other dimension of this table is for the TOF bins.
Definition at line 642 of file vOptimizer.cc.
|
virtual |
A public function which does nothing but being virtual.
oProjectionLine* | ap_Line |
vEvent* | ap_Event |
int | a_bed |
int | a_timeFrame |
int | a_respGate |
int | a_cardGate |
int | a_thread |
Inside the DataUpdateStep() of the oOptimizerManager, this is the second function called. This function can be overloaded by specific optimizers if needed.
Definition at line 721 of file vOptimizer.cc.
|
virtual |
A public function used to back-project the sensitivity terms for the provided event.
oProjectionLine* | ap_Line |
vEvent* | ap_Event |
int | a_bed |
int | a_timeFrame |
int | a_respGate |
int | a_cardGate |
int | a_thread |
Inside the DataUpdateStep() of the oOptimizerManager, this is the third function called. This function is only called when using histogram data. Before performing the back-projection into the sensitivity image, it calls the pure virtual SensitivitySpecificOperations() function whose role is simply to provide the weight associated to the projection line. Note that this function uses the BackwardProject() function that automatically deals with attenuation for SPECT and includes all multiplicative terms theoretically included in the system matrix.
Definition at line 734 of file vOptimizer.cc.
|
virtual |
A public function which does nothing but being virtual.
oProjectionLine* | ap_Line |
vEvent* | ap_Event |
int | a_bed |
int | a_timeFrame |
int | a_respGate |
int | a_cardGate |
int | a_thread |
Inside the DataUpdateStep() of the oOptimizerManager, this is the fourth function called. This function can be overloaded by specific optimizers if needed.
Definition at line 774 of file vOptimizer.cc.
|
virtual |
A public function used to compute the correction terms in the data space, for the provided event.
oProjectionLine* | ap_Line |
vEvent* | ap_Event |
int | a_bed |
int | a_timeFrame |
int | a_respGate |
int | a_cardGate |
int | a_thread |
Inside the DataUpdateStep() of the oOptimizerManager, this is the fifth function called. Its role is to compute the correction terms in the data space, based on the forward model and the data. In order to be specific to each optimizer, it calls the pure virtual function DataSpaceSpecificOperations(), where the computation is done. The correction terms are put in the m3p_backwardValues (a dimension for threads, one for the number of backward images and the last for TOF bins).
Definition at line 787 of file vOptimizer.cc.
|
virtual |
A public function which does nothing but being virtual.
oProjectionLine* | ap_Line |
vEvent* | ap_Event |
int | a_bed |
int | a_timeFrame |
int | a_respGate |
int | a_cardGate |
int | a_thread |
Inside the DataUpdateStep() of the oOptimizerManager, this is the sixth function called. This function can be overloaded by specific optimizers if needed.
Definition at line 823 of file vOptimizer.cc.
|
virtual |
A public function used to back-project the correction terms into the backward correction image.
oProjectionLine* | ap_Line |
vEvent* | ap_Event |
int | a_bed |
int | a_timeFrame |
int | a_respGate |
int | a_cardGate |
int | a_thread |
Inside the DataUpdateStep() of the oOptimizerManager, this is the seventh function called. This function performs the backward projection of the correction terms held into the m3p_backwardValues, for the provided event and following the provided projection line. It takes all dynamic dimensions into account, including the intrinsic basis functions. Note that this function uses the BackwardProject() function that automatically deals with attenuation for SPECT and automatically includes all multiplicative terms theoretically included in the system matrix.
Definition at line 836 of file vOptimizer.cc.
|
virtual |
A public function used to update the computation of figures-of-merit in the data space.
oProjectionLine* | ap_Line |
vEvent* | ap_Event |
int | a_timeFrame |
int | a_respGate |
int | a_cardGate |
int | a_thread |
Inside the DataUpdateStep() of the oOptimizerManager, this is the eighth function called. This function updates the computation of figures-of-merit in the data space for the provided event. It uses the m4p_FOMXXX structures. The computation is done only if the FOM flag is set. For the moment, log-likelihood and RMSE are computed.
Definition at line 891 of file vOptimizer.cc.
|
protected |
A function used to forward project the provided image (or 1 if NULL), based on the provided oProjectionLine.
oProjectionLine* | ap_Line |
FLTNB* | ap_image = NULL |
Based on the data type, the function calls the projection function of the oProjectionLine class to forward project the image taking the multiplicative terms into account, and eventually dealing with the SPECT attenuation.
Definition at line 1120 of file vOptimizer.cc.
|
inline |
Get the boolean saying if the optimizer accepts penalties.
Definition at line 591 of file vOptimizer.hh.
|
inline |
Get the initial image value (for initialization)
Definition at line 562 of file vOptimizer.hh.
|
inline |
Get the number of backward images used by the specific optimizer.
Definition at line 555 of file vOptimizer.hh.
|
inline |
Get the boolean saying if the sensitivity has to be computed globally for all data channels and not per subset.
This is only relevant for histogram data
Definition at line 606 of file vOptimizer.hh.
|
inline |
Definition at line 577 of file vOptimizer.hh.
|
inline |
Get the penalty derivative order needed for this algorithm.
Definition at line 584 of file vOptimizer.hh.
|
privatepure virtual |
A private function used to update the image value from the provided data.
FLTNB | a_currentImageValue |
FLTNB* | ap_newImageValue |
FLTNB | a_sensitivity |
FLTNB* | ap_correctionValues |
INTNB | a_voxel |
This function is pure virtual, so must be implemented by specific optimizers. The old values are provided, as well as the location of the new that will be calculated. This is the operation that the optimization algorithm performs in the image update step, after the loop on events. Note that based on the number of backward images used by the specific optimizer, there can be multiple correction values in ap_correctionValues, explaining why it is provided as a pointer. Note also that this function is only called for non-zero sensitivity, so no need to check it. The design of this function will evolve in order to take into account optimizers with penalties and alternated optimizers like MLAA which estimate the attenuation at the same time.
Implemented in iOptimizerModifiedEMForMRFPenalizedML, iOptimizerBSREM, iOptimizerMLTR, iOptimizerOneStepLate, iOptimizerTemplate, iOptimizerPenalizedPreconditionedGradientML, iOptimizerNEGML, iOptimizerOriginalAML, iOptimizerLandweber, and iOptimizerMLEM.
|
virtual |
A public function used to perform the image update step of the optimizer.
int | a_iteration |
int | a_nbSubsets |
This function is called by the eponym function from the oOptimizerManager. It will manage the dynamic loops, compute the sensitivity using the private ComputeSensitivity() function, and update each voxel according to the specific optimizer by calling the pure virtual ImageSpaceSpecificOperations() function.
Definition at line 954 of file vOptimizer.cc.
int vOptimizer::Initialize | ( | ) |
A public function used to initialize the optimizer.
This function does not take any parameter and is used to initialize everything that should be initialized. At the end, it calls the pure virtual InitializeSpecific() function implemented by children.
Definition at line 349 of file vOptimizer.cc.
|
privatepure virtual |
A private function used to initialize everything specific to the child optimizer.
This function is used to initialize everything specific to the optimizer that should be initialized. It is called by the Initialize() function. It is pure virtual so is implemented by children.
Implemented in iOptimizerModifiedEMForMRFPenalizedML, iOptimizerBSREM, iOptimizerOneStepLate, iOptimizerMLTR, iOptimizerPenalizedPreconditionedGradientML, iOptimizerTemplate, iOptimizerNEGML, iOptimizerOriginalAML, iOptimizerLandweber, and iOptimizerMLEM.
|
privatevirtual |
A private function used to perform any step required by the child optimizer, before the loop on event inside the subset loop.
The vOptimizer implementation just does nothing. It is called by the PreDataUpdateStep() function. It is virtual so it can be overloaded by the child optimizer if needed.
Definition at line 468 of file vOptimizer.cc.
int vOptimizer::PreDataUpdateStep | ( | ) |
A public function used to do stuff that need to be done at the beginning of a subset (before the data update step; i.e. the loop over all events)
It does some reseting for the FOM computation. At the end, it calls the PreDataUpdateSpecificStep() function, which does nothing but being virtual, so it can be overloaded to perform specific stuff at this step by specific optimizers that would need to do so.
Definition at line 431 of file vOptimizer.cc.
|
privatevirtual |
A private function used to perform any step required by the child optimizer, between the loop on event and the image update step.
The vOptimizer implementation just does nothing. It is called by the PreImageUpdateStep() function. It is virtual so it can be overloaded by the child optimizer if needed.
Reimplemented in iOptimizerModifiedEMForMRFPenalizedML, iOptimizerBSREM, iOptimizerOneStepLate, iOptimizerMLTR, iOptimizerPenalizedPreconditionedGradientML, and iOptimizerTemplate.
Definition at line 631 of file vOptimizer.cc.
int vOptimizer::PreImageUpdateStep | ( | ) |
A public function used to do stuff that need to be done between the loop over events and the image update step.
It does some reseting for the FOM computation. At the end, it calls the PreImageUpdateSpecificStep() function, which does nothing but being virtual, so it can be overloaded to perform specific stuff at this step by specific optimizers that would need to do so.
Definition at line 479 of file vOptimizer.cc.
|
pure virtual |
A function used to read options from a configuration file.
const | string& a_configurationFile |
This function implements the reading of all options associated to a child optimizer, from a configuration file. It is pure virtual so is implemented by children. It checks the reading status but not the options values that will be checked by the CheckSpecificParameters() function.
Implemented in iOptimizerBSREM, iOptimizerNEGML, iOptimizerOriginalAML, iOptimizerMLTR, iOptimizerModifiedEMForMRFPenalizedML, iOptimizerLandweber, iOptimizerOneStepLate, iOptimizerMLEM, iOptimizerPenalizedPreconditionedGradientML, and iOptimizerTemplate.
|
pure virtual |
A function used to read options from a list of options.
const | string& a_optionsList |
This function implements the reading of all options associated to a child optimizer, from a list of options. It is pure virtual so is implemented by children. It checks the reading status but not the options values that will be checked by the CheckSpecificParameters() function.
Implemented in iOptimizerBSREM, iOptimizerNEGML, iOptimizerOriginalAML, iOptimizerMLTR, iOptimizerModifiedEMForMRFPenalizedML, iOptimizerLandweber, iOptimizerOneStepLate, iOptimizerMLEM, iOptimizerPenalizedPreconditionedGradientML, and iOptimizerTemplate.
|
privatepure virtual |
A private function used to compute the sensitivity weight associated to the provided data.
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 is pure virtual, so must be implemented by specific optimizers. The computed sensitivity term must be put at the ap_weight pointer. All potentially useful information is provided as parameters. Note that the multiplicate corrections parameter only includes such correction specific to the event; in other words, it does not include the quantification factor which is given separately.
Implemented in iOptimizerModifiedEMForMRFPenalizedML, iOptimizerBSREM, iOptimizerMLTR, iOptimizerOneStepLate, iOptimizerTemplate, iOptimizerPenalizedPreconditionedGradientML, iOptimizerNEGML, iOptimizerOriginalAML, iOptimizerLandweber, and iOptimizerMLEM.
|
inline |
Set the attenuation image corresponding to the current thread and current event.
FLTNB* | ap_attenuationImage |
int | a_thread |
Definition at line 512 of file vOptimizer.hh.
|
inline |
Set the current iteration.
int | a_currentIteration |
Definition at line 541 of file vOptimizer.hh.
|
inline |
Set the current subset.
int | a_currentSubset |
Definition at line 548 of file vOptimizer.hh.
|
inline |
Set the data mode in use.
int | a_dataMode |
Definition at line 490 of file vOptimizer.hh.
|
inline |
Set the data physical specificity in use.
int | a_dataSpec |
Definition at line 504 of file vOptimizer.hh.
|
inline |
Set the data type in use.
int | a_dataType |
Definition at line 497 of file vOptimizer.hh.
|
inline |
Set the FOM flag specifying if figures-of-merit will be computed or not.
bool | a_optimizerFOMFlag |
Definition at line 519 of file vOptimizer.hh.
|
inline |
Set the pointer to the image dimensions in use.
oImageDimensionsAndQuantification* | ap_ImageDimensionsAndQuantification |
Definition at line 469 of file vOptimizer.hh.
|
inline |
Set the pointer to the image space in use.
oImageSpace* | ap_ImageSpace |
Definition at line 476 of file vOptimizer.hh.
|
inline |
Set the image stat flag specifying if basic statistics about image udpate will be computed or not.
bool | a_optimizerImageStatFlag |
Definition at line 526 of file vOptimizer.hh.
|
inline |
Set the number of TOF bins in use.
int | a_nbTOFBins |
Definition at line 483 of file vOptimizer.hh.
|
inline |
Set these numbers of iterations and subsets.
int | a_nbIterations |
int* | ap_nbSubsets |
Definition at line 534 of file vOptimizer.hh.
|
inline |
Set the optimizer ID.
const | string& a_optimizerID |
Definition at line 569 of file vOptimizer.hh.
|
inline |
Set the penalty of the optimizer.
vPenalty* | ap_penalty |
Definition at line 598 of file vOptimizer.hh.
|
inline |
Set the verbose level.
int | a_verboseLevel |
Definition at line 462 of file vOptimizer.hh.
void vOptimizer::ShowHelp | ( | ) |
A function used to show help about the optimizer.
This function simply calls the ShowHelpSpecific() function implemented by children.
Definition at line 233 of file vOptimizer.cc.
|
privatepure virtual |
A function used to show help about the child module.
This function must describe what the optimizer does and how to use it. It describes in details the different parameters of the optimizer, and how to set them through the use of a configuration file or a list of options. It is pure virtual so is implemented by children. It is private because called by the public ShowHelp() function.
Implemented in iOptimizerModifiedEMForMRFPenalizedML, iOptimizerBSREM, iOptimizerOneStepLate, iOptimizerMLTR, iOptimizerPenalizedPreconditionedGradientML, iOptimizerTemplate, iOptimizerNEGML, iOptimizerOriginalAML, iOptimizerLandweber, and iOptimizerMLEM.
int vOptimizer::UpdateVisitedVoxels | ( | ) |
A public function used to update the 'visited' voxels after each subset.
This function is called at the end of each subset. Based on the sensitivity image, it labels which voxel has been visited or not during each subset. At the end of the iteration, all voxels that have not been visited in any subset are set to 0. There is a dedicated matrix in the oImageSpace to keep track of visited voxels. Practically, this avoids having those never visited voxels trapped in their initial value if the latter is different from 0.
Definition at line 919 of file vOptimizer.cc.
|
protected |
The attenuation image currently in use for the current event, one per thread (used for SPECT)
Definition at line 674 of file vOptimizer.hh.
|
protected |
Buffer for forward projected values, as many as threads and as many as TOF bins
Definition at line 661 of file vOptimizer.hh.
|
protected |
Buffer for values to be back-projected, as many as threads, as many as TOF bins and as many as backward images
Definition at line 662 of file vOptimizer.hh.
|
protected |
The log-likelihood, as many as frames, respiratory gates, cardiac gates and threads
Definition at line 682 of file vOptimizer.hh.
|
protected |
The number of bins contributing to the FOM computation, as many as frames, respiratory gates, cardiac gates and threads
Definition at line 684 of file vOptimizer.hh.
|
protected |
The number of data (counts) contributing to the FOM computation, as many as frames, respiratory gates, cardiac gates and threads
Definition at line 685 of file vOptimizer.hh.
|
protected |
The contribution of the penalty to the objective function
Definition at line 686 of file vOptimizer.hh.
|
protected |
The RMSE, as many as frames, respiratory gates, cardiac gates and threads
Definition at line 683 of file vOptimizer.hh.
|
protected |
Current iteration number
Definition at line 678 of file vOptimizer.hh.
|
protected |
Current subset number
Definition at line 679 of file vOptimizer.hh.
|
protected |
The mode of the data (list-mode or histogram)
Definition at line 671 of file vOptimizer.hh.
|
protected |
The physical specificity of the data (EMISSION or TRANSMISSION)
Definition at line 673 of file vOptimizer.hh.
|
protected |
The type of the data (PET, SPECT, ...)
Definition at line 672 of file vOptimizer.hh.
|
protected |
A flag saying if the optimizer is compatible with emission data
Definition at line 666 of file vOptimizer.hh.
|
protected |
A flag saying if the optimizer is compatible with histogram data
Definition at line 665 of file vOptimizer.hh.
|
protected |
The initial value of the image for the specific optimizer
Definition at line 663 of file vOptimizer.hh.
|
protected |
A flag saying if the optimizer is compatible with list-mode data
Definition at line 664 of file vOptimizer.hh.
|
protected |
The number of backward images used by the specific optimizer
Definition at line 659 of file vOptimizer.hh.
|
protected |
Number of iterations
Definition at line 676 of file vOptimizer.hh.
|
protected |
The number of TOF bins in use
Definition at line 660 of file vOptimizer.hh.
|
protected |
Say that the sensitivity has to be computed at the beginning of the reconstruction process from the whole set of data channels with histogram data, as opposed to the computation from data channels only belonging to the current subset
Definition at line 699 of file vOptimizer.hh.
|
protected |
A flag saying if figures-of-merit are computed in the data space
Definition at line 681 of file vOptimizer.hh.
|
protected |
String containing the name provided as the class identifer in the children classes
Definition at line 657 of file vOptimizer.hh.
|
protected |
A flag saying if some basic statistics about image update are computed
Definition at line 688 of file vOptimizer.hh.
|
protected |
The penalty derivatives order required by the specific optimizer (-1 if none)
Definition at line 697 of file vOptimizer.hh.
|
protected |
A flag saying if the optimizer is compatible with transmission data
Definition at line 667 of file vOptimizer.hh.
|
protected |
The verbose level
Definition at line 658 of file vOptimizer.hh.
|
protected |
The mean additive update correction value, one per thread to be thread safe
Definition at line 694 of file vOptimizer.hh.
|
protected |
The variance of additive update correction values, one per thread to be thread safe
Definition at line 695 of file vOptimizer.hh.
|
protected |
Pointer to the image dimensions and quantification object
Definition at line 669 of file vOptimizer.hh.
|
protected |
Pointer to the image space object in use
Definition at line 670 of file vOptimizer.hh.
|
protected |
The maximum image value, one per thread to be thread safe
Definition at line 691 of file vOptimizer.hh.
|
protected |
The mean image value, one per thread to be thread safe
Definition at line 692 of file vOptimizer.hh.
|
protected |
The minimum image value, one per thread to be thread safe
Definition at line 690 of file vOptimizer.hh.
|
protected |
The number of voxels contributing to the image statistics, one per thread to be thread safe
Definition at line 689 of file vOptimizer.hh.
|
protected |
The image variance value, one per thread to be thread safe
Definition at line 693 of file vOptimizer.hh.
|
protected |
Numbers of subsets
Definition at line 677 of file vOptimizer.hh.
|
protected |
Penalty of the algorithm
Definition at line 698 of file vOptimizer.hh.