CASToR  3.2
Tomographic Reconstruction (PET/SPECT/CT)
Public Member Functions | Protected Attributes | List of all members
iDynamicModelTemplate Class Reference

This class is a child of the vDynamicModel class implementing a template squeleton. More...

#include <iDynamicModelTemplate.hh>

Inheritance diagram for iDynamicModelTemplate:
Inheritance graph
Collaboration diagram for iDynamicModelTemplate:
Collaboration graph

Public Member Functions

 iDynamicModelTemplate ()
 Constructor of iDynamicModelTemplate. Simply set all data members to default values. More...
 
 ~iDynamicModelTemplate ()
 Destructor of iDynamicModelTemplate. More...
 
int CheckSpecificParameters ()
 This function is used to check whether all member variables have been correctly initialized or not. More...
 
int ReadAndCheckConfigurationFileSpecific ()
 This function is used to read options from a configuration file. More...
 
int ReadAndCheckOptionsList (string a_listOptions)
 
int InitializeSpecific ()
 This function is used to initialize the model parametric images and basis functions. More...
 
void ShowHelpModelSpecific ()
 This function is used to print out specific help about the dynamic model and its options. It is pure virtual so must be implemented by children. More...
 
int EstimateModelParameters (oImageSpace *ap_Image, int a_ite, int a_sset)
 
int EstimateImageWithModel (oImageSpace *ap_Image, int a_ite, int a_sset)
 
 iDynamicModelTemplate ()
 
 ~iDynamicModelTemplate ()
 
int CheckSpecificParameters ()
 This function is used to check the parameters of the child functions before initialization if required. More...
 
int ReadAndCheckConfigurationFileSpecific ()
 This function is used to read options from a configuration file.
It is pure virtual so must be implemented by children. More...
 
int ReadAndCheckOptionsList (string a_listOptions)
 
int InitializeSpecific ()
 A private function used to initialize everything specific to the child model. More...
 
void ShowHelpModelSpecific ()
 This function is used to print out specific help about the dynamic model and its options. It is pure virtual so must be implemented by children. More...
 
int EstimateModelParameters (oImageSpace *ap_Image, int a_ite, int a_sset)
 
int EstimateImageWithModel (oImageSpace *ap_Image, int a_ite, int a_sset)
 
- Public Member Functions inherited from vDynamicModel
 vDynamicModel ()
 Constructor of vDynamicModel. Simply set all data members to default values. More...
 
virtual ~vDynamicModel ()
 Destructor of vDynamicModel. More...
 
void SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
 
void SetVerbose (int a_verbose)
 
virtual int CheckParameters ()
 This function is used to check parameters after the latter have been all set using Set functions. More...
 
int ReadAndCheckConfigurationFile (string a_fileOptions)
 
int Initialize ()
 A public function used to initialize the dynamic model. More...
 
void ShowHelp ()
 This function is used to print out general help about dynamic models. More...
 
virtual int EstimateModel (oImageSpace *ap_Image, int a_ite, int a_sset)
 
virtual int EstimateImage (oImageSpace *ap_Image, int a_ite, int a_sset)
 
int SaveParametricImages (int a_iteration, int a_subset=-1)
 
virtual int ApplyOutputFOVMaskingOnParametricImages ()
 Mask the outside of the transaxial FOV based on the m_fovOutPercent. More...
 
bool GetAICflag ()
 
bool GetModelBasisFunctionsRequiredFlag ()
 
int GetNbTimeBasisFunctions ()
 
FLTNB ** GetTimeBasisFunctions ()
 
virtual void ComputeOutputParImage ()
 Compute output image using the m2p_parametricImages matrix Store the result in the m2p_outputParImages matrix. More...
 
void SetUseModelInReconstruction (bool a_useModelInReconstruction)
 
int NNLS (FLTNB **A, int m, int n, FLTNB *B, FLTNB *X, FLTNB *rnorm, FLTNB *wp, FLTNB *zzp, int *indexp)
 
 vDynamicModel ()
 
virtual ~vDynamicModel ()
 
void SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
 
void SetVerbose (int a_verbose)
 
virtual int CheckParameters ()
 
int ReadAndCheckConfigurationFile (string a_fileOptions)
 
int Initialize ()
 
