![]() |
CASToR
3.2
Tomographic Reconstruction (PET/SPECT/CT)
|
This is the mother class of dynamic model classes. More...
#include <vDynamicModel.hh>
Public Member Functions | |
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... | |
virtual int | CheckSpecificParameters ()=0 |
This function is used to check the parameters of the child functions before initialization if required. More... | |
int | ReadAndCheckConfigurationFile (string a_fileOptions) |
virtual int | ReadAndCheckConfigurationFileSpecific ()=0 |
This function is used to read options from a configuration file. It is pure virtual so must be implemented by children. More... | |
virtual int | ReadAndCheckOptionsList (string a_listOptions)=0 |
int | Initialize () |
A public function used to initialize the dynamic model. More... | |
virtual int | InitializeSpecific ()=0 |
A private function used to initialize everything specific to the child model. More... | |
virtual void | ShowHelpModelSpecific ()=0 |
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... | |
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 | EstimateModelParameters (oImageSpace *ap_Image, int a_ite, int a_sset)=0 |
virtual int | EstimateImage (oImageSpace *ap_Image, int a_ite, int a_sset) |
virtual int | EstimateImageWithModel (oImageSpace *ap_Image, int a_ite, int a_sset)=0 |
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 () |
virtual int | CheckSpecificParameters ()=0 |
int | ReadAndCheckConfigurationFile (string a_fileOptions) |
virtual int | ReadAndCheckConfigurationFileSpecific ()=0 |
virtual int | ReadAndCheckOptionsList (string a_listOptions)=0 |
int | Initialize () |
virtual int | InitializeSpecific ()=0 |
virtual void | ShowHelpModelSpecific ()=0 |
void | ShowHelp () |
virtual int | EstimateModel (oImageSpace *ap_Image, int a_ite, int a_sset) |
virtual int | EstimateModelParameters (oImageSpace *ap_Image, int a_ite, int a_sset)=0 |
virtual int | EstimateImage (oImageSpace *ap_Image, int a_ite, int a_sset) |
virtual int | EstimateImageWithModel (oImageSpace *ap_Image, int a_ite, int a_sset)=0 |
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 | |
oImageDimensionsAndQuantification * | mp_ID |
int | m_verbose |
int | m_nbTimeBF |
int | m_nbWeightFactors |
int | m_nbModelParam |
int | m_nbRGModelParam |
int | m_nbCGModelParam |
string | m_AICfile |
oArterialInputCurve * | mp_ArterialInputCurve |
FLTNB ** | m2p_parametricImages |
FLTNB * | mp_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 |
FLTNB * | mp_maskModel |
INTNB | m_nbVoxelsMask |
FLTNB * | mp_w |
FLTNB *** | m3p_nnlsA |
FLTNB ** | m2p_nnlsB |
FLTNB ** | m2p_nnlsMat |
FLTNB ** | m2p_nnlsX |
FLTNB ** | m2p_nnlsWp |
int ** | m2p_nnlsIdx |
uint16_t | m_nnlsN =0 |
Private Member Functions | |
int | NNLS_LSS_H12 (int mode, int lpivot, int l1, int m, FLTNB *u, int u_dim1, FLTNB *up, FLTNB *cm, int ice, int icv, int ncv) |
void | NNLS_LSS_G1 (FLTNB a, FLTNB b, FLTNB *cterm, FLTNB *sterm, FLTNB *sig) |
int | NNLS_LSS_H12 (int mode, int lpivot, int l1, int m, FLTNB *u, int u_dim1, FLTNB *up, FLTNB *cm, int ice, int icv, int ncv) |
void | NNLS_LSS_G1 (FLTNB a, FLTNB b, FLTNB *cterm, FLTNB *sterm, FLTNB *sig) |
This is the mother class of dynamic model classes.
This class is a virtual one, in the sense that it cannot be used on its own
because several pure virtual functions belong to it. Its children are implementations of actual dynamic models.
Everywhere in the code, this parent class should be used instead of any of its children.
It can be used during the reconstruction process by the oDynamicModelManager through the use of the EstimateModelParameters() and EstimateImageWithModel() functions
All children must implement the following pure virtual functions:
Definition at line 40 of file code/include/dynamic/vDynamicModel.hh.
vDynamicModel::vDynamicModel | ( | ) |
Constructor of vDynamicModel. Simply set all data members to default values.
Definition at line 18 of file code/src/dynamic/vDynamicModel.cc.
|
virtual |
Destructor of vDynamicModel.
Definition at line 67 of file code/src/dynamic/vDynamicModel.cc.
vDynamicModel::vDynamicModel | ( | ) |
|
virtual |
|
virtual |
Mask the outside of the transaxial FOV based on the m_fovOutPercent.
Similar to the eponym function in ImageSpace, but on parametric images
Definition at line 306 of file code/src/dynamic/vDynamicModel.cc.
|
virtual |
|
virtual |
This function is used to check parameters after the latter have been all set using Set functions.
Definition at line 126 of file code/src/dynamic/vDynamicModel.cc.
|
virtual |
|
pure 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.
Implemented in i1TCModel, i1TCModel, iLinearModel, iLinearModel, iLinearModelTemplate, iLinearModelTemplate, iLinearPatlakModel, iLinearPatlakModel, iLinearSpectralModel, iLinearSpectralModel, iDynamicModelTemplate, and iDynamicModelTemplate.
|
pure virtual |
|
virtual |
Compute output image using the m2p_parametricImages matrix Store the result in the m2p_outputParImages matrix.
Definition at line 271 of file code/src/dynamic/vDynamicModel.cc.
|
virtual |
|
virtual |
|
virtual |
Definition at line 458 of file code/src/dynamic/vDynamicModel.cc.
|
pure virtual |
Implemented in iLinearModel, iLinearModel, i1TCModel, i1TCModel, iDynamicModelTemplate, and iDynamicModelTemplate.
|
pure virtual |
Implemented in iLinearModel, iLinearModel, i1TCModel, i1TCModel, iDynamicModelTemplate, and iDynamicModelTemplate.
|
virtual |
|
virtual |
Definition at line 420 of file code/src/dynamic/vDynamicModel.cc.
|
pure virtual |
Implemented in iLinearModel, iLinearModel, i1TCModel, i1TCModel, iDynamicModelTemplate, and iDynamicModelTemplate.
|
pure virtual |
Implemented in iLinearModel, iLinearModel, i1TCModel, i1TCModel, iDynamicModelTemplate, and iDynamicModelTemplate.
|
inline |
Definition at line 208 of file code/include/dynamic/vDynamicModel.hh.
|
inline |
Definition at line 208 of file include/dynamic/vDynamicModel.hh.
|
inline |
Definition at line 213 of file code/include/dynamic/vDynamicModel.hh.
|
inline |
Definition at line 213 of file include/dynamic/vDynamicModel.hh.
|
inline |
Definition at line 218 of file code/include/dynamic/vDynamicModel.hh.
|
inline |
Definition at line 218 of file include/dynamic/vDynamicModel.hh.
|
inline |
Definition at line 223 of file include/dynamic/vDynamicModel.hh.
|
inline |
Definition at line 223 of file code/include/dynamic/vDynamicModel.hh.
int vDynamicModel::Initialize | ( | ) |
A public function used to initialize the dynamic model.
This function does not take any parameter and is used to initialize everything that is generic and required for all models. At the end, it calls the pure virtual InitializeSpecific() function implemented by children models.
Definition at line 193 of file code/src/dynamic/vDynamicModel.cc.
int vDynamicModel::Initialize | ( | ) |
|
pure virtual |
|
pure 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.
Implemented in iLinearModel, iLinearModel, i1TCModel, i1TCModel, iLinearModelTemplate, iLinearModelTemplate, iLinearPatlakModel, iLinearPatlakModel, iLinearSpectralModel, iLinearSpectralModel, iDynamicModelTemplate, and iDynamicModelTemplate.
int vDynamicModel::NNLS | ( | FLTNB ** | A, |
int | m, | ||
int | n, | ||
FLTNB * | B, | ||
FLTNB * | X, | ||
FLTNB * | rnorm, | ||
FLTNB * | wp, | ||
FLTNB * | zzp, | ||
int * | indexp | ||
) |
Definition at line 842 of file code/src/dynamic/vDynamicModel.cc.
int vDynamicModel::NNLS | ( | FLTNB ** | A, |
int | m, | ||
int | n, | ||
FLTNB * | B, | ||
FLTNB * | X, | ||
FLTNB * | rnorm, | ||
FLTNB * | wp, | ||
FLTNB * | zzp, | ||
int * | indexp | ||
) |
|
private |
|
private |
Definition at line 1257 of file code/src/dynamic/vDynamicModel.cc.
|
private |
|
private |
Definition at line 1158 of file code/src/dynamic/vDynamicModel.cc.
int vDynamicModel::ReadAndCheckConfigurationFile | ( | string | a_fileOptions | ) |
Definition at line 496 of file code/src/dynamic/vDynamicModel.cc.
int vDynamicModel::ReadAndCheckConfigurationFile | ( | string | a_fileOptions | ) |
|
pure virtual |
|
pure virtual |
This function is used to read options from a configuration file.
It is pure virtual so must be implemented by children.
Implemented in i1TCModel, i1TCModel, iLinearModel, iLinearModel, iLinearModelTemplate, iLinearModelTemplate, iLinearPatlakModel, iLinearPatlakModel, iLinearSpectralModel, iLinearSpectralModel, iDynamicModelTemplate, and iDynamicModelTemplate.
|
pure virtual |
|
pure virtual |
Implemented in i1TCModel, i1TCModel, iLinearModel, iLinearModel, iLinearModelTemplate, iLinearModelTemplate, iLinearPatlakModel, iLinearPatlakModel, iLinearSpectralModel, iLinearSpectralModel, iDynamicModelTemplate, and iDynamicModelTemplate.
int vDynamicModel::SaveParametricImages | ( | int | a_iteration, |
int | a_subset = -1 |
||
) |
int vDynamicModel::SaveParametricImages | ( | int | a_iteration, |
int | a_subset = -1 |
||
) |
Definition at line 660 of file code/src/dynamic/vDynamicModel.cc.
|
inline |
Definition at line 65 of file include/dynamic/vDynamicModel.hh.
|
inline |
Definition at line 65 of file code/include/dynamic/vDynamicModel.hh.
|
inline |
Definition at line 236 of file code/include/dynamic/vDynamicModel.hh.
|
inline |
Definition at line 236 of file include/dynamic/vDynamicModel.hh.
|
inline |
Definition at line 72 of file code/include/dynamic/vDynamicModel.hh.
|
inline |
Definition at line 72 of file include/dynamic/vDynamicModel.hh.
void vDynamicModel::ShowHelp | ( | ) |
This function is used to print out general help about dynamic models.
Definition at line 95 of file code/src/dynamic/vDynamicModel.cc.
void vDynamicModel::ShowHelp | ( | ) |
|
pure 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.
Implemented in iLinearModel, iLinearModel, i1TCModel, i1TCModel, iLinearModelTemplate, iLinearModelTemplate, iLinearPatlakModel, iLinearPatlakModel, iLinearSpectralModel, iLinearSpectralModel, iDynamicModelTemplate, and iDynamicModelTemplate.
|
pure virtual |
|
protected |
Image matrix containing the parametric images of the cardiac gating model
2 pointers:
1: Parametric image related to the cardiac gating model basis functions.
2: 3D voxels
Definition at line 392 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
Vector containing the Model temporal basis functions
2 pointers:
1: index of the temporal function
2: coefficient of the functions for each time points of a dynamic acquisition
Definition at line 374 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
1D vector for NNLS estimation, containing the solution (multithreaded), dims must be [nb_th][nb_samples]
Definition at line 421 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
Working space array for NNLS estimation (multithreaded) dims must be [nb_th][m_nnlsN]
Definition at line 425 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
1D working vector for NNLS estimation (multithreaded) dims must be [nb_th][ (m_nnlsN+2)*nb_samples ]
Definition at line 422 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
Working space array for NNLS estimation (multithreaded) dims must be [nb_th][m_nnlsN]
Definition at line 424 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
1D solution vector for NNLS estimation (multithreaded) dims must be [nb_th][m_nnlsN]
Definition at line 423 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
Image matrix to gather the parametric image before writing on disk
By default it will point directly to the parametric m2p_parametricImages.
They are allocated if post-processing are enabled before writing the image (i.e FOV masking)
2 pointers:
1: Parametric image related to the dynamic model basis functions.
2: 3D voxels
Definition at line 380 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
Image matrix containing the parametric images
2 pointers:
1: Parametric image related to the dynamic model basis functions.
2: 3D voxels
Definition at line 365 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
Image matrix containing the parametric images of the respiratory gating model
2 pointers:
1: Parametric image related to the respiratory gating model basis functions.
2: 3D voxels
Definition at line 387 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
2D coefficient matrix for NNLS estimation (multithreaded), dims must be [nb_th][m_nnlsN][nb_samples]
Definition at line 420 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
The file containing the data of the sampled Arterial Input Curve
Definition at line 361 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
Flag indicating that an AIC file has been provided instead of Time Basis Functions
Definition at line 405 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
Boolean indicating whether the parameters were checked or not
Definition at line 400 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
Path to a configuration file
Definition at line 397 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
Boolean indicating whether the manager was initialized or not
Definition at line 401 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
String containing a list of options
Definition at line 398 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
Flag indicating if model specific Time Basis Functions are required
Definition at line 406 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
Number of cardiac model parameters
Definition at line 359 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
Number of dynamic model parameters
Definition at line 357 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
Number of respiratory model parameters
Definition at line 358 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
Number of time basis functions in the model
Definition at line 355 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
Number of voxels in mask
Definition at line 416 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
Number of weight factors for WLS optimisation
Definition at line 356 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
Number of parameters in NNLS estimation
Definition at line 427 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
If true, the reconstructed images are not estimated from the parametric images, the EstimateImageWithModel() functions is not called so the class only estimate parametric images from each current estimation of the images (default=false)
Definition at line 408 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
If true, the parameters are not estimated from the serie of dynamic images, the EstimateModelParameters() functions is not called (default=false)
Definition at line 412 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
Flag indicating if the blacklisted voxels mask image should be written on disk
Definition at line 404 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
Flag indicating if parametric images should be written on disk (default=true)
Definition at line 403 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
Number of iterations after which the reconstructed images are estimated from the parametric images. (default or negative value =0)
Definition at line 414 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
Flag indicating if the model is used with castor-recon or with imageDynamicTools
Definition at line 402 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
The verbose level
Definition at line 354 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
oArterialInputCurve object related to processing of Arterial Input Curves
Definition at line 362 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
Image matrix containing the voxels which the model cannot fit
1 pointer:
1: 3D voxels
Definition at line 370 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
Pointer to the oImageDimensionsAndQuantification object in use
Definition at line 353 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
Input image containing a mask defining in which voxels the model must be applied (1) or not (0). Default: all voxels to 1
Definition at line 415 of file code/include/dynamic/vDynamicModel.hh.
|
protected |
Vector containing the weights for NNLS estimation
Definition at line 419 of file code/include/dynamic/vDynamicModel.hh.