mmedhist.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 */
00030 #include <stdio.h>
00031 #include <math.h>
00032 #include "image.h"
00033 #include "proto2D.h"
00034 #include "rasterfile.h"
00035 #include "medhist.h"
00036 
00037 
00038 
00039 
00040 /*-----------------------------------------------------------*/
00041 /*                          PRINCIPAL                        */                        
00042 /*-----------------------------------------------------------*/
00043 int main (int argc, char *argv[])
00044 {
00045   /* DECLARATIONS */
00046   int tf;
00047   imau1 im0, imres;
00048   param par0, *ptp; 
00049   read_ima_t rea;
00050   write_ima_t wri;
00051   median_hist_t mask;
00052 
00053   /* LECTURE PARAMETRES */
00054   param_debut(argc, argv, &par0);
00055   ptp = &par0;
00056   ptp = read_ima_lect(&rea, ptp, ">> image initiale  (u1) :");
00057   ptp = write_ima_lect(&wri, ptp, ">> image resultat  (u1) :");
00058   lec_param(">>taille de la fenetre:", ptp); 
00059   mask.tf= atoi(ptp->rep);
00060   ptp = ptp->next;
00061   param_fin(argc, argv, &par0);
00062   /* INITIALISATION  */
00063   read_imau1_init(&rea, &im0);
00064   write_ima_init(&wri);
00065   /* CALCUL */
00066   medhist_calc(&mask, im0, &imres);
00067 
00068   /* FREMETURE */
00069   write_imau1_ferm(&wri, imres);
00070 
00071 }
00072  
00073 

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