/*************************************************************************************************************************************/ /* */ /* G E N E R A T I O N D ' U N A L B U M */ /* 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 : */ /* */ /* */ /* Author of '$xci/deformi.12$K' : */ /* */ /* Jean-Francois COLONNA (LACTAMME, 20180924151718). */ /* */ /*************************************************************************************************************************************/ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* 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... */ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* M A C R O S U T I L E S : */ /* */ /*************************************************************************************************************************************/ #define DEFORMATION_D_UN_ALBUM_QUELCONQUE(type_album,load_album,vraie_deformation_inverse_tridimensionnelle,update_album) \ Bblock \ BDEFV(type_album,albumA); \ BDEFV(type_album,albumR); \ /* Definition des cinq albums utiles... */ \ \ CALi(load_album(albumA \ ,nom_albumA \ ,nom_postfixeA \ ,premiere_imageA \ ,pas_des_imagesA \ ,nombre_de_chiffresA \ ,FAUX \ ,UNDEF \ ,FAUX \ ) \ ); \ /* Chargement de l'album Argument... */ \ Test(PAS_D_ERREUR(CODE_ERREUR)) \ Bblock \ CALS(vraie_deformation_inverse_tridimensionnelle(albumR \ ,albumA \ ,albumDIX \ ,albumDIY \ ,albumDIZ \ ) \ ); \ \ CALi(update_album(nom_albumR \ ,nom_postfixeR \ ,premiere_imageR \ ,pas_des_imagesR \ ,albumR \ ,nombre_de_chiffresR \ ,FAUX \ ) \ ); \ Eblock \ ATes \ Bblock \ Test__CODE_ERREUR__ERREUR07; \ Eblock \ ETes \ \ EDEFV(type_album,albumR); \ EDEFV(type_album,albumA); \ /* Definition des cinq albums utiles... */ \ Eblock /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* G E N E R A T I O N D ' U N A L B U M */ /* 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 : */ /* */ /*************************************************************************************************************************************/ BCommande(nombre_d_arguments,arguments) /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock DEFV(CHAR,INIC(POINTERc(nom_albumR),NOM_PIPE)); DEFV(CHAR,INIC(POINTERc(nom_postfixeR),NOM_UNDEF_VIDE)); DEFV(Int,INIT(premiere_imageR,PREMIERE_IMAGE)); DEFV(Int,INIT(pas_des_imagesR,PAS_DES_IMAGES)); DEFV(Int,INIT(nombre_de_chiffresR,NOMBRE_DE_CHIFFRES)); DEFV(CHAR,INIC(POINTERc(nom_albumA),NOM_PIPE)); DEFV(CHAR,INIC(POINTERc(nom_postfixeA),NOM_UNDEF_VIDE)); DEFV(Int,INIT(premiere_imageA,PREMIERE_IMAGE)); DEFV(Int,INIT(pas_des_imagesA,PAS_DES_IMAGES)); DEFV(Int,INIT(nombre_de_chiffresA,NOMBRE_DE_CHIFFRES)); DEFV(CHAR,INIC(POINTERc(nom_albumDIX),NOM_PIPE)); DEFV(CHAR,INIC(POINTERc(nom_postfixeDIX),NOM_UNDEF_VIDE)); DEFV(Int,INIT(premiere_imageDIX,PREMIERE_IMAGE)); DEFV(Int,INIT(pas_des_imagesDIX,PAS_DES_IMAGES)); DEFV(Int,INIT(nombre_de_chiffresDIX,NOMBRE_DE_CHIFFRES)); DEFV(CHAR,INIC(POINTERc(nom_albumDIY),NOM_PIPE)); DEFV(CHAR,INIC(POINTERc(nom_postfixeDIY),NOM_UNDEF_VIDE)); DEFV(Int,INIT(premiere_imageDIY,PREMIERE_IMAGE)); DEFV(Int,INIT(pas_des_imagesDIY,PAS_DES_IMAGES)); DEFV(Int,INIT(nombre_de_chiffresDIY,NOMBRE_DE_CHIFFRES)); DEFV(CHAR,INIC(POINTERc(nom_albumDIZ),NOM_PIPE)); DEFV(CHAR,INIC(POINTERc(nom_postfixeDIZ),NOM_UNDEF_VIDE)); DEFV(Int,INIT(premiere_imageDIZ,PREMIERE_IMAGE)); DEFV(Int,INIT(pas_des_imagesDIZ,PAS_DES_IMAGES)); DEFV(Int,INIT(nombre_de_chiffresDIZ,NOMBRE_DE_CHIFFRES)); /*..............................................................................................................................*/ BSaveModifyVariable(Logical,S_ACCELERATEUR__ALOAD_POINT_COORDONNEES_01_____utiliser_l_accelerateur,FAUX); #define P_NIVEAU_HORS_IMAGE \ "Pniveau_hors_image3D=""Pnhi3D=""Pniveau_hors_image=""Pnhi=" #define F_NIVEAU_HORS_IMAGE \ "niveau_hors_image3D=""nhi3D=""niveau_hors_image=""nhi=""Fniveau_hors_image3D=""Fnhi3D=""Fniveau_hors_image=""Fnhi=" /* Afin de reduire la longueur de deux lignes a venir... */ /* */ /* Je rappelle le 20200106172741 que ces '#define's ne peuvent malheureusement pas etre */ /* a l'interieur de 'GET_ARGUMENTSi(...,BLOC(...))', d'ou cette localisation... */ GET_ARGUMENTSi(nombre_d_arguments ,BLOC(GET_ARGUMENT_C("albumA=""A=",nom_albumA); GET_ARGUMENT_C("postfixeA=",nom_postfixeA); GET_ARGUMENT_I("premiereA=",premiere_imageA); GET_ARGUMENT_I("pasA=",pas_des_imagesA); GET_ARGUMENT_I("chiffresA=",nombre_de_chiffresA); GET_ARGUMENT_C("albumDIX=""DIX=""albumDX=""DX=",nom_albumDIX); GET_ARGUMENT_C("postfixeDIX=",nom_postfixeDIX); GET_ARGUMENT_I("premiereDIX=",premiere_imageDIX); GET_ARGUMENT_I("pasDIX=",pas_des_imagesDIX); GET_ARGUMENT_I("chiffresDIX=",nombre_de_chiffresDIX); GET_ARGUMENT_C("albumDIY=""DIY=""albumDY=""DY=",nom_albumDIY); GET_ARGUMENT_C("postfixeDIY=",nom_postfixeDIY); GET_ARGUMENT_I("premiereDIY=",premiere_imageDIY); GET_ARGUMENT_I("pasDIY=",pas_des_imagesDIY); GET_ARGUMENT_I("chiffresDIY=",nombre_de_chiffresDIY); GET_ARGUMENT_C("albumDIZ=""DIZ=""albumDZ=""DZ=",nom_albumDIZ); GET_ARGUMENT_C("postfixeDIZ=",nom_postfixeDIZ); GET_ARGUMENT_I("premiereDIZ=",premiere_imageDIZ); GET_ARGUMENT_I("pasDIZ=",pas_des_imagesDIZ); GET_ARGUMENT_I("chiffresDIZ=",nombre_de_chiffresDIZ); GET_ARGUMENT_C("albumR=""R=",nom_albumR); GET_ARGUMENT_C("postfixeR=",nom_postfixeR); GET_ARGUMENT_I("premiereR=",premiere_imageR); GET_ARGUMENT_I("pasR=",pas_des_imagesR); GET_ARGUMENT_I("chiffresR=",nombre_de_chiffresR); GET_ARGUMENT_L("standard=",les_images_sont_standards); GET_ARGUMENTS2_L("iterer3D=""i3D=""iterer=" ,Avraie_deformation_inverse_tridimensionnelle_____iterer_le_calcul_des_coordonnees ,AFvraie_deformation_inverse_tridimensionnelle_____iterer_le_calcul_des_coordonnees ); GET_ARGUMENTS2_I("nombre_iterations3D=""n3D=""nombre_iterations=""iterations=" ,Avraie_deformation_inverse_tridimensionnelle_____nombre_d_iterations_du_calcul_des_coordonnees ,AFvraie_deformation_inverse_tridimensionnelle_____nombre_d_iterations_du_calcul_des_coordonnees ); /* Les arguments d'iterations ont ete introduits le 20200121173143... */ GET_ARGUMENTS2_L("X_normalisees3D=""X_n3D=""X_n" ,Avraie_deformation_inverse_tridimensionnelle_____les_coordonnees_X_sont_normalisees ,AFvraie_deformation_inverse_tridimensionnelle_____les_coordonnees_X_sont_normalisees ); GET_ARGUMENTS2_N("X_denormalisees3D=""X_dn3D=""X_dn" ,Avraie_deformation_inverse_tridimensionnelle_____les_coordonnees_X_sont_normalisees ,AFvraie_deformation_inverse_tridimensionnelle_____les_coordonnees_X_sont_normalisees ); GET_ARGUMENTS2_L("Y_normalisees3D=""Y_n3D=""Y_n" ,Avraie_deformation_inverse_tridimensionnelle_____les_coordonnees_Y_sont_normalisees ,AFvraie_deformation_inverse_tridimensionnelle_____les_coordonnees_Y_sont_normalisees ); GET_ARGUMENTS2_N("Y_denormalisees3D=""Y_dn3D=""Y_dn" ,Avraie_deformation_inverse_tridimensionnelle_____les_coordonnees_Y_sont_normalisees ,AFvraie_deformation_inverse_tridimensionnelle_____les_coordonnees_Y_sont_normalisees ); GET_ARGUMENTS2_L("Z_normalisees3D=""Z_n3D=""Z_n" ,Avraie_deformation_inverse_tridimensionnelle_____les_coordonnees_Z_sont_normalisees ,AFvraie_deformation_inverse_tridimensionnelle_____les_coordonnees_Z_sont_normalisees ); GET_ARGUMENTS2_N("Z_denormalisees3D=""Z_dn3D=""Z_dn" ,Avraie_deformation_inverse_tridimensionnelle_____les_coordonnees_Z_sont_normalisees ,AFvraie_deformation_inverse_tridimensionnelle_____les_coordonnees_Z_sont_normalisees ); GET_ARGUMENT_L("AccelerateurALoadPoint=""AccALP=" ,S_ACCELERATEUR__ALOAD_POINT_COORDONNEES_01_____utiliser_l_accelerateur ); GET_ARGUMENTS2_L("interpoler=""inter=" ,FAload_point_coordonnees_01_____interpoler_bilineairement_ou_bicubiquement ,FFAload_point_coordonnees_01_____interpoler_bilineairement_ou_bicubiquement ); GET_ARGUMENTS2_F("interpolerX=""interX=" ,FAload_point_coordonnees_01_____ponderation_du_barycentre_d_interpolation_X ,FFAload_point_coordonnees_01_____ponderation_du_barycentre_d_interpolation_X ); GET_ARGUMENTS2_F("interpolerY=""interY=" ,FAload_point_coordonnees_01_____ponderation_du_barycentre_d_interpolation_Y ,FFAload_point_coordonnees_01_____ponderation_du_barycentre_d_interpolation_Y ); GET_ARGUMENTS2_F("interpolerZ=""interZ=" ,FAload_point_coordonnees_01_____ponderation_du_barycentre_d_interpolation_Z ,FFAload_point_coordonnees_01_____ponderation_du_barycentre_d_interpolation_Z ); GET_ARGUMENTS2_L("lineaire=""bilineaire=" ,FAload_point_coordonnees_01_____utiliser_l_interpolation_bilineaire ,FFAload_point_coordonnees_01_____utiliser_l_interpolation_bilineaire ); GET_ARGUMENTS2_N("cubique=""bicubique=" ,FAload_point_coordonnees_01_____utiliser_l_interpolation_bilineaire ,FFAload_point_coordonnees_01_____utiliser_l_interpolation_bilineaire ); GET_ARGUMENTS2_L("appliquer_une_matrice_de_transformation=""matrice=""transformation=" ,FAload_point_coordonnees_01_____appliquer_une_matrice_de_transformation ,FFAload_point_coordonnees_01_____appliquer_une_matrice_de_transformation ); GET_ARGUMENTS2_F("mxx=""mtxx=" ,ASD2(FAload_point_coordonnees_01_____matrice_de_transformation,cx,cx) ,ASD2(FFAload_point_coordonnees_01_____matrice_de_transformation,cx,cx) ); GET_ARGUMENTS2_F("mxy=""mtxy=" ,ASD2(FAload_point_coordonnees_01_____matrice_de_transformation,cx,cy) ,ASD2(FFAload_point_coordonnees_01_____matrice_de_transformation,cx,cy) ); GET_ARGUMENTS2_F("mxz=""mtxz=" ,ASD2(FAload_point_coordonnees_01_____matrice_de_transformation,cx,cz) ,ASD2(FFAload_point_coordonnees_01_____matrice_de_transformation,cx,cz) ); GET_ARGUMENTS2_F("myx=""mtyx=" ,ASD2(FAload_point_coordonnees_01_____matrice_de_transformation,cy,cx) ,ASD2(FFAload_point_coordonnees_01_____matrice_de_transformation,cy,cx) ); GET_ARGUMENTS2_F("myy=""mtyy=" ,ASD2(FAload_point_coordonnees_01_____matrice_de_transformation,cy,cy) ,ASD2(FFAload_point_coordonnees_01_____matrice_de_transformation,cy,cy) ); GET_ARGUMENTS2_F("myz=""mtyz=" ,ASD2(FAload_point_coordonnees_01_____matrice_de_transformation,cy,cz) ,ASD2(FFAload_point_coordonnees_01_____matrice_de_transformation,cy,cz) ); GET_ARGUMENTS2_F("mzx=""mtzx=" ,ASD2(FAload_point_coordonnees_01_____matrice_de_transformation,cz,cx) ,ASD2(FFAload_point_coordonnees_01_____matrice_de_transformation,cz,cx) ); GET_ARGUMENTS2_F("mzy=""mtzy=" ,ASD2(FAload_point_coordonnees_01_____matrice_de_transformation,cz,cy) ,ASD2(FFAload_point_coordonnees_01_____matrice_de_transformation,cz,cy) ); GET_ARGUMENTS2_F("mzz=""mtzz=" ,ASD2(FAload_point_coordonnees_01_____matrice_de_transformation,cz,cz) ,ASD2(FFAload_point_coordonnees_01_____matrice_de_transformation,cz,cz) ); GET_ARGUMENTS2_F("pre_atrx=" ,FAload_point_coordonnees_01_____PreAntiTranslation_Xf ,FFAload_point_coordonnees_01_____PreAntiTranslation_Xf ); GET_ARGUMENTS2_F("post_trx=" ,FAload_point_coordonnees_01_____Post___Translation_Xf ,FFAload_point_coordonnees_01_____Post___Translation_Xf ); GET_ARGUMENTS2_F("pre_atry=" ,FAload_point_coordonnees_01_____PreAntiTranslation_Yf ,FFAload_point_coordonnees_01_____PreAntiTranslation_Yf ); GET_ARGUMENTS2_F("post_try=" ,FAload_point_coordonnees_01_____Post___Translation_Yf ,FFAload_point_coordonnees_01_____Post___Translation_Yf ); GET_ARGUMENTS2_L("periodiser_X3D=""per_X3D=""periodiser_X=""per_X=" ,Avraie_deformation_inverse_tridimensionnelle_____periodiser_X ,AFvraie_deformation_inverse_tridimensionnelle_____periodiser_X ); GET_ARGUMENTS2_L("symetriser_X3D=""sym_X3D=""symetriser_X=""sym_X=" ,Avraie_deformation_inverse_tridimensionnelle_____symetriser_X ,AFvraie_deformation_inverse_tridimensionnelle_____symetriser_X ); GET_ARGUMENTS2_L("prolonger_X3D=""pro_X3D=""prolonger_X=""pro_X=" ,Avraie_deformation_inverse_tridimensionnelle_____prolonger_X ,AFvraie_deformation_inverse_tridimensionnelle_____prolonger_X ); GET_ARGUMENTS2_L("periodiser_Y3D=""per_Y3D=""periodiser_Y=""per_Y=" ,Avraie_deformation_inverse_tridimensionnelle_____periodiser_Y ,AFvraie_deformation_inverse_tridimensionnelle_____periodiser_Y ); GET_ARGUMENTS2_L("symetriser_Y3D=""sym_Y3D=""symetriser_Y=""sym_Y=" ,Avraie_deformation_inverse_tridimensionnelle_____symetriser_Y ,AFvraie_deformation_inverse_tridimensionnelle_____symetriser_Y ); GET_ARGUMENTS2_L("prolonger_Y3D=""pro_Y3D=""prolonger_Y=""pro_Y=" ,Avraie_deformation_inverse_tridimensionnelle_____prolonger_Y ,AFvraie_deformation_inverse_tridimensionnelle_____prolonger_Y ); GET_ARGUMENTS2_L("periodiser_Z3D=""per_Z3D=""periodiser_Z=""per_Z=" ,Avraie_deformation_inverse_tridimensionnelle_____periodiser_Z ,AFvraie_deformation_inverse_tridimensionnelle_____periodiser_Z ); GET_ARGUMENTS2_L("symetriser_Z3D=""sym_Z3D=""symetriser_Z=""sym_Z=" ,Avraie_deformation_inverse_tridimensionnelle_____symetriser_Z ,AFvraie_deformation_inverse_tridimensionnelle_____symetriser_Z ); GET_ARGUMENTS2_L("prolonger_Z3D=""pro_Z3D=""prolonger_Z=""pro_Z=" ,Avraie_deformation_inverse_tridimensionnelle_____prolonger_Z ,AFvraie_deformation_inverse_tridimensionnelle_____prolonger_Z ); GET_ARGUMENT_P(P_NIVEAU_HORS_IMAGE ,Avraie_deformation_inverse_tridimensionnelle_____niveau_hors_image ); GET_ARGUMENT_F(F_NIVEAU_HORS_IMAGE ,AFvraie_deformation_inverse_tridimensionnelle_____niveau_flottant_hors_image ); /* On notera peut-etre un aspect inhabituel des arguments d'entree des parametres */ /* 'Avraie_deformation_inverse_tridimensionnelle_____niveau_hors_image' et */ /* 'AFvraie_deformation_inverse_tridimensionnelle_____niveau_flottant_hors_image' qui sont */ /* liees en fait a des considerations de perennite anterieure, la version "non standard" */ /* etant la plus ancienne et ne devant pas etre modifiees (par exemple ""nhi3D="...). */ ) ); #undef F_NIVEAU_HORS_IMAGE #undef P_NIVEAU_HORS_IMAGE /* Je rappelle le 20200106172741 que ces '#undef's ne peuvent malheureusement pas etre */ /* a l'interieur de 'GET_ARGUMENTSi(...,BLOC(...))', d'ou cette localisation... */ begin_nouveau_block Bblock BDEFV(albumF,albumDIX); BDEFV(albumF,albumDIY); BDEFV(albumF,albumDIZ); /* Definition des trois albums flottants utiles... */ CALi(dAloadF_album(albumDIX ,nom_albumDIX ,nom_postfixeDIX ,premiere_imageDIX ,pas_des_imagesDIX ,nombre_de_chiffresDIX ,FAUX ,UNDEF ,FAUX ) ); /* Chargement de l'image des deformations "inverses" en 'X'... */ Test(PAS_D_ERREUR(CODE_ERREUR)) Bblock CALi(dAloadF_album(albumDIY ,nom_albumDIY ,nom_postfixeDIY ,premiere_imageDIY ,pas_des_imagesDIY ,nombre_de_chiffresDIY ,FAUX ,UNDEF ,FAUX ) ); /* Chargement de l'image des deformations "inverses" en 'Y'... */ Test(PAS_D_ERREUR(CODE_ERREUR)) Bblock CALi(dAloadF_album(albumDIZ ,nom_albumDIZ ,nom_postfixeDIZ ,premiere_imageDIZ ,pas_des_imagesDIZ ,nombre_de_chiffresDIZ ,FAUX ,UNDEF ,FAUX ) ); /* Chargement de l'image des deformations "inverses" en 'Z'... */ Test(PAS_D_ERREUR(CODE_ERREUR)) Bblock Test(EST_VRAI(les_images_sont_standards)) /* Introduit le 20200106111647... */ Bblock DEFORMATION_D_UN_ALBUM_QUELCONQUE(album ,dAload_album ,Avraie_deformation_inverse_tridimensionnelle ,dAupdate_album ); /* Deformation d'albums "standard"s... */ Eblock ATes Bblock DEFORMATION_D_UN_ALBUM_QUELCONQUE(albumF ,dAloadF_album ,AFvraie_deformation_inverse_tridimensionnelle ,dAupdateF_album ); /* Deformation d'albums non "standard"s... */ Eblock ETes 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 EDEFV(albumF,albumDIZ); EDEFV(albumF,albumDIY); EDEFV(albumF,albumDIX); /* Definition des cinq albums utiles... */ Eblock end_nouveau_block ESaveModifyVariable(Logical,S_ACCELERATEUR__ALOAD_POINT_COORDONNEES_01_____utiliser_l_accelerateur); RETU_Commande; Eblock ECommande