80 if(
m_verbose>=2)
Cout(
"vDeformation::CheckParameters ..."<< endl);
85 Cerr(
"***** vDeformation::CheckParameters() -> No image dimensions provided !" << endl);
92 Cerr(
"***** vDeformation::CheckParameters() -> Wrong verbosity level provided !" << endl);
99 Cerr(
"***** vDeformation::CheckParameters() -> Number of transformations in the deformation has not been initialized !" << endl);
106 Cerr(
"***** vDeformation::CheckParameters() -> An error occurred while checking parameters of the child dynamic class !" << endl);
137 if(
m_verbose >= 2)
Cout(
"vDeformation::ApplyDeformationsToBackwardImage ... " <<endl);
142 Cerr(
"***** vDeformation::ApplyDeformationsToBackwardImage() -> Called while not initialized !" << endl);
166 Cerr(
"***** vDeformation::ApplyDeformationsToBackwardImage()-> An error occured while performing backward deformation of the backward image !" << endl);
167 Cerr(
"***** frame index " << a_fr <<
" respiratory image index " << rimg<<
" cardiac image index " << cimg<<
" !" << endl);
205 if(
m_verbose >= 2)
Cout(
"vDeformation::ApplyDeformationsToHistoSensitivityImage ... " <<endl);
210 Cerr(
"***** vDeformation::ApplyDeformationsToHistoSensitivityImage() -> Called while not initialized !" << endl);
223 Cerr(
"***** vDeformation::ApplyDeformationsToHistoSensitivityImage()-> An error occured while performing backward deformation of the backward image !" << endl);
224 Cerr(
"***** frame index " << a_fr <<
" respiratory image index " << rimg<<
" cardiac image index " << cimg<<
" !" << endl);
259 if(
m_verbose >= 3)
Cout(
"vDeformation::PerformDeformation, deformation #" << a_defIdx+1 << endl);
264 Cerr(
"***** vDeformation::PerformDeformation() -> Called while not initialized !" << endl);
283 Cerr(
"***** vDeformation::ApplyDeformations()-> An error occured while performing backward deformation of the backward image !" << endl);
284 Cerr(
"***** frame index " << a_fr <<
" respiratory image index " << a_rimg<<
" cardiac image index " << a_cimg<<
" !" << endl);
324 Cerr(
"***** vDeformation::ApplyDeformations()-> An error occured while performing forward deformation of the forward image !" << endl);
325 Cerr(
"***** frame index " << a_fr <<
" respiratory image index " << a_rimg<<
" cardiac image index " << a_cimg<<
" !" << endl);
348 if(
m_verbose >= 3)
Cout(
"vDeformation::PerformDeformationBis, deformation #" << a_defIdx+1 << endl);
353 Cerr(
"***** vDeformation::PerformDeformation() -> Called while not initialized !" << endl);
362 Cerr(
"***** vDeformation::ApplyDeformationsBis()-> An error occured while performing forward deformation of the forward image !" << endl);
363 Cerr(
"***** frame index " << a_fr <<
" respiratory image index " << a_rimg<<
" cardiac image index " << a_cimg<<
" !" << endl);
399 if(
m_verbose >= 2)
Cout(
"vDeformation::PerformHistoSensitivityDeformation ... " <<endl);
404 Cerr(
"***** vDeformation::PerformHistoSensitivityDeformation() -> Called while not initialized !" << endl);
421 Cerr(
"***** vDeformation::PerformHistoSensitivityDeformation()-> An error occured while performing backward deformation of the sensitivity image !" << endl);
422 Cerr(
"***** frame index " << fr <<
" respiratory image index " << rimg<<
" cardiac image index " << cimg<<
" !" << endl);
463 if(
m_verbose >= 2)
Cout(
"vDeformation::PerformSensitivityDeformation ... " << a_defDirection <<
";" << a_defIdx << endl);
468 Cerr(
"***** vDeformation::PerformSensitivityDeformation() -> Called while not initialized !" << endl);
485 Cerr(
"***** vDeformation::PerformSensitivityDeformation -> An error occured while performing forward deformation !" << endl);
486 Cerr(
"***** frame index " << fr <<
" respiratory gate index " << rg<<
" cardiac gate index " << cg<<
" !" << endl);
495 Cerr(
"***** vDeformation::PerformSensitivityDeformation -> An error occured while performing backward deformation !" << endl);
496 Cerr(
"***** frame index " << fr <<
" respiratory gate index " << rg<<
" cardiac gate index " << cg<<
" !" << endl);
502 Cerr(
"***** vDeformation::PerformDeformation -> Unknown type of deformation !" << endl);
529 int incX = dX>0 ? 1 : -1;
533 dX = (dX>=0) ? dX : -dX;
534 dY = (dY>=0) ? dY : -dY;
535 dZ = (dZ>=0) ? dZ : -dZ;
539 if ((iiv < nb_tot_vox)
541 ap_outputImage[iov] += ap_inputImage[iiv] * (1.-dX)*(1.-dY)*(1.-dZ);
543 if ((iiv+incX < nb_tot_vox)
545 ap_outputImage[iov] += ap_inputImage[iiv+incX] * dX*(1.-dY)*(1.-dZ);
547 if ((iiv+incY < nb_tot_vox )
549 ap_outputImage[iov] += ap_inputImage[iiv +incY] * (1.-dX)*dY*(1.-dZ);
551 if ((iiv+incX+incY < nb_tot_vox)
552 && ( iiv+incX+incY >= 0))
553 ap_outputImage[iov] += ap_inputImage[iiv+incX+incY] * dX*dY*(1.-dZ);
555 if ((iiv+incZ < nb_tot_vox)
557 ap_outputImage[iov] += ap_inputImage[iiv+incZ] * (1.-dX)*(1.-dY)*dZ;
559 if ((iiv+incX+incZ) < nb_tot_vox
560 && (iiv+incX+incZ) >=0 )
561 ap_outputImage[iov] += ap_inputImage[iiv+incX+incZ] * dX*(1.-dY)*dZ;
563 if ((iiv+incY+incZ < nb_tot_vox)
564 && (iiv+incY+incZ >= 0))
565 ap_outputImage[iov] += ap_inputImage[iiv+incY+incZ] * (1.-dX)*dY*dZ;
567 if ((iiv+incX+incY+incZ < nb_tot_vox)
568 && (iiv+incX+incY+incZ >= 0))
569 ap_outputImage[iov] += ap_inputImage[iiv+incX+incY+incZ] *dX*dY*dZ;
FLTNB **** m4p_forwardImage
Declaration of class oImageDimensionsAndQuantification.
FLTNB **** m4p_refDynForwardImage
FLTNB ***** m5p_refDynBackwardImage
FLTNB **** m4p_refDynSensitivityImage
FLTNB ****** m6p_backwardImage
int GetNbBackwardImages()
INTNB GetNbVoxXY()
Get the number of voxels in a slice.
Declaration of class oImageSpace.
int GetNbCardGates()
Get the number of cardiac gates.
This class holds all the matrices in the image domain that can be used in the algorithm: image...
INTNB GetNbVoxXYZ()
Get the total number of voxels.
int GetNbThreadsForProjection()
Get the number of threads used for projections.
INTNB GetNbVoxX()
Get the number of voxels along the X axis.
int GetNbRespGates()
Get the number of respiratory gates.
FLTNB ***** m5p_sensitivity