Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals

imalabel.c

Go to the documentation of this file.
00001 /************************************************************************* 00002 * $Id: imalabel.c,v 1.1 2005/09/09 08:22:48 bellet Exp $ 00003 ************************************************************************** 00004 This software is governed by the CeCILL license under French law and 00005 abiding by the rules of distribution of free software. You can use, 00006 modify and/ or redistribute the software under the terms of the CeCILL 00007 license as circulated by CEA, CNRS and INRIA at the following URL 00008 "http://www.cecill.info". 00009 00010 As a counterpart to the access to the source code and rights to copy, 00011 modify and redistribute granted by the license, users are provided only 00012 with a limited warranty and the software's author, the holder of the 00013 economic rights, and the successive licensors have only limited 00014 liability. 00015 00016 In this respect, the user's attention is drawn to the risks associated 00017 with loading, using, modifying and/or developing or reproducing the 00018 software by the user in light of its specific status of free software, 00019 that may mean that it is complicated to manipulate, and that also 00020 therefore means that it is reserved for developers and experienced 00021 professionals having in-depth computer knowledge. Users are therefore 00022 encouraged to load and test the software's suitability as regards their 00023 requirements in conditions enabling the security of their systems and/or 00024 data to be ensured and, more generally, to use and operate it in the 00025 same conditions as regards security. 00026 00027 The fact that you are presently reading this means that you have had 00028 knowledge of the CeCILL license and that you accept its terms. 00029 00030 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de 00031 l'Image). All rights reserved. See License.txt for details. 00032 00033 Version 1.0 05/09/2005 00034 *************************************************************************/ 00035 00036 #include <stdio.h> 00037 #include <stdlib.h> 00038 #include "idima.h" 00039 #include "idmac.h" 00040 #include "iderr.h" 00041 #include "idprint.h" 00042 00043 /******************************************************************************* 00044 * 00045 * Description : Avec des images UCHAR 00046 * Recherche de composantes connexes en ligne dans une image binaire 00047 * avec calcul de caracteristiques simples 00048 * d : distance horizontale entre les elements a connecter 00049 * d = 0 : 4 - connexite 00050 * d = 1 : 8 - connexite 00051 * 00052 *******************************************************************************/ 00053 00054 00055 /* Prototypes fonctions internes *********************************************/ 00056 static void _label_trans ( PPIMAGE_UCHAR, int); 00057 static void _label_resultat ( FILE * ); 00058 static void _label_debut ( PPIMAGE_SHORT, int, short * ); 00059 static void _label_fin ( FILE*, FILE*, int ); 00060 static void _label_poursuite ( PPIMAGE_SHORT, int ,int ); 00061 static void _label_recherche ( void ); 00062 static void _label_maj_fus ( void ); 00063 static void _label_maj_fn ( void ); 00064 static void _label_mise_a_jour ( void ); 00065 00066 /**************************************************************************/ 00067 00068 #define Malloc(type) (type *)malloc(sizeof(type)) 00069 #define NB_MAX_TRANS 25 /* Nb maximum de transitions Noir/Blanc par ligne */ 00070 #define NB_MAX_COUL 1024 /* Nombre maximum d'objets (en cours) */ 00071 00072 #define deb 0 /* 1: Mode debug-suivi - 0 : Mode execution normale */ 00073 #if (deb) 00074 # define DEBUG(a) a 00075 #else 00076 # define DEBUG(a) 00077 #endif 00078 00079 typedef enum BOOL { false, true } bool; 00080 typedef struct CONNEX 00081 { 00082 int trans[NB_MAX_TRANS],trans_cours[NB_MAX_TRANS]; 00083 short coul[NB_MAX_COUL]; 00084 int surface,xdeb,xfin,ydeb,yfin; 00085 struct CONNEX *suivant; 00086 } connexe; 00087 typedef struct MODELE 00088 { 00089 int surface,xdeb,xfin,ydeb,yfin; 00090 short coul[NB_MAX_COUL]; 00091 struct MODELE *suivant; 00092 } modele; 00093 /****************************************************************************** 00094 * connexe : description de chaque objet en cours de traitement : 00095 * - trans : liste des debuts des transitions de l'objet a la ligne precedente; 00096 * - coul : liste des couleurs de l'objet; 00097 * - caracteristiques de l'objet : 00098 * - suface; 00099 * - rectangle exinscrit; 00100 * - pointeurs sur l'objet suivant dans la liste; 00101 * modele : liste des objets traites; 00102 *******************************************************************************/ 00103 00104 /****** Declarations de variables globales ******/ 00105 static connexe *premier,*courant,*dernier_cx,*precedent,*fus_cx,*precsup; 00106 static modele *pre_mod,*cou_mod,*der_mod; 00107 static int cou[512],sup[512],*pt_cou,*pt_sup; 00108 static int nb_gros,nb_petit,surf_tot,surf_gros,larg,surfmini; 00109 00110 /* FUNCTION DESCRIPTION ************************************************** 00111 * 00112 * IdImaLabel (fonction) 00113 * 00114 * RESUME: Cherche les objets connexes ds une image binaire 00115 * 00116 * DESCRIPTION: 00117 * Cherche les objets connexes d'une certaine taille dans une image binaire. 00118 * L'image labellisee est une image de type SHORT et chaque objet connexe 00119 * est represente par un niveau de gris different. 00120 * Le fichier fich_mod contient pour chaque objet le rectangle exinscrit et 00121 * le numero sous la forme: 00122 * xd yd xf yf numero 00123 * Le fichier fich_res contient pour chaque objet le numero, la surface et 00124 * le rectangle exinscrit sous la forme: 00125 * Objet No : 1 Surface = 1 00126 * Xmin = 10 Ymin = 5 Xmax = 10 Ymax = 5 00127 * 00128 * SYNTAXE: int nbObj= IdImaLabel(PPIMAGE_UCHAR imSource ,PPIMAGE_SHORT imLabel, int surf_min,FILE *fich_res, FILE *fich_mod, int connexite); 00129 * 00130 * RETOUR: type : int 00131 * role : -1 si echec, sinon le nombre d'objets trouves 00132 * 00133 * PARAMETRES: nom : im 00134 * type : PPIMAGE_UCHAR 00135 * role : Pointeur vers l'image source 00136 * 00137 * nom : imo 00138 * type : PPIMAGE_SHORT 00139 * role : Pointeur vers l'image 'labellisee' 00140 * 00141 * nom : surf_min 00142 * type : int 00143 * role : taille minimale des objets a considerer comme tels 00144 * 00145 * nom : fich_res 00146 * type : FILE * 00147 * role : 00148 * 00149 * nom : fich_mod 00150 * type : FILE * 00151 * acces : I 00152 * role : 00153 * 00154 * nom : connexite 00155 * type : int 00156 * role : connexite = 1 : 8-connexite connexite = 0 : 4-connexite 00157 * 00158 * FICHIER: imalabel.c 00159 * 00160 * EXEMPLE: 00161 * if ( (nb= IdImaLabel(im,imo,surf_min,fich_res,fich_mod,1) ) == -1) 00162 * IdErrPrintf("ERREUR: %s",IdErrMsg(IdErrno)); 00163 * 00164 ******************************************************** END DESCRIPTION */ 00165 00166 int IdImaLabel(PPIMAGE_UCHAR im, PPIMAGE_SHORT imo, int surf_min, FILE *fich_res, FILE *fich_mod, int connexite) 00167 00168 00169 00170 00171 /* connexite = 1 : 8-connexite connexite = 0 :4- connexite */ 00172 { 00173 unsigned char h; 00174 short niv,couleur,ctr[1024]; 00175 int compt=0,col,col1; 00176 int y,i,j,nbp,nbp2; 00177 /* Controle des l'images **/ 00178 if ( !im || IdImaType(im) != IMA_UCHAR ){ 00179 IdErrno = IDERR_WRONG_TYPE; 00180 return -1; 00181 } 00182 if ( !imo || IdImaType(imo) != IMA_SHORT ){ 00183 IdErrno = IDERR_WRONG_TYPE; 00184 return -1; 00185 } 00186 00187 surfmini=surf_min; 00188 surf_tot=0;surf_gros=0;nb_petit=0;nb_gros=0;couleur=0; 00189 pt_cou=cou; pt_sup=sup; 00190 for(y=0;y<512;y++) { *pt_cou++ = -1; *pt_sup++ = -1; } 00191 pt_cou=cou; pt_sup=sup; 00192 pre_mod=Malloc(modele); premier=Malloc(connexe); dernier_cx=Malloc(connexe); 00193 cou_mod=pre_mod; courant=premier; premier->suivant=dernier_cx; 00194 for(y=0;y<=IdImaDimY(im);y++) 00195 { 00196 DEBUG(IdPrintf("\n%d : ",y);) 00197 courant=premier; 00198 while(courant->suivant != dernier_cx) 00199 { 00200 h=0; 00201 courant=courant->suivant; 00202 while(courant->trans_cours[h] != -1) 00203 { 00204 courant->trans[h] = courant->trans_cours[h]; 00205 courant->trans[++h] = -1; 00206 } 00207 courant->trans_cours[0] = -1; 00208 } 00209 pt_cou=cou; pt_sup=sup; 00210 while(*pt_cou != -1) *pt_sup++ = *pt_cou++; 00211 *pt_sup = -1; 00212 pt_cou=cou; pt_sup=sup; 00213 if(y != IdImaDimY(im)) _label_trans(im,y); 00214 else {*pt_cou++ = -1; *pt_cou = -1; pt_cou=cou; pt_sup=sup; } 00215 while((*pt_cou != -1)&&(*pt_sup != -1)) 00216 { 00217 if((*(pt_cou+1)+connexite) < *pt_sup) _label_debut(imo,y,&couleur); 00218 else if(*pt_cou > (*(pt_sup+1)+connexite)) _label_fin(fich_res,fich_mod,y); 00219 else _label_poursuite(imo,y,connexite); 00220 } 00221 if(*pt_cou != -1) while(*pt_cou != -1) _label_debut(imo,y,&couleur); 00222 else while(*pt_sup != -1) _label_fin(fich_res,fich_mod,y); 00223 } 00224 _label_resultat(fich_res); 00225 der_mod=cou_mod;cou_mod=pre_mod; 00226 for(col=0;col<1024;col++) ctr[col]=0; 00227 while(cou_mod != der_mod) { 00228 cou_mod=pre_mod->suivant; 00229 if(cou_mod->surface >= surf_min){ 00230 compt++; 00231 /* IdPrintf("\n%3d : ",compt); */ 00232 col=0; 00233 while(cou_mod->coul[col]) { 00234 col1=cou_mod->coul[col++]; 00235 /* IdPrintf("%d ",col1); */ 00236 ctr[col1]=compt; 00237 if(col >= NB_MAX_COUL-2) 00238 {IdErrPrintf("NB_MAX_COUL trop petit\n");IdExit(0);} 00239 } 00240 } 00241 pre_mod=cou_mod; 00242 } 00243 00244 nbp=0; 00245 nbp2=0; 00246 for(i=0;i<IdImaDimY(imo);i++) 00247 for(j=0;j<IdImaDimX(imo);j++){ 00248 niv = imo[i][j]; 00249 if(niv){ 00250 imo[i][j] = ctr[niv]; 00251 nbp2++; 00252 if(ctr[niv]) nbp++; 00253 /* else IdPrintf("N %d\t",niv); */ 00254 } 00255 } 00256 00257 if((nbp != nbp2) && (surfmini < 2)) IdErrPrintf("Pb Tableau des niveaux\n"); 00258 IdPrintf("Surface totale %d, des 'gros' objets: %d, Pts image: %d\n",surf_tot,surf_gros,nbp); 00259 /* 00260 i=1; while(ctr[i]) {IdPrintf("%d --> %d\n",i,ctr[i]); i++;} 00261 for(i=1;i<1024;i++) if(ctr[i]) {IdPrintf("%d --> %d\n",i,ctr[i]);} 00262 */ 00263 00264 free((char *)premier);free((char *)dernier_cx); 00265 der_mod=cou_mod;cou_mod=pre_mod; 00266 while(cou_mod != der_mod) 00267 { cou_mod=pre_mod->suivant; free((char *)pre_mod);pre_mod=cou_mod;} 00268 free((char *)der_mod); 00269 return(nb_gros); 00270 } 00271 00272 /******************************************************************************/ 00273 /* Determination des transitions de la ligne traitee */ 00274 static void 00275 _label_trans(PPIMAGE_UCHAR im, int lig) 00276 { 00277 int x; 00278 00279 DEBUG( IdPrintf("Ligne %d\n",lig); ) 00280 if( im[lig][0] ) { *pt_cou=0; /*IdPrintf("1ere colonne non vide\n");*/} 00281 for(x=0;x<IdImaDimX(im)-1;x++) 00282 { 00283 if(im[lig][x] < im[lig][x+1]) *pt_cou = x+1; 00284 else if(im[lig][x] > im[lig][x+1]) { *(++pt_cou) = x; pt_cou++;} 00285 } 00286 if(im[lig][x]) { *(++pt_cou) = IdImaDimX(im)-1; pt_cou++; } 00287 *pt_cou++ = -1; *pt_cou = -1; 00288 pt_cou=cou; pt_sup=sup; 00289 } 00290 00291 /******************************************************************************/ 00292 static void 00293 _label_resultat(FILE *fich_res) 00294 { 00295 fprintf(fich_res,"Nombre d'objets = %d\t",nb_gros); 00296 if(nb_petit) fprintf(fich_res,"plus %d de surface <= %d pixels\n",nb_petit,surfmini); 00297 fprintf(fich_res,"Somme des Surfaces de tous les objets : %d\n",surf_tot); 00298 fprintf(fich_res,"Somme des Surfaces des gros objets : %d\n",surf_gros); 00299 } 00300 00301 /******************************************************************************/ 00302 /* Debut d'une nouvelle region */ 00303 static void 00304 _label_debut(PPIMAGE_SHORT imo, int lig, short int *pcoul) 00305 { 00306 int xt; 00307 DEBUG(IdPrintf("_label_debut ");) 00308 00309 (*pcoul)++; 00310 for(xt = *pt_cou;xt <= *(pt_cou+1);xt++) imo[lig][xt] = *pcoul; 00311 /*IdPrintf("%d\n",*pcoul);*/ 00312 larg = *(pt_cou+1) - *pt_cou + 1; 00313 /* ----- Creation d'un connexe ----- */ 00314 precedent=dernier_cx; 00315 precedent->suivant=Malloc(connexe); 00316 /* ----- Initialisation des parametres du nouveau connexe ----- */ 00317 precedent->trans_cours[0] = *pt_cou; precedent->trans_cours[1] = -1; 00318 precedent->coul[0] = *pcoul; precedent->coul[1] = 0; 00319 precedent->surface = larg; precedent->ydeb = lig; 00320 precedent->xdeb = *pt_cou++; precedent->xfin = *pt_cou++; 00321 dernier_cx=precedent->suivant; 00322 } 00323 00324 /******************************************************************************/ 00325 /* Fin d'une region */ 00326 static void 00327 _label_fin(FILE *fich_res, FILE *fich_mod, int lig) 00328 { 00329 int col,*pt_temp; 00330 bool existe; 00331 00332 DEBUG(IdPrintf("_label_fin ");) 00333 existe=false; 00334 _label_recherche(); 00335 fus_cx=courant; precsup=precedent; 00336 pt_temp=pt_sup; 00337 if(courant->trans_cours[0] != -1) existe=true; 00338 while(*(pt_sup+2) != -1) 00339 { pt_sup += 2;_label_recherche();if(courant==fus_cx) {existe=true;break;} } 00340 pt_sup=pt_temp; 00341 if(!existe) 00342 { 00343 DEBUG(IdPrintf("! ");) 00344 /* ----- Creation d'un objet du modele ----- */ 00345 cou_mod->suivant=Malloc(modele);cou_mod=cou_mod->suivant; 00346 surf_tot += fus_cx->surface; 00347 /* ----- Affectation des parametres du nouvel objet du modele ----- */ 00348 col=0; 00349 while(fus_cx->coul[col]) { 00350 cou_mod->coul[col] = fus_cx->coul[col]; 00351 /*IdPrintf("%d ",cou_mod->coul[col]);*/ 00352 col++; 00353 if(col >= NB_MAX_COUL-2) 00354 {IdErrPrintf("NB_MAX_COUL trop petit\n");IdExit(0);} 00355 } 00356 cou_mod->coul[col] = 0; 00357 cou_mod->surface = fus_cx->surface; 00358 cou_mod->xdeb = fus_cx->xdeb; cou_mod->xfin = fus_cx->xfin; 00359 cou_mod->ydeb = fus_cx->ydeb; cou_mod->yfin = lig-1; 00360 /* ----- Elimination du connexe ----- */ 00361 precsup->suivant = fus_cx->suivant; 00362 free((char *)fus_cx); 00363 /* ----- Affichage des parametres de chaque modele ----- */ 00364 if(cou_mod->surface >= surfmini) { 00365 nb_gros++;surf_gros += cou_mod->surface; 00366 fprintf(fich_mod,"%d\t%d\t",cou_mod->xdeb,cou_mod->ydeb); 00367 fprintf(fich_mod,"%d\t %d\t%d\n",cou_mod->xfin,cou_mod->yfin,nb_gros); 00368 fprintf(fich_res,"Objet No : %d\tSurface = %d\n",nb_gros,cou_mod->surface); 00369 fprintf(fich_res,"\tXmin = %d\tYmin = %d",cou_mod->xdeb,cou_mod->ydeb); 00370 fprintf(fich_res,"\tXmax = %d\tYmax = %d\n",cou_mod->xfin,cou_mod->yfin); 00371 } 00372 else nb_petit++; 00373 } 00374 pt_sup += 2; 00375 } 00376 00377 /******************************************************************************/ 00378 /* Poursuite d'une region */ 00379 static void 00380 _label_poursuite(PPIMAGE_SHORT imo, int lig, int connexite) 00381 { 00382 int xt,col,col1; 00383 short niveau; 00384 00385 _label_recherche(); 00386 if((*(pt_sup+2) <= (*(pt_cou+1)+connexite)) && (*(pt_sup+2) != -1)) 00387 /*-*-* fusion *-*-*/ 00388 { 00389 fus_cx=courant; 00390 pt_sup += 2; 00391 _label_recherche(); 00392 if(courant != fus_cx) { 00393 DEBUG( IdPrintf("\n%d %d %d %d\n",*pt_cou,*(pt_cou+1),*pt_sup,*(pt_sup+1));) 00394 col=0; 00395 while(fus_cx->coul[col]){ 00396 col++; 00397 if(col >= NB_MAX_COUL-2) 00398 {IdErrPrintf("NB_MAX_COUL trop petit\n");IdExit(0);} 00399 } 00400 col1=0; 00401 while(courant->coul[col1]){ 00402 fus_cx->coul[col++] = courant->coul[col1++]; 00403 if((col1 >= NB_MAX_COUL-2)||(col >= NB_MAX_COUL-2)) 00404 {IdErrPrintf("NB_MAX_COUL trop petit\n");IdExit(0);} 00405 00406 } 00407 fus_cx->coul[col] = 0; 00408 _label_maj_fus(); /*-*-* Detection d'une fusion *-*-*/ 00409 DEBUG( IdPrintf("fusion "); ) 00410 } 00411 else { _label_maj_fn(); /*-*-* Detection d'une fusion "normale" *-*-*/ 00412 DEBUG( if(deb) IdPrintf("fusion normale "); ) 00413 } 00414 while((*(pt_sup+2) <= (*(pt_cou+1)+connexite)) && (*(pt_sup+2) != -1)) 00415 { 00416 pt_sup += 2; 00417 fus_cx=courant; 00418 _label_recherche(); 00419 if(courant != fus_cx) { 00420 col=0; 00421 while(fus_cx->coul[col]){ 00422 col++; 00423 if(col >= NB_MAX_COUL-2) 00424 {IdErrPrintf("NB_MAX_COUL trop petit\n");IdExit(0);} 00425 } 00426 col1=0; 00427 while(courant->coul[col1]){ 00428 fus_cx->coul[col++] = courant->coul[col1++]; 00429 if((col1 >= NB_MAX_COUL-2)||(col >= NB_MAX_COUL-2)) 00430 {IdErrPrintf("NB_MAX_COUL trop petit\n");IdExit(0);} 00431 } 00432 fus_cx->coul[col] = 0; 00433 _label_maj_fus(); /*-* Detection d'une fusion *-*/ 00434 DEBUG(IdPrintf("fusion ");) 00435 } 00436 else { _label_maj_fn(); /*-* Detection d'une fusion "normale" *-*/ 00437 DEBUG( IdPrintf("fusion normale ");) 00438 } 00439 } 00440 } 00441 00442 else { 00443 col1=0; 00444 while(courant->coul[col1]){ 00445 col1++; 00446 if(col1 >= NB_MAX_COUL-2) 00447 {IdErrPrintf("NB_MAX_COUL trop petit\n");IdExit(0);} 00448 } 00449 niveau=courant->coul[col1-1]; 00450 DEBUG( IdPrintf("niv = %d ",niveau); ) 00451 DEBUG( IdPrintf("%d ",*pt_sup); ) 00452 larg = *(pt_cou+1) - *pt_cou + 1; 00453 for(xt = *pt_cou;xt<= *(pt_cou+1);xt++) imo[lig][xt]=niveau; 00454 if((*(pt_cou+2) <= (*(pt_sup+1)+connexite)) && (*(pt_cou+2) != -1)) 00455 { /*-*-* Detection d'un eclatement *-*-*/ 00456 DEBUG(IdPrintf("eclatement ");) 00457 _label_mise_a_jour(); 00458 } 00459 else { /*-*-* Poursuite normale *-*-*/ 00460 _label_mise_a_jour();pt_sup += 2; 00461 DEBUG( IdPrintf("pours. normale ");) 00462 } 00463 } 00464 } 00465 00466 /******************************************************************************/ 00467 static void 00468 _label_recherche(void) 00469 { 00470 bool trouve; 00471 unsigned char k; 00472 00473 trouve=false; 00474 courant=premier; 00475 DEBUG( IdPrintf("\nRech (%d): ",*pt_sup);) 00476 while((courant->suivant != dernier_cx) && (!trouve)) 00477 { 00478 k=0; 00479 precedent=courant; 00480 courant=courant->suivant; 00481 DEBUG(IdPrintf("** ");) 00482 while(courant->trans[k] != -1) 00483 { 00484 DEBUG(IdPrintf("%d ",courant->trans[k]);) 00485 if(courant->trans[k] == *pt_sup) {trouve=true; break;} 00486 k++; 00487 } 00488 } 00489 DEBUG( IdPrintf("\n");) 00490 } 00491 00492 /******************************************************************************/ 00493 /* --- Mise a jour des parametres du connexe en cours : FUSION --- */ 00494 /* --- Fusion de deux regions qui appartenaient a des connexes differents --- */ 00495 static void 00496 _label_maj_fus(void) 00497 { 00498 unsigned char k,j; 00499 00500 k=0;j=0; 00501 while(fus_cx->trans_cours[k] != -1) k++; 00502 while(courant->trans_cours[j] != -1) 00503 { fus_cx->trans_cours[k] = courant->trans_cours[j]; j++; k++; } 00504 fus_cx->trans_cours[k++] = *pt_cou; 00505 fus_cx->trans_cours[k] = -1; 00506 k=0;j=0; 00507 while(fus_cx->trans[k] != -1) k++; 00508 while(courant->trans[j] != -1) 00509 { 00510 DEBUG( IdPrintf("\nNo %d",courant->trans[j]);) 00511 fus_cx->trans[k] = courant->trans[j]; j++; k++; 00512 } 00513 fus_cx->trans[k] = -1; 00514 fus_cx->surface += courant->surface; 00515 fus_cx->xdeb = min(min(fus_cx->xdeb,courant->xdeb),*pt_cou); 00516 fus_cx->xfin = max(max(fus_cx->xfin,courant->xfin),*(pt_cou+1)); 00517 fus_cx->ydeb = min(fus_cx->ydeb,courant->ydeb); 00518 precedent->suivant = courant->suivant; 00519 free((char *)courant); 00520 courant=fus_cx; 00521 } 00522 00523 /******************************************************************************/ 00524 /* --- Mise a jour des parametres du connexe en cours : FUSION NORMALE ---*/ 00525 /* --- Fusion de deux regions qui appartenaient au meme connexe ---*/ 00526 static void 00527 _label_maj_fn(void) 00528 { 00529 unsigned char k=0; 00530 00531 while(courant->trans_cours[k] != -1) k++; 00532 courant->trans_cours[k++] = *pt_cou; 00533 courant->trans_cours[k] = -1; 00534 courant->xdeb = min(courant->xdeb,*pt_cou); 00535 courant->xfin = max(courant->xfin,*(pt_cou+1)); 00536 } 00537 00538 /******************************************************************************/ 00539 /* --- Mise a jour des parametres du connexe en cours : POURSUITE NORMALE ---*/ 00540 static void 00541 _label_mise_a_jour(void) 00542 { 00543 unsigned char k=0; 00544 00545 courant->surface += larg; 00546 while(courant->trans_cours[k] != -1) k++; 00547 courant->trans_cours[k++] = *pt_cou; 00548 courant->trans_cours[k] = -1; 00549 courant->xdeb = min(courant->xdeb,*pt_cou); 00550 courant->xfin = max(courant->xfin,*(pt_cou+1)); 00551 pt_cou += 2; 00552 } 00553 00554 00555

Generated on Wed Oct 19 09:28:33 2005 for SIMRI3D by doxygen 1.3.7