00001
00010 #include <stdio.h>
00011 #include <stdlib.h>
00012 #include <math.h>
00013 #include <string.h>
00014 #include <inrimage/image.h>
00015 #include "interpolation.h"
00016
00021 static char Ucmd[]=
00022 "[distSrc] [tempoW] [distGeod] [-n nbIter] [-dt ptTau] [-time time_level] [-cache taille_cache]";
00023
00027 static char Udetail[]=
00028 "calcule les distances geodesiques d'un point de l'espace a distSrc le long de tempoW en nbIter iterations dans distGed\
00029 avec un pas de discretisation temporelle ptTau";
00030
00031 extern void imerror(int code,char * format,...);
00032
00033 int main(int argc,char ** argv)
00034 {
00035 char imgSrc[80]="",tempoW[80]="",imgGeod[80]="";
00036 int nb_iter,time_flag,taille_cache;
00037 float ptTau;
00038
00039 inr_init(argc,argv,"1.0",Ucmd,Udetail);
00040
00041
00042 infileopt(imgSrc);
00043 infileopt(tempoW);
00044 outfileopt(imgGeod);
00045
00046
00047
00048 if (!igetopt1("-dt","%f",&ptTau))
00049 ptTau=0.5;
00050 if (!igetopt1("-time","%i",&time_flag))
00051 time_flag=0;
00052 if (!igetopt1("-n","%i",&nb_iter))
00053 nb_iter=1;
00054 if (!igetopt1("-cache","%i",&taille_cache))
00055 taille_cache=3;
00056
00057
00058 if(tstopts())
00059 iusage_(Ucmd,Udetail);
00060
00061 g3Dc(imgSrc,tempoW,imgGeod,nb_iter,ptTau,taille_cache,time_flag);
00062
00063 return EXIT_SUCCESS;
00064 }