9 #define VOPTIMIZER_HH 1 11 #include "gVariables.hh" 12 #include "oImageDimensionsAndQuantification.hh" 13 #include "oImageSpace.hh" 14 #include "vDataFile.hh" 15 #include "oProjectionLine.hh" 142 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
159 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
179 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
196 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
216 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
233 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
254 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
271 int a_timeFrame,
int a_respGate,
int a_cardGate,
385 FLTNB a_multiplicativeCorrections,
FLTNB a_additiveCorrections,
FLTNB a_blankValue,
407 FLTNB a_multiplicativeCorrections,
FLTNB a_additiveCorrections,
FLTNB a_blankValue,
429 int tbf = -1,
int rbf = -1,
int cbf = -1 ) = 0;
607 int a_timeBasisFunction,
int a_respBasisFunction,
int a_cardBasisFunction,
686 #define FUNCTION_OPTIMIZER(CLASS) \ 687 static vOptimizer *make_optimizer() { return new CLASS(); }; 690 #define CLASS_OPTIMIZER(NAME,CLASS) \ 691 class NAME##OptimizerCreator \ 694 NAME##OptimizerCreator() \ 695 { sAddonManager::GetInstance()->mp_listOfOptimizers[#NAME] = CLASS::make_optimizer; } \ 697 static NAME##OptimizerCreator OptimizerCreator##NAME; virtual int ReadConfigurationFile(const string &a_configurationFile)=0
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
int m_requiredPenaltyDerivativesOrder
bool GetNeedGlobalSensitivity()
Get the boolean saying if the sensitivity has to be computed globally for all data channels and not p...
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
bool m_listmodeCompatibility
void SetImageDimensionsAndQuantification(oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
virtual int DataStep2Optional(oProjectionLine *ap_Line, vEvent *ap_Event, int a_bed, int a_timeFrame, int a_respGate, int a_cardGate, int a_thread)
uint64_t **** m4p_FOMNbBins
oImageDimensionsAndQuantification * mp_ImageDimensionsAndQuantification
HPFLTNB **** m4p_FOMPenalty
FLTNB ComputeSensitivity(FLTNB ****a4p_sensitivityImage, int a_timeBasisFunction, int a_respBasisFunction, int a_cardBasisFunction, int a_voxel)
virtual int ImageUpdateStep()
A public function used to perform the image update step of the optimizer.
HPFLTNB **** m4p_FOMNbData
virtual int CheckSpecificParameters()=0
A private function used to check the parameters settings specific to the child optimizer.
vOptimizer()
The constructor of vOptimizer.
void SetDataType(int a_dataType)
HPFLTNB * mp_imageStatMean
FLTNB ForwardProject(oProjectionLine *ap_Line, FLTNB *ap_image=NULL)
FLTNB ** m2p_attenuationImage
int PreDataUpdateStep()
A public function used to do stuff that need to be done at the beginning of a subset (before the data...
void SetFOMFlag(bool a_optimizerFOMFlag)
void SetImageSpace(oImageSpace *ap_ImageSpace)
HPFLTNB **** m4p_FOMLogLikelihood
virtual int DataStep6Optional(oProjectionLine *ap_Line, vEvent *ap_Event, int a_bed, int a_timeFrame, int a_respGate, int a_cardGate, int a_thread)
HPFLTNB * mp_correctionStatMean
int GetRequiredPenaltyDerivativesOrder()
Get the penalty derivative order needed for this algorithm.
INTNB * mp_imageStatNbVox
FLTNB ** m2p_forwardValues
bool m_needGlobalSensitivity
bool GetAcceptPenalty()
Get the boolean saying if the optimizer accepts penalties.
void SetAttenuationImage(FLTNB *ap_attenuationImage, int a_thread)
FLTNB *** m3p_backwardValues
bool m_emissionCompatibility
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
virtual int DataStep3BackwardProjectSensitivity(oProjectionLine *ap_Line, vEvent *ap_Event, int a_bed, int a_timeFrame, int a_respGate, int a_cardGate, int a_thread)
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)
void SetOptimizerID(const string &a_optimizerID)
virtual int DataStep1ForwardProjectModel(oProjectionLine *ap_Line, vEvent *ap_Event, int a_bed, int a_timeFrame, int a_respGate, int a_cardGate, int a_thread)
void SetDataMode(int a_dataMode)
HPFLTNB * mp_imageStatVariance
bool m_histogramCompatibility
bool m_optimizerImageStatFlag
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)
void SetNbTOFBins(int a_nbTOFBins)
oImageSpace * mp_ImageSpace
FLTNB GetInitialValue()
Get the initial image value (for initialization)
void SetNumbersOfIterationsAndSubsets(int a_nbIterations, int *ap_nbSubsets)
HPFLTNB * mp_correctionStatVariance
void SetVerbose(int a_verbose)
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...
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.
This class is designed to manage and store system matrix elements associated to a vEvent...
void SetImageStatFlag(bool a_optimizerImageStatFlag)
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)
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)
void SetCurrentIteration(int a_currentIteration)
void SetCurrentSubset(int a_currentSubset)
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 SetDataSpec(int a_dataSpec)
virtual void ShowHelpSpecific()=0
A function used to show help about the child module.
virtual int DataStep7BackwardProjectCorrections(oProjectionLine *ap_Line, vEvent *ap_Event, int a_bed, int a_timeFrame, int a_respGate, int a_cardGate, int a_thread)
void ShowHelp()
A function used to show help about the optimizer.
void SetPenalty(vPenalty *ap_penalty)
const string & GetOptimizerID()
int CheckParameters()
A public function used to check the parameters settings.
Declaration of class vPenalty.
virtual int PreDataUpdateSpecificStep()
A private function used to perform any step required by the child optimizer, before the loop on event...
virtual int ReadOptionsList(const string &a_optionsList)=0