/*************************************************************************************************************************************/
/* */
/* C A L C U L D E L A D E F O R M A T I O N D E P A S S A G E D ' U N E I M A G E A U N E A U T R E : */
/* */
/* */
/* Author of '$xci/GenDeform.01$K' : */
/* */
/* Jean-Francois COLONNA (LACTAMME, 20120613182001). */
/* */
/*************************************************************************************************************************************/
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* I N T E R F A C E ' listG ' : */
/* */
/* */
/* :Debut_listG: */
/* :Fin_listG: */
/* */
/*************************************************************************************************************************************/
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* D I R E C T I V E S S P E C I F I Q U E S D E C O M P I L A T I O N : */
/* */
/*************************************************************************************************************************************/
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* F I C H I E R S D ' I N C L U D E S : */
/* */
/*************************************************************************************************************************************/
#include INCLUDES_BASE
#include image_image_IMAGESF_EXT
#include image_image_QUAD_IMAGE_EXT
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* P A R A M E T R E S : */
/* */
/*************************************************************************************************************************************/
#define SEUIL_DE_DEFINITION_DU_CONTOUR_C1 \
FDU
#define SEUIL_DE_DEFINITION_DU_CONTOUR_C2 \
FDU
/* Definition des seuils de definition des contours. */
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* M A C R O S U T I L E S : */
/* */
/*************************************************************************************************************************************/
#define imageA_contour_C1 \
IFmageA1
#define imageA_contour_C2 \
IFmageA2
#define imageR_deformation_X \
IFmageR1
#define imageR_deformation_Y \
IFmageR2
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* C A L C U L D E L A D E F O R M A T I O N D E P A S S A G E D ' U N E I M A G E A U N E A U T R E : */
/* */
/*************************************************************************************************************************************/
BCommande(nombre_d_arguments,arguments)
/*-----------------------------------------------------------------------------------------------------------------------------------*/
Bblock
DEFV(CHAR,INIC(POINTERc(nom_imageR1),NOM_PIPE));
DEFV(CHAR,INIC(POINTERc(nom_imageR2),NOM_PIPE));
DEFV(CHAR,INIC(POINTERc(nom_imageA1),NOM_PIPE));
DEFV(CHAR,INIC(POINTERc(nom_imageA2),NOM_PIPE));
DEFV(genere_Float,INIT(seuil_de_definition_du_contour_C1,SEUIL_DE_DEFINITION_DU_CONTOUR_C1));
DEFV(genere_Float,INIT(seuil_de_definition_du_contour_C2,SEUIL_DE_DEFINITION_DU_CONTOUR_C2));
/* Definition des seuils de definition des contours. */
/*..............................................................................................................................*/
BSaveModifyVariable(Logical,FFload_point_coordonnees_01_____utiliser_l_interpolation_bilineaire,VRAI);
/* Par defaut... */
BSaveModifyVariable(Logical,S_ACCELERATEUR__ILOAD_POINT_COORDONNEES_01_____utiliser_l_accelerateur,FAUX);
/* Introduit le 20120620091750... */
GET_ARGUMENTSi(nombre_d_arguments
,BLOC(GET_ARGUMENT_C("imageA1=""A1=""contour1=""C1=",nom_imageA1);
GET_ARGUMENT_C("imageA2=""A2=""contour2=""C2=",nom_imageA2);
GET_ARGUMENT_C("imageR1=""R1=""deformationX=""dX=",nom_imageR1);
GET_ARGUMENT_C("imageR2=""R2=""deformationY=""dY=",nom_imageR2);
GET_ARGUMENT_F("seuil_contour_1=""seuil1=""s1=",seuil_de_definition_du_contour_C1);
GET_ARGUMENT_F("seuil_contour_2=""seuil2=""s2=",seuil_de_definition_du_contour_C2);
GET_ARGUMENT_L("seuil_strict=""ss=",IFdeformation_de_passage_d_une_image_a_une_autre_____seuil_strict);
GET_ARGUMENT_L("arrondir_G12=""aG12="
,IFdeformation_de_passage_d_une_image_a_une_autre_____arrondir_centre_de_gravite________G12
);
GET_ARGUMENT_L("arrondir_P1=""aP1="
,IFdeformation_de_passage_d_une_image_a_une_autre_____arrondir_point_courant_interieur___P1
);
GET_ARGUMENT_L("arrondir_C12=""aC12="
,IFdeformation_de_passage_d_une_image_a_une_autre_____arrondir_point_courant_du_contour_C12
);
/* Arguments introduits le 20120619102831... */
GET_ARGUMENT_L("lister_coordonnees=""lc="
,IFdeformation_de_passage_d_une_image_a_une_autre_____lister_les_coordonnees_utiles
);
/* Arguments introduits le 20120618154537... */
GET_ARGUMENT_L("lister_coordonnees_G1=""lcG1="
,IFdeformation_de_passage_d_une_image_a_une_autre_____lister_les_coordonnees_utiles__G1
);
GET_ARGUMENT_L("lister_coordonnees_G2=""lcG2="
,IFdeformation_de_passage_d_une_image_a_une_autre_____lister_les_coordonnees_utiles__G2
);
GET_ARGUMENT_L("lister_coordonnees_XY=""lcXY="
,IFdeformation_de_passage_d_une_image_a_une_autre_____lister_les_coordonnees_utiles__XY
);
GET_ARGUMENT_L("lister_coordonnees_C1=""lcC1="
,IFdeformation_de_passage_d_une_image_a_une_autre_____lister_les_coordonnees_utiles__C1
);
GET_ARGUMENT_L("lister_coordonnees_C2=""lcC2="
,IFdeformation_de_passage_d_une_image_a_une_autre_____lister_les_coordonnees_utiles__C2
);
GET_ARGUMENT_L("lister_coordonnees_pas=""lcpas="
,IFdeformation_de_passage_d_une_image_a_une_autre_____lister_les_coordonnees_utiles__pas
);
GET_ARGUMENT_L("lister_coordonnees_similitude=""lcsimilitude="
,IFdeformation_de_passage_d_une_image_a_une_autre_____lister_les_coordonnees_utiles__similitude
);
GET_ARGUMENTS2_L("lister_coordonnees_P2P1=""lcP2P1="
,IFdeformation_de_passage_d_une_image_a_une_autre_____lister_les_coordonnees_utiles__P2
,IFdeformation_de_passage_d_une_image_a_une_autre_____lister_les_coordonnees_utiles__P1
);
/* Arguments introduits le 20120618170913... */
GET_ARGUMENT_L("acces_simplifie=""as=",IFdeformation_de_passage_d_une_image_a_une_autre_____acces_simplifie);
GET_ARGUMENT_L("AccelerateurILoadPoint=""AccILP="
,S_ACCELERATEUR__ILOAD_POINT_COORDONNEES_01_____utiliser_l_accelerateur
);
/* Arguments introduits le 20120619134623... */
GET_ARGUMENT_L("interpoler=""inter="
,FFload_point_coordonnees_01_____interpoler_bilineairement_ou_bicubiquement
);
GET_ARGUMENT_N("ne_pas_interpoler=""ninter="
,FFload_point_coordonnees_01_____interpoler_bilineairement_ou_bicubiquement
);
GET_ARGUMENT_F("interpolerX=""interX="
,FFload_point_coordonnees_01_____ponderation_du_barycentre_d_interpolation_X
);
GET_ARGUMENT_F("interpolerY=""interY="
,FFload_point_coordonnees_01_____ponderation_du_barycentre_d_interpolation_Y
);
GET_ARGUMENT_L("lineaire=""bilineaire="
,FFload_point_coordonnees_01_____utiliser_l_interpolation_bilineaire
);
GET_ARGUMENT_N("cubique=""bicubique="
,FFload_point_coordonnees_01_____utiliser_l_interpolation_bilineaire
);
GET_ARGUMENT_L("appliquer_une_matrice_de_transformation=""matrice=""transformation="
,FFload_point_coordonnees_01_____appliquer_une_matrice_de_transformation
);
GET_ARGUMENT_F("mxx=""mtxx=",ASD2(FFload_point_coordonnees_01_____matrice_de_transformation,cx,cx));
GET_ARGUMENT_F("mxy=""mtxy=",ASD2(FFload_point_coordonnees_01_____matrice_de_transformation,cx,cy));
GET_ARGUMENT_F("mxz=""mtxz=",ASD2(FFload_point_coordonnees_01_____matrice_de_transformation,cx,cz));
GET_ARGUMENT_F("myx=""mtyx=",ASD2(FFload_point_coordonnees_01_____matrice_de_transformation,cy,cx));
GET_ARGUMENT_F("myy=""mtyy=",ASD2(FFload_point_coordonnees_01_____matrice_de_transformation,cy,cy));
GET_ARGUMENT_F("myz=""mtyz=",ASD2(FFload_point_coordonnees_01_____matrice_de_transformation,cy,cz));
GET_ARGUMENT_F("mzx=""mtzx=",ASD2(FFload_point_coordonnees_01_____matrice_de_transformation,cz,cx));
GET_ARGUMENT_F("mzy=""mtzy=",ASD2(FFload_point_coordonnees_01_____matrice_de_transformation,cz,cy));
GET_ARGUMENT_F("mzz=""mtzz=",ASD2(FFload_point_coordonnees_01_____matrice_de_transformation,cz,cz));
GET_ARGUMENT_F("z=""Z=""Zf=",FFload_point_coordonnees_01_____Zf);
GET_ARGUMENT_F("pre_atrx=",FFload_point_coordonnees_01_____PreAntiTranslation_Xf);
GET_ARGUMENT_F("post_trx=",FFload_point_coordonnees_01_____Post___Translation_Xf);
GET_ARGUMENT_F("pre_atry=",FFload_point_coordonnees_01_____PreAntiTranslation_Yf);
GET_ARGUMENT_F("post_try=",FFload_point_coordonnees_01_____Post___Translation_Yf);
GET_ARGUMENT_L("periodiser_X=""per_X=",IFdeformation_de_passage_d_une_image_a_une_autre_____periodiser_X);
GET_ARGUMENT_L("symetriser_X=""sym_X=",IFdeformation_de_passage_d_une_image_a_une_autre_____symetriser_X);
GET_ARGUMENT_L("prolonger_X=""pro_X=",IFdeformation_de_passage_d_une_image_a_une_autre_____prolonger_X);
GET_ARGUMENT_L("periodiser_Y=""per_Y=",IFdeformation_de_passage_d_une_image_a_une_autre_____periodiser_Y);
GET_ARGUMENT_L("symetriser_Y=""sym_Y=",IFdeformation_de_passage_d_une_image_a_une_autre_____symetriser_Y);
GET_ARGUMENT_L("prolonger_Y=""pro_Y=",IFdeformation_de_passage_d_une_image_a_une_autre_____prolonger_Y);
GET_ARGUMENT_F("niveau_hors_image=""nhi="
,IFdeformation_de_passage_d_une_image_a_une_autre_____niveau_hors_image
);
)
);
CALi(IFinitialisation(imageR_deformation_X,FZERO));
CALi(IFinitialisation(imageR_deformation_Y,FZERO));
/* Initialisation des images Resultat. */
Test(PAS_D_ERREUR(CODE_ERROR(IloadF_image(imageA_contour_C1,nom_imageA1))))
Bblock
Test(PAS_D_ERREUR(CODE_ERROR(IloadF_image(imageA_contour_C2,nom_imageA2))))
Bblock
CALS(IFdeformation_de_passage_d_une_image_a_une_autre(imageR_deformation_X,imageR_deformation_Y
,imageA_contour_C1,seuil_de_definition_du_contour_C1
,imageA_contour_C2,seuil_de_definition_du_contour_C2
)
);
CALi(IupdateF_image(nom_imageR1,imageR_deformation_X));
CALi(IupdateF_image(nom_imageR2,imageR_deformation_Y));
Eblock
ATes
Bblock
Test__CODE_ERREUR__ERREUR07;
Eblock
ETes
Eblock
ATes
Bblock
Test__CODE_ERREUR__ERREUR07;
Eblock
ETes
ESaveModifyVariable(Logical,S_ACCELERATEUR__ILOAD_POINT_COORDONNEES_01_____utiliser_l_accelerateur);
ESaveModifyVariable(Logical,FFload_point_coordonnees_01_____utiliser_l_interpolation_bilineaire);
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.