/*************************************************************************************************************************************/
/* */
/* C O N V E R S I O N D ' U N C O U P L E D ' I M A G E S ( X , Y ) */
/* E N U N C O U P L E D ' I M A G E S ( M O D U L E , P H A S E ) : */
/* */
/* */
/* Definition : */
/* */
/* Cette commande genere deux images */
/* qui representent le module et la phase */
/* du couple d'images Argument considerees */
/* comme etant des coordonnees cartesiennes. */
/* */
/* */
/* Author of '$xci/XY_RT$K' : */
/* */
/* Jean-Francois COLONNA (LACTAMME, 1993??????????). */
/* */
/*************************************************************************************************************************************/
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* 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_QUAD_IMAGE_EXT
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* P A R A M E T R E S : */
/* */
/*************************************************************************************************************************************/
#include xci/genere_ch.01.I"
#define ALPHA_X \
FU \
/* Ponderation 'alpha' des niveaux convertis en coordonnees 'X'. */
#define BETA_X \
FZERO \
/* Ponderation 'alpha' des coordonnees 'X'. */
#define ALPHA_Y \
FU \
/* Ponderation 'alpha' des niveaux convertis en coordonnees 'Y'. */
#define BETA_Y \
FZERO \
/* Ponderation 'alpha' des coordonnees 'Y'. */
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* M A C R O S U T I L E S : */
/* */
/*************************************************************************************************************************************/
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* C O N V E R S I O N D ' U N C O U P L E D ' I M A G E S ( X , Y ) */
/* E N U N C O U P L E D ' I M A G E S ( M O D U L E , P H A S E ) : */
/* */
/*************************************************************************************************************************************/
BCommande(nombre_d_arguments,arguments)
/*-----------------------------------------------------------------------------------------------------------------------------------*/
Bblock
DEFV(CHAR,INIC(POINTERc(nom_imageRR),NOM_PIPE));
DEFV(CHAR,INIC(POINTERc(nom_imageRT),NOM_PIPE));
DEFV(CHAR,INIC(POINTERc(nom_imageAX),NOM_PIPE));
DEFV(CHAR,INIC(POINTERc(nom_imageAY),NOM_PIPE));
#include xci/genere_ch.02.I"
DEFV(Float,INIT(alpha_X,ALPHA_X));
/* Ponderation 'alpha' des niveaux convertis en coordonnees 'X'. */
DEFV(Float,INIT(beta_X,BETA_X));
/* Ponderation 'alpha' des coordonnees 'X'. */
DEFV(Float,INIT(alpha_Y,ALPHA_Y));
/* Ponderation 'alpha' des niveaux convertis en coordonnees 'Y'. */
DEFV(Float,INIT(beta_Y,BETA_Y));
/* Ponderation 'alpha' des coordonnees 'Y'. */
/*..............................................................................................................................*/
#include xci/genere_ch.03.I"
GET_ARGUMENTSi(nombre_d_arguments
,BLOC(GET_ARGUMENT_C("imageAX=""AX=",nom_imageAX);
GET_ARGUMENT_C("imageAY=""AY=",nom_imageAY);
GET_ARGUMENT_C("imageRR=""imageRM=""RR=""RM=",nom_imageRR);
GET_ARGUMENT_C("imageRT=""imageRP=""RT=""RP=",nom_imageRT);
GET_ARGUMENT_F("amplificateur=""a=",amplificateur_de_la_fonction);
GET_ARGUMENT_F("translateur=""t=""T=",translateur_de_la_fonction);
GET_ARGUMENT_F("Tx=",ASD1(translation,dx));
GET_ARGUMENT_F("Ty=",ASD1(translation,dy));
GET_ARGUMENT_F("Ex=",ASD1(echelle,cx));
GET_ARGUMENT_F("Ey=",ASD1(echelle,cy));
GET_ARGUMENT_F("ax=""aX=",alpha_X);
GET_ARGUMENT_F("bx=""bX=",beta_X);
GET_ARGUMENT_F("ay=""aY=",alpha_Y);
GET_ARGUMENT_F("by=""bY=",beta_Y);
)
);
CALi(Inoir(ImageA3));
CALi(Inoir(ImageA3));
/* Initialisation des images Resultats. */
Test(PAS_D_ERREUR(CODE_ERROR(Iload_image(ImageA1,nom_imageAX))))
Bblock
/* Chargement de la premiere image Argument ('X'). */
Test(PAS_D_ERREUR(CODE_ERROR(Iload_image(ImageA2,nom_imageAY))))
Bblock
/* Chargement de la deuxieme image Argument ('Y'). */
BDEFV(imageF,image_coordonnees_X);
BDEFV(imageF,image_coordonnees_Y);
/* Definition des matrices {X,Y} en flottant. */
BDEFV(imageF,image_niveaux_X);
BDEFV(imageF,image_niveaux_Y);
/* Definition des matrices des niveaux convertis en coordonnees {X,Y} en flottant. */
BDEFV(imageF,image_rho);
BDEFV(imageF,image_theta);
/* Definition des matrices (rho.theta) en flottant. */
CALS(IFgenere_champ(image_coordonnees_X
,amplificateur_de_la_fonction,aFONCTION(Fneutre_X),translateur_de_la_fonction
,ADRESSE(translation)
,ADRESSE(echelle)
,Zf_ARGUMENT_INUTILE
,Tf_ARGUMENT_INUTILE
)
);
CALS(IFgenere_champ(image_coordonnees_Y
,amplificateur_de_la_fonction,aFONCTION(Fneutre_Y),translateur_de_la_fonction
,ADRESSE(translation)
,ADRESSE(echelle)
,Zf_ARGUMENT_INUTILE
,Tf_ARGUMENT_INUTILE
)
);
/* Generation des deux images "coordonnees"... */
CALS(Istd_float(image_niveaux_X,NEGA(______________BLANC_NORMALISE),NEUT(______________BLANC_NORMALISE),ImageA1));
CALS(Istd_float(image_niveaux_Y,NEGA(______________BLANC_NORMALISE),NEUT(______________BLANC_NORMALISE),ImageA2));
/* Conversion des images Argument {X,Y} en flottant dans [-1,+1] afin d'avoir l'origine des */
/* coordonnees (0,0) au centre des deux images... */
CALS(IFinterpolation(image_niveaux_X,alpha_X,image_niveaux_X,beta_X,image_coordonnees_X));
CALS(IFinterpolation(image_niveaux_Y,alpha_Y,image_niveaux_Y,beta_Y,image_coordonnees_Y));
/* Puis combinaison des niveaux et des coordonnees... */
CALS(Iconversion_XY_RT(image_rho,image_theta,image_niveaux_X,image_niveaux_Y));
/* Et conversion en {rho,theta}. */
CALS(Ifloat_std_avec_renormalisation(ImageA3,image_rho));
CALS(Ifloat_std(ImageA4,image_theta,FZERO,CERCLE_TRIGONOMETRIQUE));
/* Et enfin, conversion en image 'Std'... */
CALi(Iupdate_image(nom_imageRR,ImageA3));
CALi(Iupdate_image(nom_imageRT,ImageA4));
EDEFV(imageF,image_theta);
EDEFV(imageF,image_rho);
/* Definition des matrices (rho.theta) en flottant. */
EDEFV(imageF,image_niveaux_Y);
EDEFV(imageF,image_niveaux_X);
/* Definition des matrices {X,Y} en flottant. */
EDEFV(imageF,image_coordonnees_Y);
EDEFV(imageF,image_coordonnees_X);
/* Definition des matrices {X,Y} en flottant. */
Eblock
ATes
Bblock
Test__CODE_ERREUR__ERREUR07;
Eblock
ETes
Eblock
ATes
Bblock
Test__CODE_ERREUR__ERREUR07;
Eblock
ETes
RETU_Commande;
Eblock
ECommande