![]() |
CASToR
3.0
Tomographic Reconstruction (PET/SPECT/CT)
|
This class implements a 1 compartiment model, to model kinetics of radiotracers such as radiowater. More...
#include <i1TCModel.hh>
Public Member Functions | |
i1TCModel () | |
Constructor of i1TCModel. Simply set all data members to default values. More... | |
~i1TCModel () | |
Destructor of i1TCModel. 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) |
This function is used to read parameters from a string. More... | |
int | InitializeSpecific () |
This function is used to initialize parametric images and basis functions. More... | |
void | ShowHelp () |
Print out specific help about the implementation of the model model and its initialization. More... | |
int | EstimateModelParameters (oImageSpace *ap_Image, int a_ite, int a_sset) |
Estimate K1, k2, Va parametric images. More... | |
int | EstimateImageWithModel (oImageSpace *ap_Image, int a_ite, int a_sset) |
Estimate image using model parametric images and basis functions. More... | |
![]() | |
vDynamicModel () | |
Constructor of vDynamicModel. Simply set all data members to default values. More... | |
virtual | ~vDynamicModel () |
Destructor of vDynamicModel. More... | |
void | SetImageDimensionsAndQuantification (oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification) |
Set the image dimensions in use. More... | |
void | SetVerbose (int a_verbose) |
Set the verbose level. More... | |
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) |
This function is used to read options from a configuration file. It looks for the parameters implemented by the mother class, such as 'No image update', 'No parameters update', or 'Save parametric images'. More... | |
int | Initialize () |
A public function used to initialize the dynamic model. More... | |
virtual int | EstimateModel (oImageSpace *ap_Image, int a_ite, int a_sset) |
This function checks if the EstimateModelParameters() function (specific to each model) must be called at this stage of the reconstruction depending on the m_xxxUpdateflags. More... | |
virtual int | EstimateImage (oImageSpace *ap_Image, int a_ite, int a_sset) |
int | SaveParametricImages (int a_iteration, int a_subset=-1) |
This function is virtual it can be overloaded by children if required. More... | |
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... | |
int | NNLS (FLTNB **A, int m, int n, FLTNB *B, FLTNB *X, FLTNB *rnorm, FLTNB *wp, FLTNB *zzp, int *indexp) |
Implementation of NNLS (non-negative least squares) algorithm Derived from Turku PET center libraries (authors: Vesa Oikonen and Kaisa Sederholm) This routine is based on the text and fortran code in C.L. Lawson and R.J. Hanson, Solving Least Squares Problems, Prentice-Hall, Englewood Cliffs, New Jersey, 1974. More... | |
Private Member Functions | |
int | EstimateModelParametersWithLS (oImageSpace *ap_ImageS) |
Estimate K1, k2, Va parametric images using LS. More... | |
int | EstimateModelParametersWithNNLS (oImageSpace *ap_ImageS) |
Estimate K1, k2, Va parametric images using NNLS. More... | |
int | EstimateModelParametersWithBF (oImageSpace *ap_ImageS) |
Estimate K1, k2, Va parametric images using basis functions approach. More... | |
int | RRLS (uint16_t a_nP, uint16_t a_nT, FLTNB **a2p_model, FLTNB *ap_data, FLTNB *ap_w, FLTNB *ap_result) |
Non-linear least square estimator with Ridge-Regression. More... | |
int | LS (uint16_t a_nP, uint16_t a_nT, FLTNB **a2p_model, FLTNB *ap_data, FLTNB *ap_w, FLTNB *ap_result) |
Non-linear least square estimator. More... | |
FLTNB | WPOinc (uint32_t a_time, FLTNB tac, FLTNB b_tac, FLTNB bb_tac, FLTNB n_tac) |
Estimate the next integration value for a specific time point of a tac using WPO. More... | |
int | IntegrateTAC (FLTNB *ap_tac, FLTNB *ap_citac, int a_th) |
Call one of the TAC integration method. More... | |
int | WPO (FLTNB *ap_tac, FLTNB *ap_citac, int a_th) |
return integral for each time point t (WPO_S), and cumulative integral (cumWPO_S ) More... | |
int | Trapz (FLTNB *ap_tac, FLTNB *ap_citac) |
return integral for each time point t (WPO_S), and cumulative integral (cumWPO_S ) More... | |
This class implements a 1 compartiment model, to model kinetics of radiotracers such as radiowater.
Definition at line 73 of file i1TCModel.hh.
i1TCModel::i1TCModel | ( | ) |
Constructor of i1TCModel. Simply set all data members to default values.
Definition at line 51 of file i1TCModel.cc.
i1TCModel::~i1TCModel | ( | ) |
Destructor of i1TCModel.
Definition at line 110 of file i1TCModel.cc.
|
virtual |
This function is used to check whether all member variables have been correctly initialized or not.
Implements vDynamicModel.
Definition at line 455 of file i1TCModel.cc.
|
virtual |
Estimate image using model parametric images and basis functions.
ap_ImageS | : pointer to the ImageSpace |
a_ite | : index of the actual iteration (not used) |
a_sset | : index of the actual subset (not used) |
Implements vDynamicModel.
Definition at line 1737 of file i1TCModel.cc.
|
virtual |
Estimate K1, k2, Va parametric images.
ap_ImageS | : pointer to the ImageSpace |
a_ite | : index of the actual iteration (not used) |
a_sset | : index of the actual subset (not used) |
Implements vDynamicModel.
Definition at line 898 of file i1TCModel.cc.
|
private |
Estimate K1, k2, Va parametric images using basis functions approach.
ap_ImageS | : pointer to the ImageSpace |
Definition at line 1181 of file i1TCModel.cc.
|
private |
Estimate K1, k2, Va parametric images using LS.
ap_ImageS | : pointer to the ImageSpace |
Definition at line 1216 of file i1TCModel.cc.
|
private |
Estimate K1, k2, Va parametric images using NNLS.
ap_ImageS | : pointer to the ImageSpace |
Definition at line 1002 of file i1TCModel.cc.
|
virtual |
This function is used to initialize parametric images and basis functions.
Implements vDynamicModel.
Definition at line 518 of file i1TCModel.cc.
Call one of the TAC integration method.
ap_tac | : vector with nb time frames elements containing the time activity curve from which integral will be computed |
ap_citac | : (returned) vector with nb time frames elements recovering the cumulative integral for each time point t |
a_th | : thread index |
Definition at line 1898 of file i1TCModel.cc.
|
private |
Non-linear least square estimator.
a_nP | : number of parameters (P) |
a_nT | : number of data samples (T) |
a2p_model | : matrix containing the model functions (TxP elts) |
ap_data | : data vector (T elts) |
ap_w | : vector containing the weights (T elts) |
ap_result | : vector recovering the estimated parameters (P elts) |
This function will estimate a set of parameters (O) by minimizing the weighted residual sum of squares (WRSS) difference between the data and the model function Ô = [ X'WX ]-1 X'Wy y = data vector X = model matrix W = weights vector
Definition at line 1578 of file i1TCModel.cc.
|
virtual |
This function is used to read options from a configuration file.
Implements vDynamicModel.
Definition at line 316 of file i1TCModel.cc.
|
virtual |
This function is used to read parameters from a string.
const | string& a_optionsList : a list of parameters separated by commas |
Implements vDynamicModel.
Definition at line 430 of file i1TCModel.cc.
|
private |
Non-linear least square estimator with Ridge-Regression.
a_nP | : number of parameters (P) |
a_nT | : number of data samples (T) |
a2p_model | : matrix containing the model functions (TxP elts) |
ap_data | : data vector (T elts) |
ap_w | : vector containing the weights (T elts) |
ap_result | : vector recovering the estimated parameters (P elts) |
This function will estimate a set of parameters (O) by minimizing the weighted residual sum of squares (WRSS) difference between the data and the model function Ô = [ X'*W*X + t.Rw ]-1 [ X'*W*y ]
Definition at line 1376 of file i1TCModel.cc.
|
virtual |
Print out specific help about the implementation of the model model and its initialization.
Implements vDynamicModel.
Definition at line 201 of file i1TCModel.cc.
return integral for each time point t (WPO_S), and cumulative integral (cumWPO_S )
ap_tac | : vector with nb time frames elements containing the time activity curve from which integral will be computed |
ap_citac | : (returned) vector with nb time frames elements recovering the cumulative integral for each time point t |
Definition at line 1990 of file i1TCModel.cc.
return integral for each time point t (WPO_S), and cumulative integral (cumWPO_S )
ap_tac | : vector with nb time frames elements containing the time activity curve from which integral will be computed |
ap_citac | : (returned) vector with nb time frames elements recovering the cumulative integral for each time point t |
a_th | : thread index |
Definition at line 1920 of file i1TCModel.cc.
|
private |
Estimate the next integration value for a specific time point of a tac using WPO.
a_time | : time point for which the integral will be computed |
tac | : tac value at time t |
b_tac | : tac value at time t-1 |
bb_tac | : tac value at time t-2 |
n_tac | : tac value at time t+1 |
Definition at line 1846 of file i1TCModel.cc.
|
protected |
Vector containing voxel TACs (multithreaded)
Definition at line 287 of file i1TCModel.hh.
|
protected |
Vector containing the integral of voxel TACs (multithreaded)
Definition at line 288 of file i1TCModel.hh.
|
protected |
1D vector for NNLS estimation, containing the solution (multithreaded)
Definition at line 291 of file i1TCModel.hh.
|
protected |
1D working vector for NNLS estimation (multithreaded)
Definition at line 292 of file i1TCModel.hh.
|
protected |
Definition at line 306 of file i1TCModel.hh.
|
protected |
Definition at line 305 of file i1TCModel.hh.
|
protected |
Definition at line 304 of file i1TCModel.hh.
|
protected |
2D coefficient matrix for NNLS estimation (multithreaded)
Definition at line 290 of file i1TCModel.hh.
|
protected |
Flag indicating the method for TACs integral computation (default=true)
Definition at line 307 of file i1TCModel.hh.
|
protected |
Number of parameters in NNLS/LS estimation
Definition at line 293 of file i1TCModel.hh.
|
protected |
Flag containing the optimization method
Definition at line 285 of file i1TCModel.hh.
|
protected |
Flag indicating if ridge regression is enabled (default=false)
Definition at line 298 of file i1TCModel.hh.
|
protected |
Regularization parameter for ridge regression
Definition at line 297 of file i1TCModel.hh.
|
protected |
Flag indicating if parametric images should be written on disk (default=true)
Definition at line 284 of file i1TCModel.hh.
|
protected |
Vector containing the half frame time duration (for integral computation)
Definition at line 300 of file i1TCModel.hh.
|
protected |
Matrix for computation (th)
Definition at line 315 of file i1TCModel.hh.
|
protected |
Matrix for computation (th)
Definition at line 314 of file i1TCModel.hh.
|
protected |
Vector containing parameters lower bound
Definition at line 296 of file i1TCModel.hh.
|
protected |
Vector containing parameters upper bound
Definition at line 295 of file i1TCModel.hh.
|
protected |
Ridge means
Definition at line 319 of file i1TCModel.hh.
|
protected |
Ridge numerator for computation (th)
Definition at line 321 of file i1TCModel.hh.
|
protected |
Ridge weights
Definition at line 320 of file i1TCModel.hh.
|
protected |
Estimated parameters Matrix (th)
Definition at line 316 of file i1TCModel.hh.
|
protected |
Optional input image containing the blood volume
Definition at line 323 of file i1TCModel.hh.
|
protected |
Vector containing the weights for NNLS estimation
Definition at line 289 of file i1TCModel.hh.
|
protected |
Definition at line 303 of file i1TCModel.hh.
|
protected |
Definition at line 302 of file i1TCModel.hh.
|
protected |
Model Matrix (threaded)
Definition at line 311 of file i1TCModel.hh.
|
protected |
Matrix for computation (th)
Definition at line 312 of file i1TCModel.hh.
|
protected |
Matrix for computation (th)
Definition at line 313 of file i1TCModel.hh.
|
protected |
Data Matrix (threaded)
Definition at line 310 of file i1TCModel.hh.