Mercurial > hg > minc-tools
comparison progs/mincmorph/mincmorph.c @ 2638:9a50bb928cad
Added mincmorph build in CMakeLists.txt, changed -version to report minc library version
author | Vladimir S. FONOV <vladimir.fonov@gmail.com> |
---|---|
date | Tue, 13 Mar 2012 15:09:42 -0400 |
parents | 0b9a5b816213 |
children | 55857e335f55 |
comparison
equal
deleted
inserted
replaced
2637:0b9a5b816213 | 2638:9a50bb928cad |
---|---|
32 | 32 |
33 /* function prototypes */ | 33 /* function prototypes */ |
34 char *get_real_from_string(char *string, double *value); | 34 char *get_real_from_string(char *string, double *value); |
35 char *get_string_from_string(char *string, char **value); | 35 char *get_string_from_string(char *string, char **value); |
36 void calc_volume_range(VIO_Volume * vol, double *min, double *max); | 36 void calc_volume_range(VIO_Volume * vol, double *min, double *max); |
37 void print_version_info(void); | 37 /* void print_version_info(void);*/ |
38 | 38 |
39 /* kernel names for pretty output */ | 39 /* kernel names for pretty output */ |
40 char *KERN_names[] = { "NULL", "2D04", "2D08", "3D06", "3D26" }; | 40 char *KERN_names[] = { "NULL", "2D04", "2D08", "3D06", "3D26" }; |
41 | 41 |
42 /* typedefs */ | 42 /* typedefs */ |
92 | 92 |
93 /* Argument table */ | 93 /* Argument table */ |
94 ArgvInfo argTable[] = { | 94 ArgvInfo argTable[] = { |
95 {NULL, ARGV_HELP, (char *)NULL, (char *)NULL, | 95 {NULL, ARGV_HELP, (char *)NULL, (char *)NULL, |
96 "General options:"}, | 96 "General options:"}, |
97 {"-version", ARGV_FUNC, (char *)print_version_info, (char *)NULL, | 97 /* {"-version", ARGV_FUNC, (char *)print_version_info, (char *)NULL, |
98 "print version info and exit"}, | 98 "print version info and exit"},*/ |
99 {"-verbose", ARGV_CONSTANT, (char *)TRUE, (char *)&verbose, | 99 {"-verbose", ARGV_CONSTANT, (char *)TRUE, (char *)&verbose, |
100 "be verbose"}, | 100 "be verbose"}, |
101 {"-clobber", ARGV_CONSTANT, (char *)TRUE, (char *)&clobber, | 101 {"-clobber", ARGV_CONSTANT, (char *)TRUE, (char *)&clobber, |
102 "clobber existing files"}, | 102 "clobber existing files"}, |
103 | 103 |
366 | 366 |
367 /* if no inbuilt found, assume it's a file */ | 367 /* if no inbuilt found, assume it's a file */ |
368 if(op->kernel_id == K_NULL){ | 368 if(op->kernel_id == K_NULL){ |
369 | 369 |
370 /* set up and check for the real filename */ | 370 /* set up and check for the real filename */ |
371 (void)realpath(tmp_str, tmp_filename); | 371 if(!realpath(tmp_str, tmp_filename) || access(tmp_filename, F_OK) != 0){ |
372 if(access(tmp_filename, F_OK) != 0){ | |
373 fprintf(stderr, "%s: Couldn't find kernel file: %s\n\n", argv[0], | 372 fprintf(stderr, "%s: Couldn't find kernel file: %s\n\n", argv[0], |
374 tmp_filename); | 373 tmp_filename); |
375 exit(EXIT_FAILURE); | 374 exit(EXIT_FAILURE); |
376 } | 375 } |
377 | 376 |
737 if(verbose){ | 736 if(verbose){ |
738 fprintf(stdout, "Found range of [%g:%g]\n", *min, *max); | 737 fprintf(stdout, "Found range of [%g:%g]\n", *min, *max); |
739 } | 738 } |
740 } | 739 } |
741 | 740 |
742 void print_version_info(void) | 741 /* void print_version_info(void) |
743 { | 742 { |
744 fprintf(stdout, "%s version %s\n", PACKAGE, VERSION); | 743 fprintf(stdout, "%s version %s\n", PACKAGE, VERSION); |
745 fprintf(stdout, "Comments to %s\n", PACKAGE_BUGREPORT); | 744 fprintf(stdout, "Comments to %s\n", PACKAGE_BUGREPORT); |
746 fprintf(stdout, "\n"); | 745 fprintf(stdout, "\n"); |
747 exit(EXIT_SUCCESS); | 746 exit(EXIT_SUCCESS); |
748 } | 747 } |
748 */ |