32 #define VOPTIMIZER_HH 1
132 int PreDataUpdateStep(
int a_iteration,
int a_nbIterations,
int a_subset,
int* ap_nbSubsets);
146 int PostDataUpdateStep(
int a_iteration,
int a_nbIterations,
int a_subset,
int* ap_nbSubsets);
172 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
190 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
int a_iteration,
210 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
228 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
229 int a_iteration,
int a_thread );
248 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
266 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
267 int a_iteration,
int a_thread );
287 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
304 int a_timeFrame,
int a_respGate,
int a_cardGate,
426 FLTNB a_multiplicativeCorrections,
FLTNB a_additiveCorrections,
FLTNB a_blankValue,
448 FLTNB a_multiplicativeCorrections,
FLTNB a_additiveCorrections,
FLTNB a_blankValue,
587 int a_timeBasisFunction,
int a_respBasisFunction,
int a_cardBasisFunction,
588 int a_voxel,
int a_nbSubsets );
655 #define FUNCTION_OPTIMIZER(CLASS) \
656 static vOptimizer *make_optimizer() { return new CLASS(); };
659 #define CLASS_OPTIMIZER(NAME,CLASS) \
660 class NAME##OptimizerCreator \
663 NAME##OptimizerCreator() \
664 { sAddonManager::GetInstance()->mp_listOfOptimizers[#NAME] = CLASS::make_optimizer; } \
666 static NAME##OptimizerCreator OptimizerCreator##NAME;
virtual int ImageUpdateStep(int a_iteration, int a_nbSubsets)
A public function used to perform the image update step of the optimizer.
This header file is mainly used to declare some macro definitions and all includes needed from the st...
Declaration of class oImageDimensionsAndQuantification.
bool m_listmodeCompatibility
virtual int DataStep6Optional(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 public function which does nothing but being virtual.
virtual int PreDataUpdateSpecificStep(int a_iteration, int a_nbIterations, int a_subset, int *ap_nbSubsets)
A private function used to perform any step required by the child optimizer, before the loop on event...
void SetFOMFlag(bool a_optimizerFOMFlag)
Set the FOM flag specifying if figures-of-merit will be computed or not.
HPFLTNB **** m4p_FOMNbData
virtual int ReadConfigurationFile(const string &a_configurationFile)=0
A function used to read options from a configuration file.
oImageDimensionsAndQuantification * mp_ImageDimensionsAndQuantification
virtual int CheckSpecificParameters()=0
A private function used to check the parameters settings specific to the child 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...
virtual int DataStep4Optional(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 public function which does nothing but being virtual.
uint64_t **** m4p_FOMNbBins
int PostDataUpdateStep(int a_iteration, int a_nbIterations, int a_subset, int *ap_nbSubsets)
A public function used to do stuff that need to be done at the beginning of a subset (before the data...
HPFLTNB * mp_correctionStatMean
virtual int ReadOptionsList(const string &a_optionsList)=0
A function used to read options from a list of options.
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...
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.
bool m_emissionCompatibility
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.
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...
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.
FLTNB ** m2p_attenuationImage
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.
void SetImageStatFlag(bool a_optimizerImageStatFlag)
Set the image stat flag specifying if basic statistics about image udpate will be computed or not...
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)
HPFLTNB * mp_imageStatVariance
virtual ~vOptimizer()
The destructor of vOptimizer.
void SetDataSpec(int a_dataSpec)
Set the data physical specificity in use.
bool m_transmissionCompatibility
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...
oImageSpace * mp_ImageSpace
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...
int PreDataUpdateStep(int a_iteration, int a_nbIterations, int a_subset, int *ap_nbSubsets)
A public function used to do stuff that need to be done at the beginning of a subset (before the data...
HPFLTNB * mp_imageStatMean
This class is designed to manage all dimensions and quantification related stuff. ...
virtual int DataStep2Optional(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 public function which does nothing but being virtual.
int GetNbBackwardImages()
Get the number of backward images used by the specific optimizer.
int UpdateVisitedVoxels()
A public function used to update the 'visited' voxels after each subset.
virtual int PostDataUpdateSpecificStep(int a_iteration, int a_nbIterations, int a_subset, int *ap_nbSubsets)
A private function used to perform any step required by the child optimizer, after the loop on event ...
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, INTNB a_voxel)=0
A private function used to update the image value from the provided data.
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...
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...
void SetDataMode(int a_dataMode)
Set the data mode in use.
void ShowHelp()
A function used to show help about the optimizer.
HPFLTNB * mp_correctionStatVariance
FLTNB ** m2p_forwardValues
FLTNB *** m3p_backwardValues
int CheckParameters()
A public function used to check the parameters settings.
void SetImageSpace(oImageSpace *ap_ImageSpace)
Set the pointer to the image space in use.