/*************************************************************************************************************************************/
/* */
/* F I L T R A G E C O U P E - B A N D E D E S N I V E A U X : */
/* */
/* */
/* Definition : */
/* */
/* Permet de ne conserver que les */
/* niveaux d'une image qui sont hors */
/* le segment [inf,sup] ; les autres */
/* etant remplaces respectivement par */
/* (inf+sup)/2. */
/* */
/* */
/* Author of '$xci/coupe_bande$K' : */
/* */
/* Jean-Francois COLONNA (LACTAMME, 1989??????????). */
/* */
/*************************************************************************************************************************************/
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* 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
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* P A R A M E T R E S : */
/* */
/*************************************************************************************************************************************/
#define FORCER_LE_NOIR \
VRAI \
/* Cet indicateur precise la methode de visualisation de ce qui est exclu : */ \
/* */ \
/* VRAI : on utilise 'NIVEAU_COUPE_BANDE', */ \
/* FAUX : on utilise 'MOYE(seuil_inferieur,seuil_superieur)'. */ \
/* */
#define SEUIL_INFERIEUR \
NOIR_PLANCHER \
/* Seuil inferieur du filtre, */
#define SEUIL_SUPERIEUR \
PRED(BLANC) \
/* Seuil superieur du filtre. */
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* M A C R O S U T I L E S : */
/* */
/*************************************************************************************************************************************/
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* F I L T R A G E C O U P E - B A N D E D E S N I V E A U X : */
/* */
/*************************************************************************************************************************************/
BCommande(nombre_d_arguments,arguments)
/*-----------------------------------------------------------------------------------------------------------------------------------*/
Bblock
DEFV(CHAR,INIC(POINTERc(nom_imageR),NOM_PIPE));
DEFV(CHAR,INIC(POINTERc(nom_imageA),NOM_PIPE));
DEFV(Logical,INIT(forcer_le_NOIR,FORCER_LE_NOIR));
/* Cet indicateur precise la methode de visualisation de ce qui est exclu : */
/* */
/* VRAI : on utilise 'NIVEAU_COUPE_BANDE', */
/* FAUX : on utilise 'MOYE(seuil_inferieur,seuil_superieur)'. */
/* */
DEFV(genere_p,INIT(seuil_inferieur,SEUIL_INFERIEUR));
DEFV(genere_p,INIT(seuil_superieur,SEUIL_SUPERIEUR));
/* Definition du filtre coupe-bande. */
/*..............................................................................................................................*/
GET_ARGUMENTSi(nombre_d_arguments
,BLOC(GET_ARGUMENT_C("imageA=""A=",nom_imageA);
GET_ARGUMENT_C("imageR=""R=",nom_imageR);
GET_ARGUMENT_L("noir=""n=""NOIR=",forcer_le_NOIR);
GET_ARGUMENT_P("niveau_intermediaire=",Icoupe_bande_____niveau_intermediaire);
GET_ARGUMENT_P("seuil_inferieur=""inf=",seuil_inferieur);
GET_ARGUMENT_P("sup=""seuil_superieur=",seuil_superieur);
GET_ARGUMENT_L("strict_gauche=",Icoupe_bande_____tests_stricts_a_gauche);
GET_ARGUMENT_L("strict_droite=",Icoupe_bande_____tests_stricts_a_droite);
)
);
CALi(Inoir(ImageR));
/* Initialisation de l'image Resultat. */
Test(PAS_D_ERREUR(CODE_ERROR(Iload_image(ImageA,nom_imageA))))
Bblock
CALS(Icoupe_bande(ImageR,ImageA,seuil_inferieur,seuil_superieur,forcer_le_NOIR));
CALi(Iupdate_image(nom_imageR,ImageR));
Eblock
ATes
Bblock
Test__CODE_ERREUR__ERREUR07;
Eblock
ETes
RETU_Commande;
Eblock
ECommande