_______________________________________________________________________________________________________________________________________ /*************************************************************************************************************************************/ /* */ /* P R I M I T I V E S D ' A C C E S A U X P I X E L S S O U S F O R M E D E " F O N C T I O N S " : */ /* */ /* */ /* Definition : */ /* */ /* Dans ce fichier se trouvent toutes les */ /* primitives d'acces aux pixels d'une */ /* image raster ; elles sont exprimees */ /* sous forme de fonctions ce qui fait */ /* que la duree d'execution par rapport */ /* aux "defines" est tres allongee... */ /* */ /* */ /* N O T A T I O N S : */ /* */ /* */ /* On notera 'imageA' les images Arguments, */ /* et 'imageR' les images Resultats ; 'arg' */ /* designera des arguments, et 'Vf' une */ /* fonction "variable"... */ /* */ /* */ /* Author of '$xiipf/fonction.1$FON' : */ /* */ /* Jean-Francois Colonna (LACTAMME, 19870000000000). */ /* */ /*************************************************************************************************************************************/ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* F O N C T I O N N E U T R E : */ /* */ /*************************************************************************************************************************************/ BFonctionP DEFV(Common,DEFV(FonctionP,VNEUT(argument))) DEFV(Argument,DEFV(genere_p,argument)); /* Argument. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock /*..............................................................................................................................*/ RETU(NEUT(argument)); Eblock EFonctionP /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* R E N V O I D U P R E M I E R A R G U M E N T : */ /* */ /*************************************************************************************************************************************/ BFonctionP DEFV(Common,DEFV(FonctionP,VNEUTRE1(arg1,arg2))) DEFV(Argument,DEFV(genere_p,arg1)); /* Premier argument. */ DEFV(Argument,DEFV(genere_p,arg2)); /* Deuxieme argument. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock /*..............................................................................................................................*/ RETU(arg1); Eblock EFonctionP /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* R E N V O I D U D E U X I E M E A R G U M E N T : */ /* */ /*************************************************************************************************************************************/ BFonctionP DEFV(Common,DEFV(FonctionP,VNEUTRE2(arg1,arg2))) DEFV(Argument,DEFV(genere_p,arg1)); /* Premier argument. */ DEFV(Argument,DEFV(genere_p,arg2)); /* Deuxieme argument. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock /*..............................................................................................................................*/ RETU(arg2); Eblock EFonctionP /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* R E N V O I D U D E U X I E M E A R G U M E N T ( P L U S S I M P L E ) : */ /* */ /*************************************************************************************************************************************/ BFonctionP DEFV(Common,DEFV(FonctionP,VNEUTRE(arg1,arg2))) DEFV(Argument,DEFV(genere_p,arg1)); /* Premier argument. */ DEFV(Argument,DEFV(genere_p,arg2)); /* Deuxieme argument. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock /*..............................................................................................................................*/ RETU(VNEUTRE2(arg1,arg2)); Eblock EFonctionP /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* V A L E U R A B S O L U E D ' U N E V A L E U R : */ /* */ /*************************************************************************************************************************************/ BFonctionP DEFV(Common,DEFV(FonctionP,VABS(argument))) DEFV(Argument,DEFV(genere_p,argument)); /* Argument. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock /*..............................................................................................................................*/ RETU(ABSO(argument)); Eblock EFonctionP /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* A D D I T I O N D E D E U X V A L E U R S : */ /* */ /*************************************************************************************************************************************/ BFonctionP DEFV(Common,DEFV(FonctionP,VADD(arg1,arg2))) DEFV(Argument,DEFV(genere_p,arg1)); /* Premier argument. */ DEFV(Argument,DEFV(genere_p,arg2)); /* Deuxieme argument. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock /*..............................................................................................................................*/ RETU(ADD2(arg1,arg2)); Eblock EFonctionP /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* S O U S T R A C T I O N D E D E U X V A L E U R S : */ /* */ /*************************************************************************************************************************************/ BFonctionP DEFV(Common,DEFV(FonctionP,VSUB(arg1,arg2))) DEFV(Argument,DEFV(genere_p,arg1)); /* Premier argument. */ DEFV(Argument,DEFV(genere_p,arg2)); /* Deuxieme argument. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock /*..............................................................................................................................*/ RETU(SOUS(arg1,arg2)); Eblock EFonctionP /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* C O M P L E M E N T A T I O N D ' U N E V A L E U R : */ /* */ /*************************************************************************************************************************************/ BFonctionP DEFV(Common,DEFV(FonctionP,VCOMP(argument))) DEFV(Argument,DEFV(genere_p,argument)); /* Argument. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock /*..............................................................................................................................*/ RETU(SOUS(BLANC,argument)); Eblock EFonctionP /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* M U L T I P L I C A T I O N D E D E U X V A L E U R S : */ /* */ /*************************************************************************************************************************************/ BFonctionP DEFV(Common,DEFV(FonctionP,VMUL(arg1,arg2))) DEFV(Argument,DEFV(genere_p,arg1)); /* Premier argument. */ DEFV(Argument,DEFV(genere_p,arg2)); /* Deuxieme argument. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock /*..............................................................................................................................*/ RETU(MUL2(arg1,arg2)); Eblock EFonctionP /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* M U L T I P L I C A T I O N D E D E U X V A L E U R S ( F L O T T A N T E E T E N T I E R E ) : */ /* */ /*************************************************************************************************************************************/ BFonctionP DEFV(Common,DEFV(FonctionP,VMULF(arg1,arg2))) DEFV(Argument,DEFV(Float,arg1)); /* Premier argument (flottant). */ DEFV(Argument,DEFV(genere_p,arg2)); /* Deuxieme argument (entier). */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock /*..............................................................................................................................*/ RETU(MUL2(arg1,arg2)); Eblock EFonctionP /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* D I V I S I O N D E D E U X V A L E U R S : */ /* */ /*************************************************************************************************************************************/ BFonctionP DEFV(Common,DEFV(FonctionP,VDIV(arg1,arg2))) DEFV(Argument,DEFV(genere_p,arg1)); /* Premier argument (dividende). */ DEFV(Argument,DEFV(genere_p,arg2)); /* Deuxieme argument (diviseur). */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock DEFV(genere_p,INIT(resultat,NIVEAU_UNDEF)); /* Variable de manoeuvre. */ /*..............................................................................................................................*/ Test(IZEQ(arg2)) Bblock PRINT_ATTENTION("division par zero"); EGAL(resultat,NIVEAU_UNDEF); Eblock ATes Bblock Eblock ETes Test(IZNE(arg2)) Bblock EGAL(resultat,DIVI(arg1,arg2)); Eblock ATes Bblock Eblock ETes RETU(resultat); Eblock EFonctionP /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* M A X I M U M D E D E U X V A L E U R S ( " O U " F L O U ) : */ /* */ /*************************************************************************************************************************************/ BFonctionP DEFV(Common,DEFV(FonctionP,VMAX(arg1,arg2))) DEFV(Argument,DEFV(genere_p,arg1)); /* Premier argument. */ DEFV(Argument,DEFV(genere_p,arg2)); /* Deuxieme argument. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock /*..............................................................................................................................*/ RETU(MAX2(arg1,arg2)); Eblock EFonctionP /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* M I N I M U M D E D E U X V A L E U R S ( " E T " F L O U ) : */ /* */ /*************************************************************************************************************************************/ BFonctionP DEFV(Common,DEFV(FonctionP,VMIN(arg1,arg2))) DEFV(Argument,DEFV(genere_p,arg1)); /* Premier argument. */ DEFV(Argument,DEFV(genere_p,arg2)); /* Deuxieme argument. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock /*..............................................................................................................................*/ RETU(MIN2(arg1,arg2)); Eblock EFonctionP /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* " O U " E X C L U S I F F L O U D E D E U X V A L E U R S : */ /* */ /*************************************************************************************************************************************/ BFonctionP DEFV(Common,DEFV(FonctionP,VMINMAX(arg1,arg2))) DEFV(Argument,DEFV(genere_p,arg1)); /* Premier argument. */ DEFV(Argument,DEFV(genere_p,arg2)); /* Deuxieme argument. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock /*..............................................................................................................................*/ RETU(VMAX(VMIN(arg1,VCOMP(arg2)),VMIN(VCOMP(arg1),arg2))); Eblock EFonctionP #if ((Format_p==Format_char)||(Format_p==Format_int)) /* Common,DEFV(Fonction,) : la generation depend des conditions... */ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* I N V E R S I O N D ' U N E V A L E U R : */ /* */ /*************************************************************************************************************************************/ BFonctionP DEFV(Common,DEFV(FonctionP,VINVERT(argument))) DEFV(Argument,DEFV(genere_p,argument)); /* Argument. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock /*..............................................................................................................................*/ RETU(OUEX(BLANC,argument)); Eblock EFonctionP #Aif ((Format_p==Format_char)||(Format_p==Format_int)) /* Common,DEFV(Fonction,) : la generation depend des conditions... */ #Eif ((Format_p==Format_char)||(Format_p==Format_int)) /* Common,DEFV(Fonction,) : la generation depend des conditions... */ #if ((Format_p==Format_char)||(Format_p==Format_int)) /* Common,DEFV(Fonction,) : la generation depend des conditions... */ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* ' O R ' D E D E U X V A L E U R S : */ /* */ /*************************************************************************************************************************************/ BFonctionP DEFV(Common,DEFV(FonctionP,VOR(arg1,arg2))) DEFV(Argument,DEFV(genere_p,arg1)); /* Premier argument. */ DEFV(Argument,DEFV(genere_p,arg2)); /* Deuxieme argument. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock /*..............................................................................................................................*/ RETU(OUIN(arg1,arg2)); Eblock EFonctionP #Aif ((Format_p==Format_char)||(Format_p==Format_int)) /* Common,DEFV(Fonction,) : la generation depend des conditions... */ #Eif ((Format_p==Format_char)||(Format_p==Format_int)) /* Common,DEFV(Fonction,) : la generation depend des conditions... */ #if ((Format_p==Format_char)||(Format_p==Format_int)) /* Common,DEFV(Fonction,) : la generation depend des conditions... */ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* ' A N D ' D E D E U X V A L E U R S : */ /* */ /*************************************************************************************************************************************/ BFonctionP DEFV(Common,DEFV(FonctionP,VAND(arg1,arg2))) DEFV(Argument,DEFV(genere_p,arg1)); /* Premier argument. */ DEFV(Argument,DEFV(genere_p,arg2)); /* Deuxieme argument. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock /*..............................................................................................................................*/ RETU(ETLO(arg1,arg2)); Eblock EFonctionP #Aif ((Format_p==Format_char)||(Format_p==Format_int)) /* Common,DEFV(Fonction,) : la generation depend des conditions... */ #Eif ((Format_p==Format_char)||(Format_p==Format_int)) /* Common,DEFV(Fonction,) : la generation depend des conditions... */ #if ((Format_p==Format_char)||(Format_p==Format_int)) /* Common,DEFV(Fonction,) : la generation depend des conditions... */ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* ' E O R ' D E D E U X V A L E U R S : */ /* */ /*************************************************************************************************************************************/ BFonctionP DEFV(Common,DEFV(FonctionP,VEOR(arg1,arg2))) DEFV(Argument,DEFV(genere_p,arg1)); /* Premier argument. */ DEFV(Argument,DEFV(genere_p,arg2)); /* Deuxieme argument. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock /*..............................................................................................................................*/ RETU(OUEX(arg1,arg2)); Eblock EFonctionP #Aif ((Format_p==Format_char)||(Format_p==Format_int)) /* Common,DEFV(Fonction,) : la generation depend des conditions... */ #Eif ((Format_p==Format_char)||(Format_p==Format_int)) /* Common,DEFV(Fonction,) : la generation depend des conditions... */ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* V A L I D A T I O N D E S C O O R D O N N E E S E T A C T I O N : */ /* */ /*************************************************************************************************************************************/ #define ValP(portee_du_masquage,acces_point,point_hors_ecran,point_masque) \ Bblock \ Test(TEST_HORS_IMAGE(X,Y)) \ Bblock \ point_hors_ecran; \ /* Le point argument {X,Y} est hors ecran... */ \ Eblock \ ATes \ Bblock \ Test(TEST_MASQUE_ACTIF(X,Y,portee_du_masquage)) \ Bblock \ acces_point; \ /* Le point argument {X,Y} est dans l'ecran et non masque. */ \ Eblock \ ATes \ Bblock \ point_masque; \ /* Le masque est actif et le point argument {X,Y} est dans l'ecran mais masque. */ \ Eblock \ ETes \ Eblock \ ETes \ Eblock /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* C H A R G E M E N T D ' U N P O I N T " S T A N D A R D " : */ /* */ /*************************************************************************************************************************************/ BFonctionP DEFV(Common,DEFV(FonctionP,load_point(imageA,X,Y))) DEFV(Argument,DEFV(image,imageA)); /* Image contenant le point argument. */ DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock DEFV(genere_p,INIT(point,NIVEAU_UNDEF)); /* Valeur du point courant. */ /*..............................................................................................................................*/ ValP(MASQUER_LOAD ,EGAL(point ,COND(EST_INACTIF_FILTRAGE ,IMAGE(imageA,X,Y) ,Nsubstitution_inverse(IMAGE(imageA,X,Y)) ) ); ,EGAL(point,NIVEAU_HORS_ECRAN); ,EGAL(point,NIVEAU_MASQUE); ); RETU(point); Eblock EFonctionP /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* C H A R G E M E N T D ' U N P O I N T " S T A N D A R D " E T V A L I D A T I O N : */ /* */ /*************************************************************************************************************************************/ BFonctionP DEFV(Common,DEFV(FonctionP,load_point_valide(imageA,X,Y))) DEFV(Argument,DEFV(image,imageA)); /* Image contenant le point argument. */ DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock /*..............................................................................................................................*/ RETU(load_point(imageA,X,Y)); Eblock EFonctionP /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* C H A R G E M E N T D ' U N P O I N T " C H A R " : */ /* */ /*************************************************************************************************************************************/ BFonctionC DEFV(Common,DEFV(FonctionC,loadC_point(imageA,X,Y))) DEFV(Argument,DEFV(imageC,imageA)); /* Image contenant le point argument. */ DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock DEFV(CHAR,INIT(point,NIVEAU_UNDEF)); /* Valeur du point courant. */ /*..............................................................................................................................*/ ValP(MASQUER_LOAD ,EGAL(point,IMAGE(imageA,X,Y)); ,EGAL(point,NIVEAU_HORS_ECRAN); ,EGAL(point,NIVEAU_MASQUE); ); RETU(point); Eblock EFonctionC /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* C H A R G E M E N T D ' U N P O I N T " C H A R " E T V A L I D A T I O N : */ /* */ /*************************************************************************************************************************************/ BFonctionC DEFV(Common,DEFV(FonctionC,loadC_point_valide(imageA,X,Y))) DEFV(Argument,DEFV(imageC,imageA)); /* Image contenant le point argument. */ DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock /*..............................................................................................................................*/ RETU(loadC_point(imageA,X,Y)); Eblock EFonctionC /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* C H A R G E M E N T D ' U N P O I N T " I N T " : */ /* */ /*************************************************************************************************************************************/ BFonctionI DEFV(Common,DEFV(FonctionI,loadI_point(imageA,X,Y))) DEFV(Argument,DEFV(imageI,imageA)); /* Image contenant le point argument. */ DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock DEFV(Int,INIT(point,NIVEAU_UNDEF)); /* Valeur du point courant. */ /*..............................................................................................................................*/ ValP(MASQUER_LOAD ,EGAL(point,IMAGE(imageA,X,Y)); ,EGAL(point,NIVEAU_HORS_ECRAN); ,EGAL(point,NIVEAU_MASQUE); ); RETU(point); Eblock EFonctionI /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* C H A R G E M E N T D ' U N P O I N T " I N T " E T V A L I D A T I O N : */ /* */ /*************************************************************************************************************************************/ BFonctionI DEFV(Common,DEFV(FonctionI,loadI_point_valide(imageA,X,Y))) DEFV(Argument,DEFV(imageI,imageA)); /* Image contenant le point argument. */ DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock /*..............................................................................................................................*/ RETU(loadI_point(imageA,X,Y)); Eblock EFonctionI /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* C H A R G E M E N T D ' U N P O I N T " F L O A T " : */ /* */ /*************************************************************************************************************************************/ BFonctionF DEFV(Common,DEFV(FonctionF,loadF_point(imageA,X,Y))) DEFV(Argument,DEFV(imageF,imageA)); /* Image contenant le point argument. */ DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock DEFV(genere_Float,INIT(point,FLOT__NIVEAU_UNDEF)); /* Valeur du point courant. */ /*..............................................................................................................................*/ ValP(MASQUER_LOAD ,EGAL(point,IMAGE(imageA,X,Y)); ,EGAL(point,NIVEAU_HORS_ECRAN); ,EGAL(point,NIVEAU_MASQUE); ); RETU(point); Eblock EFonctionF /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* C H A R G E M E N T D ' U N P O I N T " F L O A T " E T V A L I D A T I O N : */ /* */ /*************************************************************************************************************************************/ BFonctionF DEFV(Common,DEFV(FonctionF,loadF_point_valide(imageA,X,Y))) DEFV(Argument,DEFV(imageF,imageA)); /* Image contenant le point argument. */ DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock /*..............................................................................................................................*/ RETU(loadF_point(imageA,X,Y)); Eblock EFonctionF /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* R A N G E M E N T D ' U N P O I N T " S T A N D A R D " : */ /* */ /*************************************************************************************************************************************/ BFonctionI DEFV(Common,DEFV(FonctionI,store_point(valeur,imageA,X,Y,ARGUMENT_FONCTION(Vf)))) DEFV(Argument,DEFV(genere_p,valeur)); /* Valeur a donner au point argument (a quelque chose pres...). */ DEFV(Argument,DEFV(image,imageA)); /* Image contenant le point argument. */ DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ DEFV(Argument,DEFV(genere_p,afPOINTEUR(Vf))); /* Fonction a appliquer pour ranger le point ; */ /* on realise le calcul suivant : */ /* imageA[X][Y] = Vf(imageA[X][Y],valeur), */ /* ou "Vf" est l'une des fonctions sur valeur (FVARIABLE, FNEUTRE, FADD,...). */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock INIT_ERROR; DEFV(genere_p,Ncalibrage()); /* Fonction de calibrage du niveau resultant de "Vf". */ /* ATTENTION : pour des raisons pragmatiques, le "calibrage" n'est applique que pour */ /* l'operation de rangement "standard", de meme pour la "substitution" */ /* et l'"ecrasement" !!! */ /*..............................................................................................................................*/ ValP(MASQUER_STORE ,BLOC(Test(EST_INACTIF_FILTRAGE) Bblock EGAL(IMAGE(imageA,X,Y),valeur); Eblock ATes Bblock Test(EST_AUTORISE(Necrasement(load_point(imageA,X,Y)))) Bblock EGAL(IMAGE(imageA,X,Y) ,Nsubstitution(Ncalibrage(fPOINTEUR(Vf)(load_point(imageA,X,Y),valeur))) ); Eblock ATes Bblock Eblock ETes Eblock ETes ) ,BLOC(CODE_ERROR(ERREUR06); ) ,BLOC(VIDE; ) ); RETU_ERROR; Eblock EFonctionI /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* R A N G E M E N T D ' U N P O I N T " S T A N D A R D " E T V A L I D A T I O N : */ /* */ /*************************************************************************************************************************************/ BFonctionI DEFV(Common,DEFV(FonctionI,store_point_valide(valeur,imageA,X,Y,ARGUMENT_FONCTION(Vf)))) DEFV(Argument,DEFV(genere_p,valeur)); /* Valeur a donner au point argument (a quelque chose pres...). */ DEFV(Argument,DEFV(image,imageA)); /* Image contenant le point argument. */ DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ DEFV(Argument,DEFV(genere_p,afPOINTEUR(Vf))); /* Fonction a appliquer pour ranger le point ; */ /* on realise le calcul suivant : */ /* imageA[X][Y] = Vf(imageA[X][Y],valeur), */ /* ou "Vf" est l'une des fonctions sur valeur (FVARIABLE, FNEUTRE, FADD,...). */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock INIT_ERROR; /*..............................................................................................................................*/ store_point(valeur,imageA,X,Y,Vf); RETU_ERROR; Eblock EFonctionI /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* R A N G E M E N T D ' U N P O I N T " C H A R " : */ /* */ /*************************************************************************************************************************************/ BFonctionI DEFV(Common,DEFV(FonctionI,storeC_point(valeur,imageA,X,Y))) DEFV(Argument,DEFV(genere_CHAR,valeur)); /* Valeur a donner au point argument (a quelque chose pres...). */ DEFV(Argument,DEFV(imageC,imageA)); /* Image contenant le point argument. */ DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ /* Nota : la fonction 'Vf' n'est pas utilisee car le type de ses arguments */ /* est variable, alors qu'il est fixe dans son corps ('genere_p'). */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock INIT_ERROR; /*..............................................................................................................................*/ ValP(MASQUER_STORE ,EGAL(IMAGE(imageA,X,Y) ,CAST_CHAR(valeur) ); /* La procedure 'CAST_CHAR(...)' a remplace un 'CAST(genere_CHAR,...)' le 20090331101601. */ ,CODE_ERROR(ERREUR06); ,VIDE; ); RETU_ERROR; Eblock EFonctionI /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* R A N G E M E N T D ' U N P O I N T " C H A R " E T V A L I D A T I O N : */ /* */ /*************************************************************************************************************************************/ BFonctionI DEFV(Common,DEFV(FonctionI,storeC_point_valide(valeur,imageA,X,Y))) DEFV(Argument,DEFV(genere_CHAR,valeur)); /* Valeur a donner au point argument (a quelque chose pres...). */ DEFV(Argument,DEFV(imageC,imageA)); /* Image contenant le point argument. */ DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ /* Nota : la fonction 'Vf' n'est pas utilisee car le type de ses arguments */ /* est variable, alors qu'il est fixe dans son corps ('genere_p'). */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock INIT_ERROR; /*..............................................................................................................................*/ storeC_point(valeur,imageA,X,Y); RETU_ERROR; Eblock EFonctionI /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* R A N G E M E N T D ' U N P O I N T " I N T " : */ /* */ /*************************************************************************************************************************************/ BFonctionI DEFV(Common,DEFV(FonctionI,storeI_point(valeur,imageA,X,Y))) DEFV(Argument,DEFV(genere_Int,valeur)); /* Valeur a donner au point argument (a quelque chose pres...). */ DEFV(Argument,DEFV(imageI,imageA)); /* Image contenant le point argument. */ DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ /* Nota : la fonction 'Vf' n'est pas utilisee car le type de ses arguments */ /* est variable, alors qu'il est fixe dans son corps ('genere_p'). */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock INIT_ERROR; /*..............................................................................................................................*/ ValP(MASQUER_STORE ,EGAL(IMAGE(imageA,X,Y) ,CASP_Int(valeur) ); /* La procedure 'CASP_Int(...)' a remplace un 'CASP(genere_Int,...)' le 20090331103604. */ ,CODE_ERROR(ERREUR06); ,VIDE; ); RETU_ERROR; Eblock EFonctionI /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* R A N G E M E N T D ' U N P O I N T " I N T " E T V A L I D A T I O N : */ /* */ /*************************************************************************************************************************************/ BFonctionI DEFV(Common,DEFV(FonctionI,storeI_point_valide(valeur,imageA,X,Y))) DEFV(Argument,DEFV(genere_Int,valeur)); /* Valeur a donner au point argument (a quelque chose pres...). */ DEFV(Argument,DEFV(imageI,imageA)); /* Image contenant le point argument. */ DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ /* Nota : la fonction 'Vf' n'est pas utilisee car le type de ses arguments */ /* est variable, alors qu'il est fixe dans son corps ('genere_p'). */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock INIT_ERROR; /*..............................................................................................................................*/ storeI_point(valeur,imageA,X,Y); RETU_ERROR; Eblock EFonctionI /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* R A N G E M E N T D ' U N P O I N T " F L O A T " : */ /* */ /*************************************************************************************************************************************/ BFonctionI DEFV(Common,DEFV(FonctionI,storeF_point(valeur,imageA,X,Y))) DEFV(Argument,DEFV(genere_Float,valeur)); /* Valeur a donner au point argument (a quelque chose pres...). */ DEFV(Argument,DEFV(imageF,imageA)); /* Image contenant le point argument. */ DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ /* Nota : la fonction 'Vf' n'est pas utilisee car le type de ses arguments */ /* est variable, alors qu'il est fixe dans son corps ('genere_p'). */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock INIT_ERROR; /*..............................................................................................................................*/ ValP(MASQUER_STORE ,EGAL(IMAGE(imageA,X,Y) ,CASP_Float(valeur) ); /* La procedure 'CASP_Float(...)' a remplace un 'CASP(genere_Float,...)' le 20090331103604. */ ,CODE_ERROR(ERREUR06); ,VIDE; ); RETU_ERROR; Eblock EFonctionI /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* R A N G E M E N T D ' U N P O I N T " F L O A T " E T V A L I D A T I O N : */ /* */ /*************************************************************************************************************************************/ BFonctionI DEFV(Common,DEFV(FonctionI,storeF_point_valide(valeur,imageA,X,Y))) DEFV(Argument,DEFV(genere_Float,valeur)); /* Valeur a donner au point argument (a quelque chose pres...). */ DEFV(Argument,DEFV(imageF,imageA)); /* Image contenant le point argument. */ DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ /* Nota : la fonction 'Vf' n'est pas utilisee car le type de ses arguments */ /* est variable, alors qu'il est fixe dans son corps ('genere_p'). */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock INIT_ERROR; /*..............................................................................................................................*/ storeF_point(valeur,imageA,X,Y); RETU_ERROR; Eblock EFonctionI #undef ValP /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* V A L E U R A B S O L U E D ' U N P O I N T : */ /* */ /*************************************************************************************************************************************/ BFonctionI DEFV(Common,DEFV(FonctionI,PABS(X,Y,imageA,imageR))) DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ DEFV(Argument,DEFV(image,imageA)); /* Image Argument. */ DEFV(Argument,DEFV(image,imageR)); /* Image Resultat, telle que : imageR[X][Y]=min(imageA1[X][Y],imageA2[X][Y]). */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock INIT_ERROR; /*..............................................................................................................................*/ store_point(VABS(load_point(imageA,X,Y)),imageR,X,Y,FVARIABLE); RETU_ERROR; Eblock EFonctionI /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* C O M P L E M E N T A T I O N D ' U N P O I N T : */ /* */ /*************************************************************************************************************************************/ BFonctionI DEFV(Common,DEFV(FonctionI,PCOMP(X,Y,imageA,imageR))) DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ DEFV(Argument,DEFV(image,imageA)); /* Image Argument. */ DEFV(Argument,DEFV(image,imageR)); /* Image Resultat, telle que : imageR[X][Y]=BLANC-imageA[X][Y]. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock INIT_ERROR; /*..............................................................................................................................*/ store_point(VCOMP(load_point(imageA,X,Y)),imageR,X,Y,FVARIABLE); RETU_ERROR; Eblock EFonctionI /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* A D D I T I O N D E D E U X P O I N T S : */ /* */ /*************************************************************************************************************************************/ BFonctionI DEFV(Common,DEFV(FonctionI,PADD(X,Y,imageA1,imageA2,imageR))) DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ DEFV(Argument,DEFV(image,imageA1)); /* Image Argument 1. */ DEFV(Argument,DEFV(image,imageA2)); /* Image Argument 2. */ DEFV(Argument,DEFV(image,imageR)); /* Image Resultat, telle que : imageR[X][Y]=imageA1[X][Y]+imageA2[X][Y]. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock INIT_ERROR; /*..............................................................................................................................*/ store_point(VADD(load_point(imageA1,X,Y),load_point(imageA2,X,Y)),imageR,X,Y,FVARIABLE); RETU_ERROR; Eblock EFonctionI /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* I N T E R P O L A T I O N E N T R E D E U X P O I N T S : */ /* */ /*************************************************************************************************************************************/ BFonctionI DEFV(Common,DEFV(FonctionI,PINTER(X,Y,alpha,imageA1,beta,imageA2,imageR))) DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ DEFV(Argument,DEFV(Float,alpha)); /* Premier coefficient d'interpolation. */ DEFV(Argument,DEFV(image,imageA1)); /* Image Argument 1. */ DEFV(Argument,DEFV(Float,beta)); /* Second coefficient d'interpolation. */ DEFV(Argument,DEFV(image,imageA2)); /* Image Argument 2. */ DEFV(Argument,DEFV(image,imageR)); /* Image Resultat, telle que : imageR[X][Y]=alpha*imageA1[X][Y]+beta*imageA2[X][Y]. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock INIT_ERROR; /*..............................................................................................................................*/ store_point(VADD(VMULF(alpha,load_point(imageA1,X,Y)),VMULF(beta,load_point(imageA2,X,Y))),imageR,X,Y,FVARIABLE); RETU_ERROR; Eblock EFonctionI /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* I N C R E M E N T A T I O N D ' U N E P O I N T : */ /* */ /*************************************************************************************************************************************/ BFonctionI DEFV(Common,DEFV(FonctionI,PINC(X,Y,imageA,increment,imageR))) DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ DEFV(Argument,DEFV(image,imageA)); /* Image argument. */ DEFV(Argument,DEFV(Int,increment)); /* Increment (positif ou negatif). */ DEFV(Argument,DEFV(image,imageR)); /* Image resultat, telle que : imageR[X][Y]=imageA[X][Y]+increment. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock INIT_ERROR; /*..............................................................................................................................*/ store_point(VADD(load_point(imageA,X,Y),increment),imageR,X,Y,FVARIABLE); RETU_ERROR; Eblock EFonctionI /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* S O U S T R A C T I O N D E D E U X P O I N T S : */ /* */ /*************************************************************************************************************************************/ BFonctionI DEFV(Common,DEFV(FonctionI,PSUB(X,Y,imageA1,imageA2,imageR))) DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ DEFV(Argument,DEFV(image,imageA1)); /* Image Argument 1. */ DEFV(Argument,DEFV(image,imageA2)); /* Image Argument 2. */ DEFV(Argument,DEFV(image,imageR)); /* Image Resultat, telle que : imageR[X][Y]=imageA1[X][Y]-imageA2[X][Y]. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock INIT_ERROR; /*..............................................................................................................................*/ store_point(VSUB(load_point(imageA1,X,Y),load_point(imageA2,X,Y)),imageR,X,Y,FVARIABLE); RETU_ERROR; Eblock EFonctionI /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* M U L T I P L I C A T I O N D E D E U X P O I N T S : */ /* */ /*************************************************************************************************************************************/ BFonctionI DEFV(Common,DEFV(FonctionI,PMUL(X,Y,imageA1,imageA2,imageR))) DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ DEFV(Argument,DEFV(image,imageA1)); /* Image Argument 1. */ DEFV(Argument,DEFV(image,imageA2)); /* Image Argument 2. */ DEFV(Argument,DEFV(image,imageR)); /* Image Resultat, telle que : imageR[X][Y]=imageA1[X][Y]*imageA2[X][Y]. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock INIT_ERROR; /*..............................................................................................................................*/ store_point(VMUL(load_point(imageA1,X,Y),load_point(imageA2,X,Y)),imageR,X,Y,FVARIABLE); RETU_ERROR; Eblock EFonctionI /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* M U L T I P L I C A T I O N D ' U N P O I N T P A R U N F L O T T A N T : */ /* */ /*************************************************************************************************************************************/ BFonctionI DEFV(Common,DEFV(FonctionI,PMULF(X,Y,facteur,imageA1,imageR))) DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ DEFV(Argument,DEFV(Float,facteur)); /* Facteur d'echelle. */ DEFV(Argument,DEFV(image,imageA1)); /* Image Argument. */ DEFV(Argument,DEFV(image,imageR)); /* Image Resultat, telle que : imageR[X][Y]=facteur*imageA1[X][Y]. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock INIT_ERROR; /*..............................................................................................................................*/ store_point(VMULF(facteur,load_point(imageA1,X,Y)),imageR,X,Y,FVARIABLE); RETU_ERROR; Eblock EFonctionI /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* D I V I S I O N D E D E U X P O I N T S : */ /* */ /*************************************************************************************************************************************/ BFonctionI DEFV(Common,DEFV(FonctionI,PDIV(X,Y,imageA1,imageA2,imageR))) DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ DEFV(Argument,DEFV(image,imageA1)); /* Image Argument 1. */ DEFV(Argument,DEFV(image,imageA2)); /* Image Argument 2. */ DEFV(Argument,DEFV(image,imageR)); /* Image Resultat, telle que : imageR[X][Y]=imageA1[X][Y]/imageA2[X][Y] sans */ /* entreprendre d'actions particulieres au cas ou le diviseur serait */ /* nul si ce n'est le signaler et donner la valeur "NIVEAU_UNDEF" a l'element */ /* correspondants... */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock INIT_ERROR; /*..............................................................................................................................*/ store_point(VDIV(load_point(imageA1,X,Y),load_point(imageA2,X,Y)),imageR,X,Y,FVARIABLE); RETU_ERROR; Eblock EFonctionI /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* M A X I M U M D E D E U X P O I N T S : */ /* */ /*************************************************************************************************************************************/ BFonctionI DEFV(Common,DEFV(FonctionI,PMAX(X,Y,imageA1,imageA2,imageR))) DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ DEFV(Argument,DEFV(image,imageA1)); /* Image Argument 1. */ DEFV(Argument,DEFV(image,imageA2)); /* Image Argument 2. */ DEFV(Argument,DEFV(image,imageR)); /* Image Resultat, telle que : imageR[X][Y]=max(imageA1[X][Y],imageA2[X][Y]). */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock INIT_ERROR; /*..............................................................................................................................*/ store_point(VMAX(load_point(imageA1,X,Y),load_point(imageA2,X,Y)),imageR,X,Y,FVARIABLE); RETU_ERROR; Eblock EFonctionI /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* M I N I M U M D E D E U X P O I N T S : */ /* */ /*************************************************************************************************************************************/ BFonctionI DEFV(Common,DEFV(FonctionI,PMIN(X,Y,imageA1,imageA2,imageR))) DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ DEFV(Argument,DEFV(image,imageA1)); /* Image Argument 1. */ DEFV(Argument,DEFV(image,imageA2)); /* Image Argument 2. */ DEFV(Argument,DEFV(image,imageR)); /* Image Resultat, telle que : imageR[X][Y]=min(imageA1[X][Y],imageA2[X][Y]). */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock INIT_ERROR; /*..............................................................................................................................*/ store_point(VMIN(load_point(imageA1,X,Y),load_point(imageA2,X,Y)),imageR,X,Y,FVARIABLE); RETU_ERROR; Eblock EFonctionI /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* " O U " E X C L U S I F F L O U D E D E U X P O I N T S : */ /* */ /*************************************************************************************************************************************/ BFonctionI DEFV(Common,DEFV(FonctionI,PMINMAX(X,Y,imageA1,imageA2,imageR))) DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ DEFV(Argument,DEFV(image,imageA1)); /* Image Argument 1. */ DEFV(Argument,DEFV(image,imageA2)); /* Image Argument 2. */ DEFV(Argument,DEFV(image,imageR)); /* Image Resultat, telle que : */ /* */ /* imageR[X][Y]=max(min(comp(imageA1[X][Y]),imageA2[X][Y]), */ /* min(imageA1[X][Y],comp(imageA2[X][Y]))). */ /* */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock INIT_ERROR; /*..............................................................................................................................*/ store_point(VMINMAX(load_point(imageA1,X,Y),load_point(imageA2,X,Y)),imageR,X,Y,FVARIABLE); RETU_ERROR; Eblock EFonctionI #if ((Format_p==Format_char)||(Format_p==Format_int)) /* Common,DEFV(Fonction,) : la generation depend des conditions... */ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* I N V E R S I O N D ' U N P O I N T : */ /* */ /*************************************************************************************************************************************/ BFonctionI DEFV(Common,DEFV(FonctionI,PINVERT(X,Y,imageA,imageR))) DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ DEFV(Argument,DEFV(image,imageA)); /* Image Argument. */ DEFV(Argument,DEFV(image,imageR)); /* Image Resultat, telle que : imageR[X][Y]=.NOT.imageA[X][Y]. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock INIT_ERROR; /*..............................................................................................................................*/ store_point(VINVERT(load_point(imageA,X,Y)),imageR,X,Y,FVARIABLE); RETU_ERROR; Eblock EFonctionI #Aif ((Format_p==Format_char)||(Format_p==Format_int)) /* Common,DEFV(Fonction,) : la generation depend des conditions... */ #Eif ((Format_p==Format_char)||(Format_p==Format_int)) /* Common,DEFV(Fonction,) : la generation depend des conditions... */ #if ((Format_p==Format_char)||(Format_p==Format_int)) /* Common,DEFV(Fonction,) : la generation depend des conditions... */ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* ' O R ' D E D E U X P O I N T S : */ /* */ /*************************************************************************************************************************************/ BFonctionI DEFV(Common,DEFV(FonctionI,POR(X,Y,imageA1,imageA2,imageR))) DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ DEFV(Argument,DEFV(image,imageA1)); /* Image Argument 1. */ DEFV(Argument,DEFV(image,imageA2)); /* Image Argument 2. */ DEFV(Argument,DEFV(image,imageR)); /* Image Resultat, telle que : imageR[X][Y]=imageA1[X][Y].OR.imageA2[X][Y]. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock INIT_ERROR; /*..............................................................................................................................*/ store_point(VOR(load_point(imageA1,X,Y),load_point(imageA2,X,Y)),imageR,X,Y,FVARIABLE); RETU_ERROR; Eblock EFonctionI #Aif ((Format_p==Format_char)||(Format_p==Format_int)) /* Common,DEFV(Fonction,) : la generation depend des conditions... */ #Eif ((Format_p==Format_char)||(Format_p==Format_int)) /* Common,DEFV(Fonction,) : la generation depend des conditions... */ #if ((Format_p==Format_char)||(Format_p==Format_int)) /* Common,DEFV(Fonction,) : la generation depend des conditions... */ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* ' A N D ' D E D E U X P O I N T S : */ /* */ /*************************************************************************************************************************************/ BFonctionI DEFV(Common,DEFV(FonctionI,PAND(X,Y,imageA1,imageA2,imageR))) DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ DEFV(Argument,DEFV(image,imageA1)); /* Image Argument 1. */ DEFV(Argument,DEFV(image,imageA2)); /* Image Argument 2. */ DEFV(Argument,DEFV(image,imageR)); /* Image Resultat, telle que : imageR[X][Y]=imageA1[X][Y].AND.imageA2[X][Y]. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock INIT_ERROR; /*..............................................................................................................................*/ store_point(VAND(load_point(imageA1,X,Y),load_point(imageA2,X,Y)),imageR,X,Y,FVARIABLE); RETU_ERROR; Eblock EFonctionI #Aif ((Format_p==Format_char)||(Format_p==Format_int)) /* Common,DEFV(Fonction,) : la generation depend des conditions... */ #Eif ((Format_p==Format_char)||(Format_p==Format_int)) /* Common,DEFV(Fonction,) : la generation depend des conditions... */ #if ((Format_p==Format_char)||(Format_p==Format_int)) /* Common,DEFV(Fonction,) : la generation depend des conditions... */ /*===================================================================================================================================*/ /*************************************************************************************************************************************/ /* */ /* ' E O R ' D E D E U X P O I N T S : */ /* */ /*************************************************************************************************************************************/ BFonctionI DEFV(Common,DEFV(FonctionI,PEOR(X,Y,imageA1,imageA2,imageR))) DEFV(Argument,DEFV(Int,X)); DEFV(Argument,DEFV(Int,Y)); /* Coordonnees {X,Y} du point argument. */ DEFV(Argument,DEFV(image,imageA1)); /* Image Argument 1. */ DEFV(Argument,DEFV(image,imageA2)); /* Image Argument 2. */ DEFV(Argument,DEFV(image,imageR)); /* Image Resultat, telle que : imageR[X][Y]=imageA1[X][Y].EOR.imageA2[X][Y]. */ /*-----------------------------------------------------------------------------------------------------------------------------------*/ Bblock INIT_ERROR; /*..............................................................................................................................*/ store_point(VEOR(load_point(imageA1,X,Y),load_point(imageA2,X,Y)),imageR,X,Y,FVARIABLE); RETU_ERROR; Eblock EFonctionI #Aif ((Format_p==Format_char)||(Format_p==Format_int)) /* Common,DEFV(Fonction,) : la generation depend des conditions... */ #Eif ((Format_p==Format_char)||(Format_p==Format_int)) /* Common,DEFV(Fonction,) : la generation depend des conditions... */ _______________________________________________________________________________________________________________________________________