void ShowHelp ()
 
virtual int EstimateModel (oImageSpace *ap_Image, int a_ite, int a_sset)
 
virtual int EstimateImage (oImageSpace *ap_Image, int a_ite, int a_sset)
 
int SaveParametricImages (int a_iteration, int a_subset=-1)
 
virtual int ApplyOutputFOVMaskingOnParametricImages ()
 
bool GetAICflag ()
 
bool GetModelBasisFunctionsRequiredFlag ()
 
int GetNbTimeBasisFunctions ()
 
FLTNB ** GetTimeBasisFunctions ()
 
virtual void ComputeOutputParImage ()
 
void SetUseModelInReconstruction (bool a_useModelInReconstruction)
 
int NNLS (FLTNB **A, int m, int n, FLTNB *B, FLTNB *X, FLTNB *rnorm, FLTNB *wp, FLTNB *zzp, int *indexp)
 

Protected Attributes

FLTNB ** m2p_parametricImages
 
- Protected Attributes inherited from vDynamicModel
oImageDimensionsAndQuantificationmp_ID
 
int m_verbose
 
int m_nbTimeBF
 
int m_nbWeightFactors
 
int m_nbModelParam
 
int m_nbRGModelParam
 
int m_nbCGModelParam
 
string m_AICfile
 
oArterialInputCurvemp_ArterialInputCurve
 
FLTNB ** m2p_parametricImages
 
FLTNBmp_blackListedvoxelsImage
 
FLTNB ** m2p_nestedModelTimeBasisFunctions
 
FLTNB ** m2p_outputParImages
 
FLTNB ** m2p_RGParametricImages
 
FLTNB ** m2p_CGParametricImages
 
string m_fileOptions
 
string m_listOptions
 
bool m_checked
 
bool m_initialized
 
bool m_useModelInReconstruction
 
bool m_saveParImageFlag
 
bool m_saveBlacklistedImageMaskFlag
 
bool m_AICfileProvided
 
bool m_ModelSpecificBasisFunctionsRequired
 
bool m_noImageUpdateFlag
 
bool m_noParametersUpdateFlag
 
int m_startIteUpdateFlag
 
FLTNBmp_maskModel
 
INTNB m_nbVoxelsMask
 
FLTNBmp_w
 
FLTNB *** m3p_nnlsA
 
FLTNB ** m2p_nnlsB
 
FLTNB ** m2p_nnlsMat
 
FLTNB ** m2p_nnlsX
 
FLTNB ** m2p_nnlsWp
 
int ** m2p_nnlsIdx
 
uint16_t m_nnlsN =0
 

Detailed Description

This class is a child of the vDynamicModel class implementing a template squeleton.

Use this class to implement your own custom deformation model.

Definition at line 21 of file code/include/dynamic/iDynamicModelTemplate.hh.

Constructor & Destructor Documentation

◆ iDynamicModelTemplate() [1/2]

iDynamicModelTemplate::iDynamicModelTemplate ( )

Constructor of iDynamicModelTemplate. Simply set all data members to default values.

<

Definition at line 18 of file code/src/dynamic/iDynamicModelTemplate.cc.

◆ ~iDynamicModelTemplate() [1/2]

iDynamicModelTemplate::~iDynamicModelTemplate ( )

Destructor of iDynamicModelTemplate.

Definition at line 107 of file code/src/dynamic/iDynamicModelTemplate.cc.

◆ iDynamicModelTemplate() [2/2]

iDynamicModelTemplate::iDynamicModelTemplate ( )

◆ ~iDynamicModelTemplate() [2/2]

iDynamicModelTemplate::~iDynamicModelTemplate ( )

Member Function Documentation

◆ CheckSpecificParameters() [1/2]

int iDynamicModelTemplate::CheckSpecificParameters ( )
virtual

This function is used to check whether all member variables have been correctly initialized or not.

Returns
0 if success, positive value otherwise.

Implements vDynamicModel.

Definition at line 199 of file code/src/dynamic/iDynamicModelTemplate.cc.

◆ CheckSpecificParameters() [2/2]

int iDynamicModelTemplate::CheckSpecificParameters ( )
virtual

This function is used to check the parameters of the child functions before initialization if required.

