messai_u1.c

Go to the documentation of this file.
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 */
00033 #include "volume.h"    /* types des donnees manipulees dans ima2D */
00034 #include "proto2D.h"  /* descripteurs et prototypes des fonctions de ima2D */
00035 #include "essai.h"    /* complement pour les operateurs en cours de developpt */ 
00036 #include <stdlib.h>
00037 #include <string.h>
00038 
00039 
00040 int main(int argc, char *argv[]){
00041 
00042   param par0, *ptp;  /* variables pour la lecture des paramètres */
00043   int iloc;              
00044   float floc;
00045   char  nomlocIn[200], nomlocOut[200];
00046 
00047   ima3Du1 imaOri, imaRes; /*images a traiter*/  
00048   essai_t bid; /*operateurs en cours de développement*/
00049 
00050   
00051   /*Lecture des paramètres*/
00052   param_debut(argc, argv, &par0); 
00053   ptp = &par0;  
00054 
00055   lec_param(">>main, fichier volume a lire", ptp);
00056   strcpy(nomlocIn, ptp->rep);
00057   ptp = ptp->next;  
00058 
00059   ptp = essai_lect(&bid, ptp, ">> essai_lect, debut de question :");
00060 
00061   lec_param(">>main, entier iloc", ptp);
00062   iloc = atoi(ptp->rep);
00063   ptp = ptp->next;
00064 
00065   lec_param(">>main, float floc", ptp);
00066   floc = (float)atof(ptp->rep);
00067   ptp = ptp->next;
00068 
00069   lec_param(">>main, fichier volume a ecrire", ptp);
00070   strcpy(nomlocOut, ptp->rep);
00071   ptp = ptp->next;  
00072 
00073   param_fin(argc, argv, &par0); /*fin lecture automatique des paramètres*/
00074 
00075 
00076 
00077   /*Initialisation et lecture*/
00078   lect_volume_u1( nomlocIn, &imaOri);
00079   essaiu1_init(&bid, imaOri, &imaRes);
00080 
00081  
00082   /*Traitement*/
00083   essaiu1_calc(&bid, imaOri, &imaRes); 
00084   printf("\n partie calcul, iloc=%d, floc=%f, nomlocIn=%s, nomlocOut=%s\n", 
00085          iloc, floc, nomlocIn, nomlocOut);
00086 
00087 
00088   /*Ecriture de l'image resultat*/
00089   write_volume_u1( nomlocOut, &imaRes) ; 
00090 }
00091 

Generated on Tue Apr 22 13:31:06 2008 for volume by  doxygen 1.5.3