mselect_imau1.c

00001 /*
00002 *    Copyright (c) 2007. The BATI team. All right reserved.
00003 *
00004 *    This file is part of BATI library.
00005 *
00006 *    BATI library is free software: you can redistribute it and/or modify
00007 *    it under the terms of the GNU General Public License as published by
00008 *    the Free Software Foundation, either version 3 of the License, or
00009 *    (at your option) any later version.
00010 *
00011 *    BATI library  is distributed in the hope that it will be useful,
00012 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 *    GNU General Public License for more details.
00015 *
00016 *    You should have received a copy of the GNU General Public License
00017 *    along with BATI library.  If not, see <http://www.gnu.org/licenses/>.
00018 */
00019 /* ************************** mselect_u1.c ********************************/
00020 /*                                                                        */
00021 /* ************************************************************************/
00022 
00034 #include "image.h"
00035 #include "proto2D.h"  /* descripteurs et prototypes des fonctions de ima2D */
00036 #include <stdlib.h>
00037 
00038 int main(int argc, char *argv[]){
00039 /* DECLARATIONS */
00040   /* images */ 
00041   imau1 bl0;          
00042   /* operateurs */
00043   select_ima_t  sel;
00044   save_ima_t sav;
00045   /* local */
00046   param par0, *ptp;      /* tete et pointeur pour la chaine de parametres */
00047   int j;
00048 
00049 /* LECTURE PARAMETRES */
00050   /* debut: OBLIGATOIRE pour compatibilite avec les 3 modes de lecture de param */
00051   param_debut(argc, argv, &par0); 
00052   ptp = &par0;      /* regle : ptp pointe sur la structure du parametre suivant */
00053 
00054   /* operateurs: ptp est passe en argument, return fournit la nouvelle position */
00055   ptp = select_ima_lect(&sel, ptp, "image initiale (u1) :");
00056   ptp = save_ima_lect(&sav, ptp, "image resultat (u1) :");
00057 
00058   /* main : en cas de parametres lus dans le main */
00059 
00060   /* fin: sauvegarde des parametres utilises en mode MANUEL ou FICHIER */
00061   param_fin(argc, argv, &par0);
00062 
00063 
00064 /* INITIALISATION  */
00065   select_imau1_init(&sel, &bl0);
00066   save_imau1_init(&sav, bl0);
00067 
00068 
00069 /* CALCUL */
00070   while(select_imau1_calc(&sel, &bl0)==0){
00071       save_imau1_calc(&sav, bl0);
00072   }
00073 
00074   
00075 /* FREMETURE */
00076   save_ima_ferm(sel, sav);
00077 }
00078 
00079 
00080 

Generated on Tue Apr 22 13:31:04 2008 for ima2D by  doxygen 1.5.3