31 #define VOPTIMIZER_HH 1 164 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
181 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
201 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
218 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
238 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
255 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
276 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
293 int a_timeFrame,
int a_respGate,
int a_cardGate,
407 FLTNB a_multiplicativeCorrections,
FLTNB a_additiveCorrections,
FLTNB a_blankValue,
429 FLTNB a_multiplicativeCorrections,
FLTNB a_additiveCorrections,
FLTNB a_blankValue,
451 int tbf = -1,
int rbf = -1,
int cbf = -1 ) = 0;
629 int a_timeBasisFunction,
int a_respBasisFunction,
int a_cardBasisFunction,
708 #define FUNCTION_OPTIMIZER(CLASS) \ 709 static vOptimizer *make_optimizer() { return new CLASS(); }; 712 #define CLASS_OPTIMIZER(NAME,CLASS) \ 713 class NAME##OptimizerCreator \ 716 NAME##OptimizerCreator() \ 717 { sAddonManager::GetInstance()->mp_listOfOptimizers[#NAME] = CLASS::make_optimizer; } \ 719 static NAME##OptimizerCreator OptimizerCreator##NAME; void SetOptimizerID(const string &a_optimizerID)
Set the optimizer ID.
This header file is mainly used to declare some macro definitions and all includes needed from the st...
int m_requiredPenaltyDerivativesOrder
Declaration of class oImageDimensionsAndQuantification.
bool GetNeedGlobalSensitivity()
Get the boolean saying if the sensitivity has to be computed globally for all data channels and not p...
bool m_listmodeCompatibility
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.
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
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 function...
virtual int ImageUpdateStep()
A public function used to perform the image update step of the optimizer.
void SetCurrentIteration(int a_currentIteration)
Set the current iteration.
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...
uint64_t **** m4p_FOMNbBins
HPFLTNB * mp_correctionStatMean
virtual int ReadOptionsList(const string &a_optionsList)=0
A function used to read options from a list of options.
int PreDataUpdateStep()
A public function used to do stuff that need to be done at the beginning of a subset (before the data...
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.
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.
INTNB * mp_imageStatNbVox
Declaration of class oProjectionLine.
int GetRequiredPenaltyDerivativesOrder()
Get the penalty derivative order needed for this algorithm.
bool m_needGlobalSensitivity
bool GetAcceptPenalty()
Get the boolean saying if the optimizer accepts penalties.
bool m_emissionCompatibility
void SetNumbersOfIterationsAndSubsets(int a_nbIterations, int *ap_nbSubsets)
Set these numbers of iterations and subsets.
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 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.
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
Declaration of class vPenalty.
This class is designed to generically described any penalty applied to MAP algorithms.
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.
HPFLTNB **** m4p_FOMPenalty
void SetImageStatFlag(bool a_optimizerImageStatFlag)
Set the image stat flag specifying if basic statistics about image udpate will be computed or not...
void SetPenalty(vPenalty *ap_penalty)
Set the penalty of the optimizer.
FLTNB GetInitialValue()
Get the initial image value (for initialization)
HPFLTNB * mp_imageStatVariance
virtual ~vOptimizer()
The destructor of vOptimizer.
virtual int PreImageUpdateSpecificStep()
A private function used to perform any step required by the child optimizer, between the loop on even...
void SetDataSpec(int a_dataSpec)
Set the data physical specificity in use.
int PreImageUpdateStep()
A public function used to do stuff that need to be done between the loop over events and the image up...
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.
void SetCurrentSubset(int a_currentSubset)
Set the current subset.
int Initialize()
A public function used to initialize the optimizer.
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.
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...
HPFLTNB * mp_imageStatMean
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.
int UpdateVisitedVoxels()
A public function used to update the 'visited' voxels after each subset.
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 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
const string & GetOptimizerID()
FLTNB ** m2p_forwardValues
HPFLTNB **** m4p_FOMLogLikelihood
FLTNB *** m3p_backwardValues
int CheckParameters()
A public function used to check the parameters settings.
virtual int PreDataUpdateSpecificStep()
A private function used to perform any step required by the child optimizer, before the loop on event...
void SetImageSpace(oImageSpace *ap_ImageSpace)
Set the pointer to the image space in use.