/*************************************************************************************************************************************/
/* */
/* G E N E R A T I O N D ' U N E I M A G E " F L O T T A N T E " */
/* P A R D E F O R M A T I O N " I N V E R S E " D ' U N A L B U M " F L O T T A N T " : */
/* */
/* */
/* Author of '$xci/deformi.11$K' : */
/* */
/* Jean-Francois COLONNA (LACTAMME, 20080930143226). */
/* */
/*************************************************************************************************************************************/
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* I N T E R F A C E ' listG ' : */
/* */
/* */
/* :Debut_listG: */
/* :Fin_listG: */
/* */
/*************************************************************************************************************************************/
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* D I R E C T I V E S S P E C I F I Q U E S D E C O M P I L A T I O N : */
/* */
/*************************************************************************************************************************************/
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* F I C H I E R S D ' I N C L U D E S : */
/* */
/*************************************************************************************************************************************/
#include INCLUDES_BASE
#include image_image_IMAGESF_EXT
#include image_image_QUAD_IMAGE_EXT
#include image_image_DI_ALBUM_EXT
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* P A R A M E T R E S : */
/* */
/*************************************************************************************************************************************/
#include xci/sequence.01.I"
/* ATTENTION, on definit ainsi le symbole 'DERNIERE_IMAGE' qui ne sert a rien ici, puisque */
/* c'est en effet 'Zmax' qui joue ce role... */
#define LA_DEFORMATION_INVERSE_EST_DEFINIE_EN_COORDONNEES_CARTESIENNES \
VRAI \
/* La deformation est definie en coordonnees cartesiennes ('VRAI') ou bien en coordonnees */ \
/* polaires ('FAUX'). */
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* M A C R O S U T I L E S : */
/* */
/*************************************************************************************************************************************/
#define imageR \
IFmageR
#define imageX_RHO_ \
IFmageA1
#define imageY_THETA \
IFmageA2
#define imageZ_PHI_ \
IFmageA3
/* On notera les associations : */
/* */
/* X --> RHO */
/* Y --> THETA */
/* Z --> PHI */
/* */
/* et non pas (comme les noms 'IFconversion_RPT_...' le laissent supposer) : */
/* */
/* X --> RHO */
/* Y --> PHI */
/* Z --> THETA */
/* */
/* afin de permettre la compatibilite avec 'v $xci/deformi.01$K recouvrement'... */
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* G E N E R A T I O N D ' U N E I M A G E " F L O T T A N T E " */
/* P A R D E F O R M A T I O N " I N V E R S E " D ' U N A L B U M " F L O T T A N T " : */
/* */
/*************************************************************************************************************************************/
BCommande(nombre_d_arguments,arguments)
/*-----------------------------------------------------------------------------------------------------------------------------------*/
Bblock
DEFV(CHAR,INIC(POINTERc(nom_imageR),NOM_PIPE));
DEFV(CHAR,INIC(POINTERc(nom_albumA),NOM_PIPE));
DEFV(CHAR,INIC(POINTERc(nom_imageDIX_RHO_),NOM_PIPE));
DEFV(CHAR,INIC(POINTERc(nom_imageDIY_THETA),NOM_PIPE));
DEFV(CHAR,INIC(POINTERc(nom_imageDIZ_PHI_),NOM_PIPE));
DEFV(CHAR,INIC(POINTERc(nom_postfixe),NOM_UNDEF_VIDE));
/* Nom d'un eventuel postfixe a placer derriere <nom_albumA><numero> (par exemple '$ROUGE'). */
DEFV(Int,INIT(premiere_image,PREMIERE_IMAGE));
/* Numero de la premiere image, */
DEFV(Int,INIT(pas_des_images,PAS_DES_IMAGES));
/* Pas de passage d'un numero d'image a une autre. */
DEFV(Int,INIT(nombre_de_chiffres,NOMBRE_DE_CHIFFRES));
/* Nombre de chiffres codant le numero des images de la serie... */
DEFV(Logical,INIT(la_deformation_inverse_est_definie_en_coordonnees_cartesiennes
,LA_DEFORMATION_INVERSE_EST_DEFINIE_EN_COORDONNEES_CARTESIENNES
)
);
/* La deformation est definie en coordonnees cartesiennes ('VRAI') ou bien en coordonnees */
/* polaires ('FAUX'). */
/*..............................................................................................................................*/
BSaveModifyVariable(Logical,S_ACCELERATEUR__ALOAD_POINT_COORDONNEES_01_____utiliser_l_accelerateur,FAUX);
/* Introduit le 20120620092518... */
/* */
/* Le 20150309134739, en parallele de la modification 'v $xci/ombrage.11$K 20150309134739' */
/* des tests effectues sur '$LACT19' ont montre qu'il etait preferable d'inhiber par defaut */
/* l'accelerateur car, en effet, il y a un gain (mais qui n'est pas enorme : de l'ordre */
/* 6%...). */
GET_ARGUMENTSi(nombre_d_arguments
,BLOC(GET_ARGUMENT_C("albumA=""A=",nom_albumA);
GET_ARGUMENT_C("postfixe=",nom_postfixe);
GET_ARGUMENT_I("premiere=",premiere_image);
GET_ARGUMENT_I("pas=",pas_des_images);
GET_ARGUMENT_I("chiffres=",nombre_de_chiffres);
GET_ARGUMENT_C("imageDIX=""DIX=""imageDX=""DX=""imageDIR=""DIR=""imageDR=""DR=",nom_imageDIX_RHO_);
GET_ARGUMENT_C("imageDIY=""DIY=""imageDY=""DY=""imageDIT=""DIT=""imageDT=""DT=",nom_imageDIY_THETA);
GET_ARGUMENT_C("imageDIZ=""DIZ=""imageDZ=""DZ=""imageDIP=""DIP=""imageDP=""DP=",nom_imageDIZ_PHI_);
GET_ARGUMENT_C("imageR=""R=",nom_imageR);
GET_ARGUMENT_L("cartesiennes=""cartesienne=""cartesien="
,la_deformation_inverse_est_definie_en_coordonnees_cartesiennes
);
GET_ARGUMENT_N("spheriques=""spherique="
,la_deformation_inverse_est_definie_en_coordonnees_cartesiennes
);
GET_ARGUMENT_F("trx3D=",IFconversion_RPT_X_____Post___Translation);
GET_ARGUMENT_F("try3D=",IFconversion_RPT_Y_____Post___Translation);
GET_ARGUMENT_F("trz3D=",IFconversion_RPT_Z_____Post___Translation);
GET_ARGUMENT_L("X_normalisees3D=""X_n3D=""X_n"
,AFdeformation_inverse_tridimensionnelle_____les_coordonnees_X_sont_normalisees
);
GET_ARGUMENT_N("X_denormalisees3D=""X_dn3D=""X_dn"
,AFdeformation_inverse_tridimensionnelle_____les_coordonnees_X_sont_normalisees
);
GET_ARGUMENT_L("Y_normalisees3D=""Y_n3D=""Y_n"
,AFdeformation_inverse_tridimensionnelle_____les_coordonnees_Y_sont_normalisees
);
GET_ARGUMENT_N("Y_denormalisees3D=""Y_dn3D=""Y_dn"
,AFdeformation_inverse_tridimensionnelle_____les_coordonnees_Y_sont_normalisees
);
GET_ARGUMENT_L("Z_normalisees3D=""Z_n3D=""Z_n"
,AFdeformation_inverse_tridimensionnelle_____les_coordonnees_Z_sont_normalisees
);
GET_ARGUMENT_N("Z_denormalisees3D=""Z_dn3D=""Z_dn"
,AFdeformation_inverse_tridimensionnelle_____les_coordonnees_Z_sont_normalisees
);
GET_ARGUMENT_L("AccelerateurALoadPoint=""AccALP="
,S_ACCELERATEUR__ALOAD_POINT_COORDONNEES_01_____utiliser_l_accelerateur
);
/* Arguments introduits le 20120312132855... */
GET_ARGUMENT_L("interpoler=""inter="
,FFAload_point_coordonnees_01_____interpoler_bilineairement_ou_bicubiquement
);
GET_ARGUMENT_F("interpolerX=""interX="
,FFAload_point_coordonnees_01_____ponderation_du_barycentre_d_interpolation_X
);
GET_ARGUMENT_F("interpolerY=""interY="
,FFAload_point_coordonnees_01_____ponderation_du_barycentre_d_interpolation_Y
);
GET_ARGUMENT_F("interpolerZ=""interZ="
,FFAload_point_coordonnees_01_____ponderation_du_barycentre_d_interpolation_Z
);
GET_ARGUMENT_L("lineaire=""bilineaire="
,FFAload_point_coordonnees_01_____utiliser_l_interpolation_bilineaire
);
GET_ARGUMENT_N("cubique=""bicubique="
,FFAload_point_coordonnees_01_____utiliser_l_interpolation_bilineaire
);
GET_ARGUMENT_L("appliquer_une_matrice_de_transformation=""matrice=""transformation="
,FFAload_point_coordonnees_01_____appliquer_une_matrice_de_transformation
);
GET_ARGUMENT_F("mxx=""mtxx=",ASD2(FFAload_point_coordonnees_01_____matrice_de_transformation,cx,cx));
GET_ARGUMENT_F("mxy=""mtxy=",ASD2(FFAload_point_coordonnees_01_____matrice_de_transformation,cx,cy));
GET_ARGUMENT_F("mxz=""mtxz=",ASD2(FFAload_point_coordonnees_01_____matrice_de_transformation,cx,cz));
GET_ARGUMENT_F("myx=""mtyx=",ASD2(FFAload_point_coordonnees_01_____matrice_de_transformation,cy,cx));
GET_ARGUMENT_F("myy=""mtyy=",ASD2(FFAload_point_coordonnees_01_____matrice_de_transformation,cy,cy));
GET_ARGUMENT_F("myz=""mtyz=",ASD2(FFAload_point_coordonnees_01_____matrice_de_transformation,cy,cz));
GET_ARGUMENT_F("mzx=""mtzx=",ASD2(FFAload_point_coordonnees_01_____matrice_de_transformation,cz,cx));
GET_ARGUMENT_F("mzy=""mtzy=",ASD2(FFAload_point_coordonnees_01_____matrice_de_transformation,cz,cy));
GET_ARGUMENT_F("mzz=""mtzz=",ASD2(FFAload_point_coordonnees_01_____matrice_de_transformation,cz,cz));
GET_ARGUMENT_F("pre_atrx=",FFAload_point_coordonnees_01_____PreAntiTranslation_Xf);
GET_ARGUMENT_F("post_trx=",FFAload_point_coordonnees_01_____Post___Translation_Xf);
GET_ARGUMENT_F("pre_atry=",FFAload_point_coordonnees_01_____PreAntiTranslation_Yf);
GET_ARGUMENT_F("post_try=",FFAload_point_coordonnees_01_____Post___Translation_Yf);
GET_ARGUMENT_L("periodiser_X3D=""per_X3D=""periodiser_X=""per_X="
,AFdeformation_inverse_tridimensionnelle_____periodiser_X
);
GET_ARGUMENT_L("symetriser_X3D=""sym_X3D=""symetriser_X=""sym_X="
,AFdeformation_inverse_tridimensionnelle_____symetriser_X
);
GET_ARGUMENT_L("prolonger_X3D=""pro_X3D=""prolonger_X=""pro_X="
,AFdeformation_inverse_tridimensionnelle_____prolonger_X
);
GET_ARGUMENT_L("periodiser_Y3D=""per_Y3D=""periodiser_Y=""per_Y="
,AFdeformation_inverse_tridimensionnelle_____periodiser_Y
);
GET_ARGUMENT_L("symetriser_Y3D=""sym_Y3D=""symetriser_Y=""sym_Y="
,AFdeformation_inverse_tridimensionnelle_____symetriser_Y
);
GET_ARGUMENT_L("prolonger_Y3D=""pro_Y3D=""prolonger_Y=""pro_Y="
,AFdeformation_inverse_tridimensionnelle_____prolonger_Y
);
GET_ARGUMENT_L("periodiser_Z3D=""per_Z3D=""periodiser_Z=""per_Z="
,AFdeformation_inverse_tridimensionnelle_____periodiser_Z
);
GET_ARGUMENT_L("symetriser_Z3D=""sym_Z3D=""symetriser_Z=""sym_Z="
,AFdeformation_inverse_tridimensionnelle_____symetriser_Z
);
GET_ARGUMENT_L("prolonger_Z3D=""pro_Z3D=""prolonger_Z=""pro_Z="
,AFdeformation_inverse_tridimensionnelle_____prolonger_Z
);
GET_ARGUMENT_F("niveau_hors_image3D=""nhi3D=""niveau_hors_image=""nhi="
,AFdeformation_inverse_tridimensionnelle_____niveau_flottant_hors_image
);
)
);
CALi(IFinitialisation(imageR,FZERO));
begin_nouveau_block
Bblock
BDEFV(albumF,albumA);
/* Definition de l'album d'images Argument... */
CALi(dAloadF_album(albumA
,nom_albumA
,nom_postfixe
,premiere_image
,pas_des_images
,nombre_de_chiffres
,FAUX
,UNDEF
,FAUX
)
);
/* Chargement de l'album Argument... */
/* */
/* L'argument 'Inv' (='FAUX') a ete introduit le 20091125134325... */
Test(PAS_D_ERREUR(CODE_ERREUR))
Bblock
Test(PAS_D_ERREUR(CODE_ERROR(IloadF_image(imageX_RHO_,nom_imageDIX_RHO_))))
/* Chargement de l'image des deformations "inverses" en 'X' (ou bien en 'RHO')... */
Bblock
Test(PAS_D_ERREUR(CODE_ERROR(IloadF_image(imageY_THETA,nom_imageDIY_THETA))))
/* Chargement de l'image des deformations "inverses" en 'Y' (ou bien en 'THETA')... */
Bblock
Test(PAS_D_ERREUR(CODE_ERROR(IloadF_image(imageZ_PHI_,nom_imageDIZ_PHI_))))
/* Chargement de l'image des deformations "inverses" en 'Z' (ou bien en 'PHI')... */
Bblock
BDEFV(imageF,imageX);
BDEFV(imageF,imageY);
BDEFV(imageF,imageZ);
Test(EST_VRAI(la_deformation_inverse_est_definie_en_coordonnees_cartesiennes))
Bblock
CALS(IFmove(imageX,imageX_RHO_));
CALS(IFmove(imageY,imageY_THETA));
CALS(IFmove(imageZ,imageZ_PHI_));
Eblock
ATes
Bblock
CALS(IFconversion_RPT_X(imageX,imageX_RHO_,imageY_THETA,imageZ_PHI_));
CALS(IFconversion_RPT_Y(imageY,imageX_RHO_,imageY_THETA,imageZ_PHI_));
CALS(IFconversion_RPT_Z(imageZ,imageX_RHO_,imageY_THETA,imageZ_PHI_));
Eblock
ETes
CALS(AFdeformation_inverse_tridimensionnelle(imageR
,albumA
,imageX
,imageY
,imageZ
)
);
CALi(IupdateF_image(nom_imageR,imageR));
EDEFV(imageF,imageZ);
EDEFV(imageF,imageY);
EDEFV(imageF,imageX);
Eblock
ATes
Bblock
Test__CODE_ERREUR__ERREUR07;
Eblock
ETes
Eblock
ATes
Bblock
Test__CODE_ERREUR__ERREUR07;
Eblock
ETes
Eblock
ATes
Bblock
Test__CODE_ERREUR__ERREUR07;
Eblock
ETes
Eblock
ATes
Bblock
Eblock
ETes
EDEFV(albumF,albumA);
/* Definition de l'album d'images Argument... */
Eblock
end_nouveau_block
ESaveModifyVariable(Logical,S_ACCELERATEUR__ALOAD_POINT_COORDONNEES_01_____utiliser_l_accelerateur);
RETU_Commande;
Eblock
ECommande
Copyright © Jean-François COLONNA, 2019-2024.
Copyright © CMAP (Centre de Mathématiques APpliquées) UMR CNRS 7641 / École polytechnique, Institut Polytechnique de Paris, 2019-2024.