9 #define VOPTIMIZER_HH 1
110 int PreDataUpdateStep(
int a_iteration,
int a_nbIterations,
int a_subset,
int a_nbSubsets);
124 int PostDataUpdateStep(
int a_iteration,
int a_nbIterations,
int a_subset,
int a_nbSubsets);
151 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
170 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
int a_iteration,
191 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
210 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
211 int a_iteration,
int a_thread );
230 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
249 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
250 int a_iteration,
int a_thread );
271 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
288 int a_timeFrame,
int a_respGate,
int a_cardGate,
410 FLTNB a_multiplicativeCorrections,
FLTNB a_additiveCorrections,
431 FLTNB a_multiplicativeCorrections,
FLTNB a_additiveCorrections,
451 FLTNB a_sensitivity,
FLTNB* ap_correctionValues ) = 0;
555 int a_timeBasisFunction,
int a_respBasisFunction,
int a_cardBasisFunction,
556 int a_voxel,
int a_nbSubsets );
619 #define FUNCTION_OPTIMIZER(CLASS) \
620 static vOptimizer *make_optimizer() { return new CLASS(); };
623 #define CLASS_OPTIMIZER(NAME,CLASS) \
624 class NAME##OptimizerCreator \
627 NAME##OptimizerCreator() \
628 { sAddonManager::GetInstance()->mp_listOfOptimizers[#NAME] = CLASS::make_optimizer; } \
630 static NAME##OptimizerCreator OptimizerCreator##NAME;
double * mp_imageStatVariance
This header file is mainly used to declare some macro definitions and all includes needed from the st...
Declaration of class oImageDimensionsAndQuantification.
virtual int PostDataUpdateSpecificStep(int a_iteration, int a_nbIterations, int a_subset, int a_nbSubsets)
A private function used to perform any step required by the child optimizer, after the loop on event ...
bool m_listmodeCompatibility
void SetFOMFlag(bool a_optimizerFOMFlag)
Set the FOM flag specifying if figures-of-merit will be computed or not.
virtual int ReadConfigurationFile(const string &a_configurationFile)=0
A function used to read options from a configuration file.
double * mp_correctionStatMean
oImageDimensionsAndQuantification * mp_ImageDimensionsAndQuantification
virtual int DataStep3BackwardProjectSensitivity(oProjectionLine *ap_Line, oImageSpace *ap_Image, 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.
virtual int CheckSpecificParameters()=0
A private function used to check the parameters settings specific to the child optimizer.
virtual int ImageUpdateStep(oImageSpace *ap_Image, int a_iteration, int a_nbSubsets)
A public function used to perform the image update step of the optimizer.
vOptimizer()
The constructor of vOptimizer.
void SetImageDimensionsAndQuantification(oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
Set the pointer to the image dimensions in use.
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 oProjecti...
uint64_t **** m4p_FOMNbBins
double * mp_correctionStatVariance
virtual int ReadOptionsList(const string &a_optionsList)=0
A function used to read options from a list of options.
virtual int DataStep1ForwardProjectModel(oProjectionLine *ap_Line, oImageSpace *ap_Image, 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.
void SetNbTOFBins(int a_nbTOFBins)
Set the number of TOF bins in use.
void SetDataType(int a_dataType)
Set the data type in use.
INTNB * mp_imageStatNbVox
Declaration of class oProjectionLine.
virtual int DataSpaceSpecificOperations(FLTNB a_data, FLTNB a_forwardModel, FLTNB *ap_backwardValues, FLTNB a_multiplicativeCorrections, FLTNB a_additiveCorrections, FLTNB a_quantificationFactor, oProjectionLine *ap_Line)=0
A private function used to compute the correction term in the data space from the provided data...
Declaration of class vDataFile.
virtual int InitializeSpecific()=0
A private function used to initialize everything specific to the child optimizer. ...
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...
int PreDataUpdateStep(int a_iteration, int a_nbIterations, int a_subset, int a_nbSubsets)
A public function used to do stuff that need to be done at the beginning of a subset (before the data...
FLTNB ** m2p_attenuationImage
virtual int DataStep4Optional(oProjectionLine *ap_Line, oImageSpace *ap_Image, vEvent *ap_Event, int a_bed, int a_timeFrame, int a_respGate, int a_cardGate, int a_iteration, int a_thread)
A public function which does nothing but being virtual.
bool m_histogramCompatibility
bool m_optimizerImageStatFlag
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.
double **** m4p_FOMNbData
void SetImageStatFlag(bool a_optimizerImageStatFlag)
Set the image stat flag specifying if basic statistics about image udpate will be computed or not...
int UpdateVisitedVoxels(oImageSpace *ap_Image)
A public function used to update the 'visited' voxels after each subset.
FLTNB ComputeSensitivity(FLTNB ****a4p_sensitivityImage, int a_timeBasisFunction, int a_respBasisFunction, int a_cardBasisFunction, int a_voxel, int a_nbSubsets)
A function used to compute the sensitivity of a given voxel and a given set of dynamic basis function...
FLTNB GetInitialValue()
Get the initial image value (for initialization)
int PostDataUpdateStep(int a_iteration, int a_nbIterations, int a_subset, int a_nbSubsets)
A public function used to do stuff that need to be done at the beginning of a subset (before the data...
virtual int PreDataUpdateSpecificStep(int a_iteration, int a_nbIterations, int a_subset, int a_nbSubsets)
A private function used to perform any step required by the child optimizer, before the loop on event...
virtual int DataStep2Optional(oProjectionLine *ap_Line, oImageSpace *ap_Image, vEvent *ap_Event, int a_bed, int a_timeFrame, int a_respGate, int a_cardGate, int a_iteration, int a_thread)
A public function which does nothing but being virtual.
virtual ~vOptimizer()
The destructor of vOptimizer.
This class is designed to generically described any iterative optimizer.
void SetAttenuationImage(FLTNB *ap_attenuationImage, int a_thread)
Set the attenuation image corresponding to the current thread and current event.
This class is designed to manage and store system matrix elements associated to a vEvent...
Declaration of class oImageSpace.
FLTNB **** m4p_FOMLogLikelihood
int Initialize()
A public function used to initialize the optimizer.
This class holds all the matrices in the image domain that can be used in the algorithm: image...
Mother class for the Event objects.
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...
This class is designed to manage all dimensions and quantification related stuff. ...
int GetNbBackwardImages()
Get the number of backward images used by the specific optimizer.
void SetVerbose(int a_verbose)
Set the verbose level.
virtual void ShowHelpSpecific()=0
A function used to show help about the child module.
virtual int ImageSpaceSpecificOperations(FLTNB a_currentImageValue, FLTNB *ap_newImageValue, FLTNB a_sensitivity, FLTNB *ap_correctionValues)=0
A private function used to update the image value from the provided data.
virtual int DataStep7BackwardProjectCorrections(oProjectionLine *ap_Line, oImageSpace *ap_Image, 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...
void SetDataMode(int a_dataMode)
Set the data mode in use.
void ShowHelp()
A function used to show help about the optimizer.
double * mp_imageStatMean
FLTNB ** m2p_forwardValues
virtual int DataStep6Optional(oProjectionLine *ap_Line, oImageSpace *ap_Image, vEvent *ap_Event, int a_bed, int a_timeFrame, int a_respGate, int a_cardGate, int a_iteration, int a_thread)
A public function which does nothing but being virtual.
FLTNB *** m3p_backwardValues
int CheckParameters()
A public function used to check the parameters settings.
virtual int SensitivitySpecificOperations(FLTNB a_data, FLTNB a_forwardModel, FLTNB *ap_weight, FLTNB a_multiplicativeCorrections, FLTNB a_additiveCorrections, FLTNB a_quantificationFactor, oProjectionLine *ap_Line)=0
A private function used to compute the sensitivity weight associated to the provided data...