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" 17 #include "oImageConvolverManager.hh" 143 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
160 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
180 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
197 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
217 int a_bed,
int a_timeFrame,
int a_respGate,
int a_cardGate,
234 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,
272 int a_timeFrame,
int a_respGate,
int a_cardGate,
386 FLTNB a_multiplicativeCorrections,
FLTNB a_additiveCorrections,
FLTNB a_blankValue,
408 FLTNB a_multiplicativeCorrections,
FLTNB a_additiveCorrections,
FLTNB a_blankValue,
430 int tbf = -1,
int rbf = -1,
int cbf = -1 ) = 0;
675 int a_timeBasisFunction,
int a_respBasisFunction,
int a_cardBasisFunction,
769 #define FUNCTION_OPTIMIZER(CLASS) \ 770 static vOptimizer *make_optimizer() { return new CLASS(); }; 773 #define CLASS_OPTIMIZER(NAME,CLASS) \ 774 class NAME##OptimizerCreator \ 777 NAME##OptimizerCreator() \ 778 { sAddonManager::GetInstance()->mp_listOfOptimizers[#NAME] = CLASS::make_optimizer; } \ 780 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
This class is designed to be a mother virtual class for DataFile.
int * mp_nbSubIterationsInSubSteps
int m_requiredPenaltyDerivativesOrder
int GetRequiredPenaltyDerivativesOrder()
void ExitPostIteration()
Set post-process flag to false.
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
void EnterPostIteration()
Set post-process flag to true.
void ExitPreIteration()
Set pre-process flag to false.
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.
void SetImageConvolverManager(oImageConvolverManager *ap_ImageConvolverManager)
Set the Image Convolver Manager Object.
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...
int m_nbSubIterationsTotal
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
INTNB * mp_imageStatNbVox
FLTNB ** m2p_forwardValues
bool m_needGlobalSensitivity
void SetAttenuationImage(FLTNB *ap_attenuationImage, int a_thread)
FLTNB *** m3p_backwardValues
bool m_emissionCompatibility
int m_nbSubIterationsInOneIteration
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 SetOutputIterations(bool *ap_outputIterations)
Set the selected output iterations.
void BackwardProject(oProjectionLine *ap_Line, FLTNB *ap_image, FLTNB a_value)
int GetNbSubIterationsInOneIteration()
Get the number of sub iterations in one iteration.
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 manage the different image convolvers and to apply them.
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)
bool NeedPostIteration()
Say if the optimizer needs a post-process loop after iterations are done.
bool * mp_outputIterations
oImageSpace * mp_ImageSpace
int m_currentTotalSubIteration
int m_currentSubIterationInSubStep
HPFLTNB * mp_correctionStatVariance
void SetDataFile(vDataFile *ap_DataFile)
Set the data file in use.
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.
void EnterPreIteration()
Set pre-process flag to true.
This class is designed to manage and store system matrix elements associated to a vEvent...
void SetImageStatFlag(bool a_optimizerImageStatFlag)
int GetNbBackwardImages()
Declaration of class vPenalty.
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 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)
bool GetNeedGlobalSensitivity()
void ShowHelp()
A function used to show help about the optimizer.
void SetPenalty(vPenalty *ap_penalty)
const string & GetOptimizerID()
bool NeedPreIteration()
Say if the optimizer needs a pre-process loop before iterations are done.
int CheckParameters()
A public function used to check the parameters settings.
oImageConvolverManager * mp_ImageConvolverManager
virtual int PreDataUpdateSpecificStep()
A private function used to perform any step required by the child optimizer, before the loop on event...
void SetNumbersOfIterationsAndSubsets(int a_nbSubIterationsTotal, int *ap_nbSubsets)
virtual int ReadOptionsList(const string &a_optionsList)=0