/*************************************************************************************************************************************/
/* */
/* R O T A T I O N D ' U N A L B U M : */
/* */
/* */
/* Author of '$xci/rotate_3D.11$K' : */
/* */
/* Jean-Francois COLONNA (LACTAMME, 20180505103639). */
/* */
/*************************************************************************************************************************************/
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* 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_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 INVERSER_L_AXE_OZ \
FAUX \
/* Indique s'il faut inverser l'ordre de parcours de l'ensemble des images. On a : */ \
/* */ \
/* FAUX : l'image d'arriere-plan est la premiere de la liste, */ \
/* VRAI : l'image d'arriere-plan est la derniere de la liste. */ \
/* */
#define INCOMPLET_AXE_OZ \
FAUX \
/* Indique s'il peut manquer des images... */
#define INCOMPLET_AXE_OZ_VALEUR_STANDARD \
NOIR
#define INCOMPLET_AXE_OZ_VALEUR_NON_STANDARD \
FLOT__NOIR
/* Donne la valeur des images manquantes... */
#define ROTATION_OX_IMPLICITE \
FZERO
#define ROTATION_OY_IMPLICITE \
FZERO
#define ROTATION_OZ_IMPLICITE \
FZERO
/* Angles de rotation... */
#define INVERSER_LES_ROTATIONS \
VRAI \
/* Faut-il inverser les rotations... */ \
/* */ \
/* On notera qu'en general il faut inverser les rotations etant donne le principe de ces */ \
/* rotations : on part des points {X,Y,Z} de 'albumR' et on leur donne le niveau des points */ \
/* de 'albumA' qui sont l'image de {X,Y,Z} par cette rotation inverse. Evidemment ce niveau */ \
/* est en general obtenu par interpolation de plusieurs points dans le voisinage. On verra */ \
/* a ce sujet 'v $xiii/di_image$FON X.NEGA.angle.' qui fonctionne sur ce principe mais */ \
/* bidimensionnellement... */
#define TRANSLATION_OX_IMPLICITE \
FZERO
#define TRANSLATION_OY_IMPLICITE \
FZERO
#define TRANSLATION_OZ_IMPLICITE \
FZERO
/* Translation de l'origine... */
#define BINARISER_L_ALBUM \
FAUX
#define SEUIL_NOIR_BLANC \
NOIR
#define NIVEAU_INFERIEUR \
NOIR
#define NIVEAU_SUPERIEUR \
BLANC
#define F_SEUIL_NOIR_BLANC \
FLOT__NOIR
#define F_NIVEAU_INFERIEUR \
FLOT__NOIR
#define F_NIVEAU_SUPERIEUR \
FLOT__BLANC
/* Faut-il binariser l'album Resultat ('VRAI') ou le laisser tel quel ('FAUX') ? */
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* M A C R O S U T I L E S : */
/* */
/*************************************************************************************************************************************/
#include xci/rotate_3D.11.I"
#include xci/transformation_3D.11.I"
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* R O T A T I O N 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_albumA),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(inverser_l_axe_OZ,INVERSER_L_AXE_OZ));
/* Indique s'il faut inverser l'ordre de parcours de l'ensemble des images. On a : */
/* */
/* FAUX : l'image d'arriere-plan est la premiere de la liste, */
/* VRAI : l'image d'arriere-plan est la derniere de la liste. */
/* */
DEFV(Logical,INIT(incomplet_axe_OZ,INCOMPLET_AXE_OZ));
/* Indique s'il peut manquer des images... */
DEFV(genere_p,INIT(incomplet_axe_OZ_valeur_standard,INCOMPLET_AXE_OZ_VALEUR_STANDARD));
DEFV(genere_Float,INIT(incomplet_axe_OZ_valeur_non_standard,INCOMPLET_AXE_OZ_VALEUR_NON_STANDARD));
/* Donne la valeur des images manquantes... */
DEFV(Float,INIT(angle_de_ROTATION_OX,ROTATION_OX_IMPLICITE));
DEFV(Float,INIT(angle_de_ROTATION_OY,ROTATION_OY_IMPLICITE));
DEFV(Float,INIT(angle_de_ROTATION_OZ,ROTATION_OZ_IMPLICITE));
/* Angles de rotation. */
DEFV(Logical,INIT(inverser_les_rotations,INVERSER_LES_ROTATIONS));
/* Faut-il inverser les rotations. */
/* */
/* On notera qu'en general il faut inverser les rotations etant donne le principe de ces */
/* rotations : on part des points {X,Y,Z} de 'albumR' et on leur donne le niveau des points */
/* de 'albumA' qui sont l'image de {X,Y,Z} par cette rotation inverse. Evidemment ce niveau */
/* est en general obtenu par interpolation de plusieurs points dans le voisinage. On verra */
/* a ce sujet 'v $xiii/di_image$FON X.NEGA.angle.' qui fonctionne sur ce principe mais */
/* bidimensionnellement... */
DEFV(Float,INIT(translation_OX,TRANSLATION_OX_IMPLICITE));
DEFV(Float,INIT(translation_OY,TRANSLATION_OY_IMPLICITE));
DEFV(Float,INIT(translation_OZ,TRANSLATION_OZ_IMPLICITE));
/* Translation de l'origine. */
DEFV(Logical,INIT(binariser_l_album,BINARISER_L_ALBUM));
DEFV(genere_p,INIT(seuil,SEUIL_NOIR_BLANC));
DEFV(genere_Float,INIT(Fseuil,F_SEUIL_NOIR_BLANC));
DEFV(genere_p,INIT(niveau_inferieur,NIVEAU_INFERIEUR));
DEFV(genere_p,INIT(niveau_superieur,NIVEAU_SUPERIEUR));
DEFV(genere_Float,INIT(Fniveau_inferieur,F_NIVEAU_INFERIEUR));
DEFV(genere_Float,INIT(Fniveau_superieur,F_NIVEAU_SUPERIEUR));
/* Faut-il binariser l'album Resultat ('VRAI') ou le laisser tel quel ('FAUX') ? */
/*..............................................................................................................................*/
BSaveModifyVariable(Logical,S_ACCELERATEUR__ALOAD_POINT_COORDONNEES_01_____utiliser_l_accelerateur,FAUX);
BSaveModifyVariable(Logical,FAload_point_coordonnees_01_____utiliser_l_interpolation_bilineaire,VRAI);
BSaveModifyVariable(Logical,FFAload_point_coordonnees_01_____utiliser_l_interpolation_bilineaire,VRAI);
/* L'interpolation bi-cubique introduit a priori de nombreux defauts. C'est donc */
/* l'interpolation bi-lineaire qui est activee par defaut... */
EGAL(valider_les_axes_OX_OY_OZ,VRAI);
EGAL(coefficient_de_forme_de_l_espace_tridimensionnel,COEFFICIENT_DE_FORME_DE_L_ESPACE_TRIDIMENSIONNEL);
GET_ARGUMENTSi(nombre_d_arguments
,BLOC(GET_ARGUMENT_C("imageA=""A=",nom_albumA);
GET_ARGUMENT_C("imageR=""R=",nom_albumR);
GET_ARGUMENT_C("postfixe=",nom_postfixe);
GET_ARGUMENT_I("premiere=",premiere_image);
GET_ARGUMENTS2_I("pas=",pas_des_images,pasZ);
GET_ARGUMENT_I("chiffres=",nombre_de_chiffres);
GET_ARGUMENT_L("inverser_Z=""inv_Z=",inverser_l_axe_OZ);
GET_ARGUMENT_L("incomplet_Z=""inc_Z=",incomplet_axe_OZ);
GET_ARGUMENT_P("valeur_standard_incomplet_Z=""vsinc_Z=",incomplet_axe_OZ_valeur_standard);
GET_ARGUMENT_F("valeur_non_standard_incomplet_Z=""vnsinc_Z=",incomplet_axe_OZ_valeur_non_standard);
GET_ARGUMENT_L("standardA=",les_imagesA_sont_standards);
GET_ARGUMENT_L("standardR=""standard=",les_imagesR_sont_standards);
PROCESS_ARGUMENT_F("ROTATION_OX=",angle_de_ROTATION_OX
,BLOC(VIDE;)
,BLOC(EGAL(vecteurs_____ordre_de_la_ROTATION_0X,nombre_d_arguments_recuperes);
)
);
PROCESS_ARGUMENT_F("ROTATION_OY=",angle_de_ROTATION_OY
,BLOC(VIDE;)
,BLOC(EGAL(vecteurs_____ordre_de_la_ROTATION_0Y,nombre_d_arguments_recuperes);
)
);
PROCESS_ARGUMENT_F("ROTATION_OZ=",angle_de_ROTATION_OZ
,BLOC(VIDE;)
,BLOC(EGAL(vecteurs_____ordre_de_la_ROTATION_0Z,nombre_d_arguments_recuperes);
)
);
GET_ARGUMENT_L("inverser_rotations=""inv_R=",inverser_les_rotations);
GET_ARGUMENTS2_F("tX=""TRANSLATION_OX="
,Arotation_____translation_OX
,AFrotation_____translation_OX
);
GET_ARGUMENTS2_F("tY=""TRANSLATION_OY="
,Arotation_____translation_OY
,AFrotation_____translation_OY
);
GET_ARGUMENTS2_F("tZ=""TRANSLATION_OZ="
,Arotation_____translation_OZ
,AFrotation_____translation_OZ
);
GET_ARGUMENTS2_L("periodiser_X=""periodX="
,Arotation_____periodiser_X
,AFrotation_____periodiser_X
);
GET_ARGUMENTS2_L("periodiser_Y=""periodY="
,Arotation_____periodiser_Y
,AFrotation_____periodiser_Y
);
GET_ARGUMENTS2_L("periodiser_Z=""periodZ="
,Arotation_____periodiser_Z
,AFrotation_____periodiser_Z
);
GET_ARGUMENTS2_L("symetriser_X=""symetrX="
,Arotation_____symetriser_X
,AFrotation_____symetriser_X
);
GET_ARGUMENTS2_L("symetriser_Y=""symetrY="
,Arotation_____symetriser_Y
,AFrotation_____symetriser_Y
);
GET_ARGUMENTS2_L("symetriser_Z=""symetrZ="
,Arotation_____symetriser_Z
,AFrotation_____symetriser_Z
);
GET_ARGUMENTS2_L("prolonger_X=""prolX="
,Arotation_____prolonger_X
,AFrotation_____prolonger_X
);
GET_ARGUMENTS2_L("prolonger_Y=""prolY="
,Arotation_____prolonger_Y
,AFrotation_____prolonger_Y
);
GET_ARGUMENTS2_L("prolonger_Z=""prolZ="
,Arotation_____prolonger_Z
,AFrotation_____prolonger_Z
);
PROCESS_ARGUMENT_F("niveau_hors_album=""nha=""niveau_hors_image=""nhi=""niveau="
,AFrotation_____niveau_hors_album
,BLOC(VIDE;)
,BLOC(Bblock
EGAL(Arotation_____niveau_hors_album
,GENP(AFrotation_____niveau_hors_album)
);
/* Le type de 'Arotation_____niveau_hors_album' etant different de celui de */
/* 'AFrotation_____niveau_hors_album' implique 'PROCESS_ARGUMENT_F(...)'... */
Eblock
)
);
GET_ARGUMENT_L("AccelerateurALoadPoint=""AccALP="
,S_ACCELERATEUR__ALOAD_POINT_COORDONNEES_01_____utiliser_l_accelerateur
);
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("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("interpoler_lineairement=""lineaire=""bilineaire="
,FAload_point_coordonnees_01_____utiliser_l_interpolation_bilineaire
,FFAload_point_coordonnees_01_____utiliser_l_interpolation_bilineaire
);
/* Arguments completes ("interpoler_lineairement=") le 20150305104710 pour ameliorer */
/* les sorties de "use"... */
GET_ARGUMENTS2_N("interpoler_cubiquement=""cubique=""bicubique="
,FAload_point_coordonnees_01_____utiliser_l_interpolation_bilineaire
,FFAload_point_coordonnees_01_____utiliser_l_interpolation_bilineaire
);
/* Arguments completes ("interpoler_cubiquement=") le 20150305104710 pour ameliorer */
/* les sorties de "use"... */
GET_ARGUMENT_L("binariser_album=""binariser=",binariser_l_album);
GET_ARGUMENT_P("Pseuil=""Ps=",seuil);
GET_ARGUMENT_P("Pinferieur=""Pinf=",niveau_inferieur);
GET_ARGUMENT_P("Psuperieur=""Psup=",niveau_superieur);
GET_ARGUMENT_F("Fseuil=""Fs=""seuil=""s=",Fseuil);
GET_ARGUMENT_F("Finferieur=""Finf=""inferieur=""inf=",Fniveau_inferieur);
GET_ARGUMENT_F("Fsuperieur=""Fsup=""superieur=""sup=",Fniveau_superieur);
)
);
DEFINITION_DE_LA_MATRICE_DE_ROTATION_POUR_LA_ROTATION;
/* Definition de la matrice de rotation... */
/* */
/* ATTENTION : on notera l'usage de 'DEFINITION_DE_LA_MATRICE_DE_ROTATION_POUR_LA_ROTATION' */
/* definie dans 'v $xci/rotate_3D.11$I' a cause de l'operateur 'OPC1(...)' que cette */
/* definition contient et qui ne peut figurer au premier niveau (celui d'un '$K'...). */
TRANSFORMATION_QUELCONQUE_D_UN_ALBUM(Arotation,AFrotation);
/* Mis sous cette forme le 20180506081310... */
ESaveModifyVariable(Logical,FFAload_point_coordonnees_01_____utiliser_l_interpolation_bilineaire);
ESaveModifyVariable(Logical,FAload_point_coordonnees_01_____utiliser_l_interpolation_bilineaire);
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.