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 */ 00028 #include "volume.h" 00029 #include "image.h" 00030 #include "proto2D.h" 00031 #include "distance_ima.h" /* complement pour les operateurs en cours de developpt */ 00032 00033 int main(int argc, char *argv[]){ 00034 00035 /* DECLARATIONS */ 00036 00037 00038 /* operateurs */ 00039 read_ima_t ri; 00040 image_distance_t dist; 00041 write_ima_t wi; 00042 imau1 in, out; 00043 00044 /* main : variables et parametres propres au main*/ 00045 param par0, *ptp; /* tete et pointeur pour la chaine de parametres */ 00046 00047 00048 /* LECTURE PARAMETRES */ 00049 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 = read_ima_lect( &ri, ptp, ""); 00056 ptp = distance_imau1_lect( &dist, ptp, ""); 00057 ptp = write_ima_lect (&wi, ptp, ""); 00058 00059 /* fin: sauvegarde des parametres utilises en mode MANUEL ou FICHIER */ 00060 param_fin(argc, argv, &par0); 00061 00062 00063 /* INITIALISATION */ 00064 read_imau1_init( &ri, &in); 00065 distance_imau1_init( &dist, &in, &out); 00066 write_ima_init( &wi); 00067 00068 00069 /* CALCUL */ 00070 distance_imau1_calc(&dist, &in, &out ); 00071 write_imau1_ferm( &wi, out); 00072 printf("FIN\n"); 00073 00074 free_imau1(&in); 00075 free_imau1(&out); 00076 } 00077