86 if (
m_verbose>=2)
Cout(
"oDynamicModelManager::CheckParameters() ..."<< endl);
92 Cerr(
"***** oDynamicModelManager::CheckParameters() -> No image dimensions provided !" << endl);
98 Cerr(
"***** oDynamicModelManager::CheckParameters() -> Wrong verbosity level provided !" << endl);
122 Cerr(
"***** oDynamicModelManager::Initialize() -> Must call CheckParameters() before Initialize() !" << endl);
138 if (
m_verbose>=1)
Cout(
"oDynamicModelManager::Initialize() -> Initialize models" << endl);
143 Cerr(
"***** oDynamicModelManager::Initialize() -> A problem occured while parsing model options and initializing them !" << endl);
169 #ifdef CASTOR_VERBOSE
170 if (
m_verbose>=3)
Cout(
"oDynamicModelManager::ParseOptionsAndInitializeModel ..."<< endl);
173 string dynamic_model =
"";
174 string list_options =
"";
175 string file_options =
"";
194 Cerr(
"***** oDynamicModelManager::CheckParameters() -> Dynamic model should be used with more than one time frame/dynamic gate !" << endl);
206 if (colon!=string::npos)
209 dynamic_model =
m_options.substr(0,colon);
211 file_options =
m_options.substr(colon+1);
216 else if (comma!=string::npos)
219 dynamic_model =
m_options.substr(0,comma);
221 list_options =
m_options.substr(comma+1);
240 Cerr(
"***** oDynamicModelManager::ParseOptionsAndInitializeModel() -> Model '" << dynamic_model <<
"' does not exist !" << endl);
249 Cerr(
"***** oDynamicModelManager::ParseOptionsAndInitializeModel() -> A problem occured while reading and checking frame dynamic model's configuration file !" << endl);
255 Cerr(
"***** oDynamicModelManager::ParseOptionsAndInitializeModel() -> A problem occured while parsing and reading frame dynamic model's options !" << endl);
261 Cerr(
"***** oDynamicModelManager::ParseOptionsAndInitializeModel() -> A problem occured while checking frame dynamic model parameters !" << endl);
267 Cerr(
"***** oDynamicModelManager::ParseOptionsAndInitializeModel() -> A problem occured while initializing frame dynamic model !" << endl);
293 Cerr(
"***** oDynamicModelManager::ApplyDynamicModel() -> Called while not initialized !" << endl);
301 if(
m_verbose>=2)
Cout(
"oDynamicModelManager::ApplyDynamicModel ..."<< endl);
306 Cerr(
"***** oDynamicModelManager::StepPostProcessInsideSubsetLoop() -> A problem occured while applying dynamic model to current estimate images !" << endl);
313 Cerr(
"***** oDynamicModelManager::StepPostProcessInsideSubsetLoop() -> A problem occured while applying dynamic model to current estimate images !" << endl);
338 if(
m_verbose>=2)
Cout(
"oDynamicModelManager::SaveParametricImages ..."<< endl);
346 Cerr(
"***** oDynamicModelManager::SaveParametricImages() -> A problem occured while trying to apply FOV masking on parametric images !" << endl);
353 Cerr(
"***** oDynamicModelManager::SaveParametricImages() -> A problem occured while trying to save image coefficients !" << endl);
Declaration of class oDynamicModelManager.
virtual int CheckParameters()
This function is used to check parameters after the latter have been all set using Set functions...
void ShowHelpDynamicModel()
Show help about all implemented dynamic models.
void SetImageDimensionsAndQuantification(oImageDimensionsAndQuantification *ap_ImageDimensionsAndQuantification)
Set the image dimensions in use.
This is the mother class of dynamic model classes.
virtual int ApplyOutputFOVMaskingOnParametricImages()
Mask the outside of the transaxial FOV based on the m_fovOutPercent.
virtual int ReadAndCheckOptionsList(string a_listOptions)=0
This function is used to read parameters from a string. It is pure virtual so must be implemented b...
oDynamicModelManager()
Constructor of oDynamicModelManager. Simply set all data members to default values.
int Initialize()
Set the dynamic model flag and instanciate/initialize model objects through the ParseOptionsAndInitia...
virtual int Initialize()=0
This function is used to initialize specific data related to the child deformation model...
static sAddonManager * GetInstance()
int ParseOptionsAndInitializeModel()
Parse dynamic model options contained in the previously provided strings. This function is called ins...
virtual int ReadAndCheckConfigurationFile(string a_fileOptions)=0
This function is used to read options from a configuration file. It is pure virtual so must be impl...
int SaveParametricImages(int a_iteration, int a_subset=-1)
Call SaveParametricImages() function of the dynamic model object is 'm_UseModel' is on...
oImageDimensionsAndQuantification * mp_ID
void SetVerbose(int a_verbose)
Set the verbose level.
vDynamicModel * mp_DynamicModel
int CheckParameters()
This function is used to check parameters after the latter have been all set using Set functions...
int GetNbCardGates()
Get the number of cardiac gates.
std::map< string, maker_dynamic_model > mp_listOfDynamicModels
This class holds all the matrices in the image domain that can be used in the algorithm: image...
int GetNbTimeFrames()
Get the number of time frames.
virtual int EstimateImageWithModel(oImageSpace *ap_Image, int a_ite, int a_sset)=0
This function is pure virtual so must be implemented by children. It is used to fit the dynamic mod...
int GetNbRespGates()
Get the number of respiratory gates.
virtual void ComputeOutputParImage()
Compute output image using the m2p_parametricImages matrix Store the result in the m2p_outputParImage...
~oDynamicModelManager()
Destructor of oDynamicModelManager. Free memory from all allocated tabs.
virtual int EstimateModelParameters(oImageSpace *ap_Image, int a_ite, int a_sset)=0
This function is pure virtual so must be implemented by children. It can be used to estimate any te...
virtual int SaveParametricImages(int a_iteration, int a_subset=-1)
This function is pure virtual so must be implemented by children Call SaveParametricImages() functi...
int ApplyDynamicModel(oImageSpace *ap_ImageS, int a_iteration, int a_subset)
Declaration of class sAddonManager.