101 switch (a_motionType)
129 if (
m_verbose>=4)
Cout(
"oDeformationManager::CheckParameters() -> Check parameters before initialization"<< endl);
133 Cerr(
"***** oDeformationManager::CheckParameters() -> No image dimensions provided !" << endl);
139 Cerr(
"***** oDeformationManager::CheckParameters() -> Wrong number of respiratory gates !" << endl);
145 Cerr(
"***** oDeformationManager::CheckParameters() -> Wrong verbosity level provided !" << endl);
151 Cerr(
"***** oDeformationManager::CheckParameters() -> Wrong data mode provided ! (should be =0 (list-mode) or =1 (histogram)" << endl);
175 Cerr(
"***** oDeformationManager::Initialize() -> Must call CheckParameters() before Initialize() !" << endl);
194 if (
m_verbose>=1)
Cout(
"oDeformationManager::Initialize() -> Initialize deformations" << endl);
199 Cerr(
"***** oDeformationManager::Initialize() -> A problem occured while parsing deformation options and initializing them !" << endl);
226 if (
m_verbose>=2)
Cout(
"oDeformationManager::ParseOptionsAndInitializeDeformations ..."<< endl);
228 string deformation =
"";
229 string list_options =
"";
230 string file_options =
"";
253 if (colon!=string::npos)
258 file_options =
m_options.substr(colon+1);
263 else if (comma!=string::npos)
268 list_options =
m_options.substr(comma+1);
287 Cerr(
"***** oDeformationManager::ParseOptionsAndInitializeDeformations() -> Deformation '" << deformation <<
"' does not exist !" << endl);
299 Cerr(
"***** oDeformationManager::ParseOptionsAndInitializeDeformations() -> A problem occured while reading and checking respiratory deformation's configuration file !" << endl);
305 Cerr(
"***** oDeformationManager::ParseOptionsAndInitializeDeformations() -> A problem occured while parsing and reading respiratory deformation's options !" << endl);
312 Cerr(
"***** oDeformationManager::ParseOptionsAndInitializeDeformations() -> A problem occured while checking respiratory deformation parameters !" << endl);
318 Cerr(
"***** oDeformationManager::ParseOptionsAndInitializeDeformations() -> A problem occured while initializing respiratory deformation !" << endl);
346 if(
m_verbose>=2)
Cout(
"oDeformationManager::InstantiateImageForDeformation() -> Instantiate buffer images"<< endl);
369 if(
m_verbose>=2)
Cout(
"oDeformationManager::DeallocateImageForDeformation() -> Deallocate buffer images"<< endl);
396 if(
m_verbose>=2)
Cout(
"oDeformationManager::InitImageForDeformation() -> Initialize buffer images"<< endl);
429 Cerr(
"***** oDeformationManager::ApplyDeformationForSensitivityGeneration() -> Called while not initialized !" << endl);
451 Cout(
"oDeformationManager::ApplyDeformationForSensitivityGeneration(): " << endl);
454 Cout(
"->BACKWARD Deformation for respiratory motion, for resp gate "<<rg <<
" and card gate " <<cg<<
" and patient motion subset " <<idx<<
"." <<endl);
456 Cout(
"->FORWARD Deformation for respiratory motion, for resp gate "<<rg <<
" and card gate " <<cg<<
" and patient motion subset " <<idx<<
"." <<endl);
461 Cerr(
"***** oDeformationManager::ApplyDeformationForSensitivityGeneration()-> An error occured while performing deformation for respiratory motion correction for the sensitivity image generation !" << endl);
488 Cerr(
"***** oDeformationManager::PerformDeformation() -> Called while not initialized !" << endl);
515 if(
m_verbose >=3)
Cout(
"oDeformationManager::PerformDeformation-> Gate/motion subset # " << idx
516 <<
", for resp image " <<rimg
517 <<
" and card image " <<cimg<<
"."
518 <<
" Frame # " << fr << endl);
521 Cerr(
"***** oDeformationManager::PerformDeformation()-> An error occured while performing image deformation during the reconstruction !" << endl);
529 Cerr(
"***** oDeformationManager::PerformDeformation()-> An error occured while performing sensitivity image deformation (histogram mode) during the reconstruction !" << endl);
545 Cerr(
"***** oDeformationManager::PerformDeformation()-> An error occured while performing image deformation during the reconstruction !" << endl);
588 Cerr(
"***** oDeformationManager::ApplyDeformationsToBackwardImage() -> Called while not initialized !" << endl);
612 if(
m_verbose >=3)
Cout(
"oDeformationManager::ApplyDeformationsToBackwardImage-> Deformation for gate #" << idx<<
"." <<endl);
616 Cerr(
"***** oDeformationManager::ApplyDeformationsToBackwardImage()-> An error occured while performing final backward image deformation !" << endl);
624 Cerr(
"***** oDeformationManager::ApplyDeformationsToBackwardImage()-> An error occured while performing final backward image deformation of the sensitivity image !" << endl);
660 if (
m_verbose>=2)
Cout(
"oDeformationManager::TestDeformationOnImage ..."<< endl);
664 Cerr(
"***** oDeformationManager::TestDeformationOnImage()-> An error occured while testing deformation !" << endl);
int GetCurrentCardImage(int a_th)
call the eponym function from the oDynamicDataManager object
int GetCurrentCardGate(int a_th)
call the eponym function from the oDynamicDataManager object
int GetCurrentPMotionIndex(int a_th)
call the eponym function from the oDynamicDataManager object
void ShowHelpDeformation()
Show help about all implemented deformations.
int GetCurrentRespGate(int a_th)
call the eponym function from the oDynamicDataManager object
static sAddonManager * GetInstance()
void InitRefImagesForDeformation()
void DeallocateRefImagesForDeformation()
Free memory for the buffer sensitivity image required for image-based deformation. This function is called from the Deformation Manager.
std::map< string, maker_deformation > mp_listOfDeformations
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.
void InstantiateRefImagesForDeformation()
Allocate memory for the buffer sensitivity image required for image-based deformation. This function is called from the Deformation Manager.
int GetCurrentRespImage(int a_th)
call the eponym function from the oDynamicDataManager object
Declaration of class sAddonManager.
int GetCurrentTimeFrame(int a_th)
call the eponym function from the oDynamicDataManager object