69 mp_deformationRequirement = NULL;
88 if (mp_deformationRequirement)
delete[] mp_deformationRequirement;
105 switch (a_motionType)
137 Cerr(
"***** oDeformationManager::CheckParameters() -> No image dimensions provided !" << endl);
143 Cerr(
"***** oDeformationManager::CheckParameters() -> Wrong number of respiratory gates !" << endl);
149 Cerr(
"***** oDeformationManager::CheckParameters() -> Wrong verbosity level provided !" << endl);
155 Cerr(
"***** oDeformationManager::CheckParameters() -> Wrong data mode provided ! (should be =0 (list-mode) or =1 (histogram)" << endl);
179 Cerr(
"***** oDeformationManager::Initialize() -> Must call CheckParameters() before Initialize() !" << endl);
205 Cerr(
"***** oDeformationManager::Initialize() -> A problem occurred while parsing deformation options and initializing them !" << endl);
234 string deformation =
"";
235 string list_options =
"";
236 string file_options =
"";
259 if (colon!=string::npos)
264 file_options =
m_options.substr(colon+1);
269 else if (comma!=string::npos)
274 list_options =
m_options.substr(comma+1);
293 Cerr(
"***** oDeformationManager::ParseOptionsAndInitializeDeformations() -> Deformation '" << deformation <<
"' does not exist !" << endl);
305 Cerr(
"***** oDeformationManager::ParseOptionsAndInitializeDeformations() -> A problem occurred while reading and checking respiratory deformation's configuration file !" << endl);
311 Cerr(
"***** oDeformationManager::ParseOptionsAndInitializeDeformations() -> A problem occurred while parsing and reading respiratory deformation's options !" << endl);
318 Cerr(
"***** oDeformationManager::ParseOptionsAndInitializeDeformations() -> A problem occurred while checking respiratory deformation parameters !" << endl);
324 Cerr(
"***** oDeformationManager::ParseOptionsAndInitializeDeformations() -> A problem occurred while initializing respiratory deformation !" << endl);
410 if(
m_verbose >=
VERBOSE_DETAIL)
Cout(
"oDeformationManager::InitImageForDeformation()-> Apply forward image deformation of the forward image(s) for each dynamic image (is any) " << endl);
424 Cerr(
"***** oDeformationManager::InitImageForDeformation()-> An error occurred while performing image deformation during the reconstruction !" << endl);
459 Cerr(
"***** oDeformationManager::ApplyDeformationForSensitivityGeneration() -> Called while not initialized !" << endl);
479 Cout(
"oDeformationManager::ApplyDeformationForSensitivityGeneration(): ");
482 Cout(
"->BACKWARD Deformation of the sensitivity image with transformation parameter "<<idx<<
", (respiratory gate "<<rg <<
" and card gate " <<cg<<
")." <<endl);
484 Cout(
"->FORWARD Deformation of the sensitivity image with transformation parameter "<<idx<<
", (respiratory gate "<<rg <<
" and card gate " <<cg<<
")." <<endl);
489 Cerr(
"***** oDeformationManager::ApplyDeformationForSensitivityGeneration()-> An error occurred while performing deformation for respiratory motion correction for the sensitivity image generation !" << endl);
516 Cerr(
"***** oDeformationManager::PerformDeformation() -> Called while not initialized !" << endl);
548 if (time_basis_coef==0.)
continue;
554 <<
", for resp image " <<rimg
555 <<
" and card image " <<cimg<<
"." 556 <<
" Frame # " << tbf << endl);
559 Cerr(
"***** oDeformationManager::PerformDeformation()-> An error occurred while performing image deformation during the reconstruction !" << endl);
567 Cerr(
"***** oDeformationManager::PerformDeformation()-> An error occurred while performing sensitivity image deformation (histogram mode) during the reconstruction !" << endl);
599 Cerr(
"***** oDeformationManager::ApplyDeformationsToBackwardImage() -> Called while not initialized !" << endl);
621 if(
m_verbose >=
VERBOSE_DETAIL)
Cout(
"oDeformationManager::ApplyDeformationsToBackwardImage-> Transformation parameter #" << idx<<
"." <<endl);
625 Cerr(
"***** oDeformationManager::ApplyDeformationsToBackwardImage()-> An error occurred while performing final backward image deformation !" << endl);
633 Cerr(
"***** oDeformationManager::ApplyDeformationsToBackwardImage()-> An error occurred while performing final backward image deformation of the sensitivity image !" << endl);
666 Cerr(
"***** oDeformationManager::TestDeformationOnImage()-> An error occurred while testing deformation !" << endl);
684 bool oDeformationManager::AllThreadsRequireDeformation()
687 if (!mp_deformationRequirement[th])
701 void oDeformationManager::UnsetDeformationRequirements()
704 mp_deformationRequirement[th] =
false;
FLTNB **** m4p_forwardImage
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
FLTNB **** m4p_refDynForwardImage
int GetNbCardBasisFunctions()
Get the number of cardiac basis functions.
int GetCurrentPMotionIndex(int a_th)
call the eponym function from the oDynamicDataManager object
void ShowHelpDeformation()
Show help about all implemented deformations.
int GetPMotionFirstIndexForFrame(int a_fr)
call the eponym function from the oDynamicDataManager object
int GetNbTimeBasisFunctions()
Get the number of time basis functions.
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.
FLTNB GetTimeBasisCoefficient(int a_timeBasisFunction, int a_timeFrame)
Get the time basis coefficients for the provided frame and basis function.
int GetPMotionLastIndexForFrame(int a_fr)
call the eponym function from the oDynamicDataManager object
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 GetNbThreadsForProjection()
Get the number of threads used for projections.
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
int GetNbRespBasisFunctions()
Get the number of respiratory basis functions.
Declaration of class sAddonManager.
int GetCurrentTimeFrame(int a_th)
call the eponym function from the oDynamicDataManager object
#define VERBOSE_DEBUG_NORMAL