It could be overloaded by the child if needed. Default implementation is empty and return 0.

Returns
0 if success, other value otherwise.

Implements vDynamicModel.

◆ EstimateImageWithModel() [1/2]

int iDynamicModelTemplate::EstimateImageWithModel ( oImageSpace ap_Image,
int  a_ite,
int  a_sset 
)
virtual

Implements vDynamicModel.

Definition at line 321 of file code/src/dynamic/iDynamicModelTemplate.cc.

Here is the call graph for this function:

◆ EstimateImageWithModel() [2/2]

int iDynamicModelTemplate::EstimateImageWithModel ( oImageSpace ap_Image,
int  a_ite,
int  a_sset 
)
virtual

Implements vDynamicModel.

◆ EstimateModelParameters() [1/2]

int iDynamicModelTemplate::EstimateModelParameters ( oImageSpace ap_Image,
int  a_ite,
int  a_sset 
)
virtual

Implements vDynamicModel.

Definition at line 262 of file code/src/dynamic/iDynamicModelTemplate.cc.

Here is the call graph for this function:

◆ EstimateModelParameters() [2/2]

int iDynamicModelTemplate::EstimateModelParameters ( oImageSpace ap_Image,
int  a_ite,
int  a_sset 
)
virtual

Implements vDynamicModel.

◆ InitializeSpecific() [1/2]

int iDynamicModelTemplate::InitializeSpecific ( )
virtual

This function is used to initialize the model parametric images and basis functions.

Returns
0 if success, other value otherwise.
0 if success, other value otherwise.

Implements vDynamicModel.

Definition at line 224 of file code/src/dynamic/iDynamicModelTemplate.cc.

◆ InitializeSpecific() [2/2]

int iDynamicModelTemplate::InitializeSpecific ( )
virtual

A private function used to initialize everything specific to the child model.

This function is used to initialize everything specific to the model that should be initialized. It is called by the Initialize() function. It is pure virtual so is implemented only by children.

Returns
An integer reflecting the initialization status; 0 if no problem, another value otherwise.

Implements vDynamicModel.

◆ ReadAndCheckConfigurationFileSpecific() [1/2]

int iDynamicModelTemplate::ReadAndCheckConfigurationFileSpecific ( )
virtual

This function is used to read options from a configuration file.

Returns
0 if success, other value otherwise.

Implements vDynamicModel.

Definition at line 147 of file code/src/dynamic/iDynamicModelTemplate.cc.

◆ ReadAndCheckConfigurationFileSpecific() [2/2]

int iDynamicModelTemplate::ReadAndCheckConfigurationFileSpecific ( )
virtual

This function is used to read options from a configuration file.
It is pure virtual so must be implemented by children.

Returns
0 if success, other value otherwise.

Implements vDynamicModel.

◆ ReadAndCheckOptionsList() [1/2]

int iDynamicModelTemplate::ReadAndCheckOptionsList ( string  a_listOptions)
virtual

Implements vDynamicModel.

◆ ReadAndCheckOptionsList() [2/2]

int iDynamicModelTemplate::ReadAndCheckOptionsList ( string  a_listOptions)
virtual

Implements vDynamicModel.

Definition at line 174 of file code/src/dynamic/iDynamicModelTemplate.cc.

◆ ShowHelpModelSpecific() [1/2]

void iDynamicModelTemplate::ShowHelpModelSpecific ( )
virtual

This function is used to print out specific help about the dynamic model and its options. It is pure virtual so must be implemented by children.

Implements vDynamicModel.

◆ ShowHelpModelSpecific() [2/2]

void iDynamicModelTemplate::ShowHelpModelSpecific ( )
virtual

This function is used to print out specific help about the dynamic model and its options. It is pure virtual so must be implemented by children.

Implements vDynamicModel.

Definition at line 127 of file code/src/dynamic/iDynamicModelTemplate.cc.

Member Data Documentation

◆ m2p_parametricImages

FLTNB ** iDynamicModelTemplate::m2p_parametricImages
protected

2 dimensions (or more if required) array containing parametric image. It must be a 2 dimensions array [nb of basis functions][nb of voxels]

Definition at line 109 of file code/include/dynamic/iDynamicModelTemplate.hh.


The documentation for this class was generated from the following files: