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_fl.c ********************************/ 00020 /* */ 00021 /* SELECTION DE DONNEES DE TYPE FL (reel 32 bit) */ 00022 /* LECTURE ET ECRITRE BLOC PAR BLOC */ 00023 /* */ 00024 /* Derniere modif : E. TROUVE, 06/03/2000 */ 00025 /* ************************************************************************/ 00026 00027 #include "image.h" 00028 #include "proto2D.h" /* descripteurs et prototypes des fonctions de ima2D */ 00029 #include <stdlib.h> 00030 00031 int main(int argc, char *argv[]){ 00032 /* DECLARATIONS */ 00033 /* images */ 00034 imafl bl0; 00035 /* operateurs */ 00036 select_ima_t sel; 00037 save_ima_t sav; 00038 /* local */ 00039 param par0, *ptp; /* tete et pointeur pour la chaine de parametres */ 00040 int j; 00041 00042 /* LECTURE PARAMETRES */ 00043 /* debut: OBLIGATOIRE pour compatibilite avec les 3 modes de lecture de param */ 00044 param_debut(argc, argv, &par0); 00045 ptp = &par0; /* regle : ptp pointe sur la structure du parametre suivant */ 00046 00047 /* operateurs: ptp est passe en argument, return fournit la nouvelle position */ 00048 ptp = select_ima_lect(&sel, ptp, "image initiale (fl) :"); 00049 ptp = save_ima_lect(&sav, ptp, "image resultat (fl) :"); 00050 00051 /* main : en cas de parametres lus dans le main */ 00052 00053 /* fin: sauvegarde des parametres utilises en mode MANUEL ou FICHIER */ 00054 param_fin(argc, argv, &par0); 00055 00056 00057 /* INITIALISATION */ 00058 select_imafl_init(&sel, &bl0); 00059 save_ima_init(&sav); 00060 00061 00062 /* CALCUL */ 00063 while(select_imafl_calc(&sel, &bl0)==0){ 00064 save_imafl_calc(&sav, bl0); 00065 } 00066 00067 00068 /* FREMETURE */ 00069 save_ima_ferm(sel, sav); 00070 } 00071 00072 00073