CASToR  3.2
Tomographic Reconstruction (PET/SPECT/CT)
code/include/dynamic/i1TCModel.hh
Go to the documentation of this file.
1 
9 #ifndef I1TCMODEL_HH
10 #define I1TCMODEL_HH 1
11 
12 
21 #define METHOD_1CPT_NNLS 0
22 
23 #define METHOD_1CPT_LS 1
24 
25 #define METHOD_1CPT_BF 2
26 
37 #define METHOD_INT_WPO 0
38 
39 #define METHOD_INT_TRAP 1
40 
43 #include "vDynamicModel.hh"
44 #include "sAddonManager.hh"
45 
46 
51 class i1TCModel : public vDynamicModel
52 {
53  // -----------------------------------------------------------------------------------------
54  // Constructor & Destructor
55  public:
60  i1TCModel();
65  ~i1TCModel();
66 
67 
68  // -----------------------------------------------------------------------------------------
69  // Public member functions related to the initialization of the model
70  public:
71  // Function for automatic insertion (put the class name as the parameters and do not add semi-colon at the end of the line)
92  int ReadAndCheckOptionsList(string a_listOptions);
99  int InitializeSpecific();
105  void ShowHelpModelSpecific();
106 
107 
108  // -------------------------------------------------------------------
109  // Public member functions called by the main iterative algorithm class
118  int EstimateModelParameters(oImageSpace* ap_Image, int a_ite, int a_sset);
119 
128  int EstimateImageWithModel(oImageSpace* ap_Image, int a_ite, int a_sset);
129 
130 
131  // -------------------------------------------------------------------
132  // Private member functions
133  private:
141 
149 
157 
181  int RRLS(uint16_t a_nP,
182  uint16_t a_nT,
183  FLTNB **a2p_model,
184  FLTNB *ap_data,
185  FLTNB *ap_w,
186  FLTNB *ap_result
187  );
188 
208  int LS(uint16_t a_nP,
209  uint16_t a_nT,
210  FLTNB **a2p_model,
211  FLTNB *ap_data,
212  FLTNB *ap_w,
213  FLTNB *ap_result
214  );
215 
216 
227  FLTNB WPOinc(uint32_t a_time, FLTNB tac, FLTNB b_tac, FLTNB bb_tac, FLTNB n_tac);
228 
237  int IntegrateTAC(FLTNB* ap_tac, FLTNB* ap_citac, int a_th);
238 
247  int WPO(FLTNB* ap_tac, FLTNB* ap_citac, int a_th);
255  int Trapz(FLTNB* ap_tac, FLTNB* ap_citac);
256 
257 
258 
259  // -----------------------------------------------------------------------------------------
260  // Data members
261  protected:
271  uint16_t m_nnlsN=3;
279  // WPO
287  // Least-Square matrices for LS estimation
296  // Least-Square with Ridge Regression variables
302 };
303 
304 
305 
306 
307 // Class for automatic insertion (set here the visible dynamic model's name, put the class name as the parameters and do not add semi-colon at the end of the line)
309 
310 #endif
int CheckSpecificParameters()
This function is used to check whether all member variables have been correctly initialized or not...
i1TCModel()
Constructor of i1TCModel. Simply set all data members to default values.
int InitializeSpecific()
This function is used to initialize parametric images and basis functions.
This class implements a 1 compartiment model, to model kinetics of radiotracers such as radiowater...
This is the mother class of dynamic model classes.
~i1TCModel()
Destructor of i1TCModel.
int Trapz(FLTNB *ap_tac, FLTNB *ap_citac)
int EstimateModelParametersWithBF(oImageSpace *ap_ImageS)
int RRLS(uint16_t a_nP, uint16_t a_nT, FLTNB **a2p_model, FLTNB *ap_data, FLTNB *ap_w, FLTNB *ap_result)
int WPO(FLTNB *ap_tac, FLTNB *ap_citac, int a_th)
int ReadAndCheckOptionsList(string a_listOptions)
int EstimateModelParameters(oImageSpace *ap_Image, int a_ite, int a_sset)
int ReadAndCheckConfigurationFileSpecific()
This function is used to read options from a configuration file.
int EstimateImageWithModel(oImageSpace *ap_Image, int a_ite, int a_sset)
#define FUNCTION_DYNAMICMODEL(CLASS)
int EstimateModelParametersWithLS(oImageSpace *ap_ImageS)
#define CLASS_DYNAMICMODEL(NAME, CLASS)
This class holds all the matrices in the image domain that can be used in the algorithm: image...
Declaration of class vDynamicModel.
Structure designed for basic matrices operations.
int EstimateModelParametersWithNNLS(oImageSpace *ap_ImageS)
int LS(uint16_t a_nP, uint16_t a_nT, FLTNB **a2p_model, FLTNB *ap_data, FLTNB *ap_w, FLTNB *ap_result)
FLTNB WPOinc(uint32_t a_time, FLTNB tac, FLTNB b_tac, FLTNB bb_tac, FLTNB n_tac)
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.
int IntegrateTAC(FLTNB *ap_tac, FLTNB *ap_citac, int a_th)