CASToR  3.0
Tomographic Reconstruction (PET/SPECT/CT)
iLinearModel.hh
Go to the documentation of this file.
1 /*
2 This file is part of CASToR.
3 
4  CASToR is free software: you can redistribute it and/or modify it under the
5  terms of the GNU General Public License as published by the Free Software
6  Foundation, either version 3 of the License, or (at your option) any later
7  version.
8 
9  CASToR is distributed in the hope that it will be useful, but WITHOUT ANY
10  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12  details.
13 
14  You should have received a copy of the GNU General Public License along with
15  CASToR (in file GNU_GPL.TXT). If not, see <http://www.gnu.org/licenses/>.
16 
17 Copyright 2017-2019 all CASToR contributors listed below:
18 
19  --> Didier BENOIT, Claude COMTAT, Marina FILIPOVIC, Thibaut MERLIN, Mael MILLARDET, Simon STUTE, Valentin VIELZEUF
20 
21 This is CASToR version 3.0.
22 */
23 
30 #ifndef ILINEARMODEL_HH
31 #define ILINEARMODEL_HH 1
32 
42 #define OPTIMISATION_METHOD_DR 0
43 
44 #define OPTIMISATION_METHOD_NESTEM 1
45 
46 #define OPTIMISATION_METHOD_NNLS 2
47 
48 #define OPTIMISATION_METHOD_LS 3
49 
54 #include "vDynamicModel.hh"
55 #include "sAddonManager.hh"
56 
63 {
64  // -----------------------------------------------------------------------------------------
65  // Constructor & Destructor
66  public:
71  iLinearModel();
76  ~iLinearModel();
77 
78 
79  // -----------------------------------------------------------------------------------------
80  // Public member functions related to the initialization of the model
81  public:
82  // Function for automatic insertion (put the class name as the parameters and do not add semi-colon at the end of the line)
109  int ReadAndCheckOptionsList(string a_listOptions);
122  int InitializeSpecific();
123 
135  void ShowBasisFunctions();
136 
142  void ShowHelp();
143 
144 
145  // -----------------------------------------------------------------------------------------
146  // Public member functions called by the main iterative algorithm class
155  int EstimateModelParameters(oImageSpace* ap_Image, int a_ite, int a_sset);
164  int EstimateImageWithModel(oImageSpace* ap_Image, int a_ite, int a_sset);
172  int NestedEM(oImageSpace* ap_ImageS, int a_ite);
180  int EstimateParametersWithNNLS(oImageSpace* ap_ImageS, int a_ite);
188  int Patlak_LS(oImageSpace* ap_ImageS, int a_ite) ;
189 
190 
191  // -----------------------------------------------------------------------------------------
192  // Data members
193  protected:
194 
198  //int m_nbRGModelParam; /*!< Number of model parameters applied to respiratory gates */
199  //int m_nbCGModelParam; /*!< Number of model parameters applied to cardiac gates */
200 
219 };
220 
221 // 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)
222 CLASS_DYNAMICMODEL(LinearModel,iLinearModel)
223 
224 #endif
int m_OptimisationMethod
#define FLTNB
Definition: gVariables.hh:81
int EstimateImageWithModel(oImageSpace *ap_Image, int a_ite, int a_sset)
Re-estimate image using the linear parametric images and basis functions.
This is the mother class of dynamic model classes.
FLTNB * mp_corrBasisCoeffs
int InitializeSpecificToAllLinearModels()
This function is used to initialize the parametric images and basis functions for all Linear Models...
This class implements a general linear dynamic model applied between the images of a dynamic acquisit...
Definition: iLinearModel.hh:62
#define FUNCTION_DYNAMICMODEL(CLASS)
int ReadAndCheckOptionsList(string a_listOptions)
This function is used to read parameters from a string.
iLinearModel()
Constructor of iLinearModel. Simply set all data members to default values.
Definition: iLinearModel.cc:41
void ShowBasisFunctions()
This function is used to print the basis functions.
FLTNB * mp_corrBasisFunctions
int CheckSpecificParametersForAllLinearModels()
This function is used to check parameters for all Linear Models. .
virtual int ReadAndCheckConfigurationFileSpecific()
This function is used to read options from a configuration file.
int EstimateParametersWithNNLS(oImageSpace *ap_ImageS, int a_ite)
Estimate parametric images using the NNLS method.
uint32_t m_nbLinearModelCycles
int InitializeSpecific()
This function is used to initialize the parametric images and basis functions for all Linear Models...
FLTNB ** m2p_cardBasisFunctions
int m_basisFunctionsUpdIdx
#define CLASS_DYNAMICMODEL(NAME, CLASS)
This class holds all the matrices in the image domain that can be used in the algorithm: image...
Definition: oImageSpace.hh:60
int CheckSpecificParameters()
This function is used to check whether all member variables have been correctly initialized or not...
~iLinearModel()
Destructor of iLinearModel.
Definition: iLinearModel.cc:76
int Patlak_LS(oImageSpace *ap_ImageS, int a_ite)
Estimate parametric images using linear regression.
int m_basisFunctionsUpdRatio
Declaration of class vDynamicModel.
FLTNB ** m2p_respBasisFunctions
int NestedEM(oImageSpace *ap_ImageS, int a_ite)
Estimate parametric images and basis functions (if enabled) using the nested EM method.
int m_basisFunctionsUpdStartIte
int ReadAndCheckConfigurationFileSpecificToAllLinearModels()
This function is used to read parameters that are generic for all Linear Models. ...
int EstimateModelParameters(oImageSpace *ap_Image, int a_ite, int a_sset)
Estimate model parameters (parametric images and basis functions)
void ShowHelp()
Print out specific help about the implementation of this model and its initialization.
Declaration of class sAddonManager.